Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding test automation for reclaimspace disable operation #10862

Merged

Conversation

paraggit
Copy link
Contributor

Adding test automation for reclaimspace disable operation

    Steps:
        1.	Create a PVC from the CephBlockPool and attach it to a pod.
        2.	To disable the reclaimspace operation for the PVC, set suspend = true and change the state annotation
            to unmanaged.
        3.	Verify that the reclaimspace operation is disabled for the PVC by checking that suspend = true is set.
        4.	Re-enable the reclaimspace cronjob by removing suspend = true and changing the state annotation back
            to managed for each PVC.
        5.	Verify that all reclaimspace cronjobs are enabled.

@paraggit paraggit requested a review from a team as a code owner November 14, 2024 18:00
@pull-request-size pull-request-size bot added the size/L PR that changes 100-499 lines label Nov 14, 2024
@paraggit paraggit requested review from a team as code owners November 15, 2024 03:52
@pull-request-size pull-request-size bot added size/XXL and removed size/L PR that changes 100-499 lines labels Nov 15, 2024
@paraggit paraggit force-pushed the disable_reclaimspace_operation branch 2 times, most recently from 5b5adff to 50e7f13 Compare November 15, 2024 04:05
@pull-request-size pull-request-size bot added size/L PR that changes 100-499 lines and removed size/XXL labels Nov 15, 2024
@paraggit paraggit removed request for a team November 15, 2024 04:06
self.pod_objs.append(pod_obj)

# Disable Reclaimspace operation for the PVC
log.info("Changing reclaimspace cronjob status to disable for all PVC object.")
Copy link
Contributor

@shyRozen shyRozen Nov 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I'm missing something but if we want to disable the reclaim space, don't we need to enable it first?
If it is enabled by default then it is valid.
If not you are disabling but then enabling. I think it should go the other way around.
Enable->disable and then you can enable it back if we want to see that it can be reversed again to enable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reclaimspace is enabled by default on the cluster, so the flow starts with disabling and then enabling it to test reversibility.

@paraggit paraggit force-pushed the disable_reclaimspace_operation branch from b49c6f5 to a480f54 Compare November 19, 2024 06:08
@paraggit paraggit requested a review from shyRozen November 19, 2024 06:09
@paraggit paraggit changed the title [WIP] Adding test automation for reclaimspace disable operation Adding test automation for reclaimspace disable operation Nov 19, 2024
@paraggit paraggit requested review from a team and removed request for a team November 19, 2024 06:25
@paraggit paraggit force-pushed the disable_reclaimspace_operation branch 2 times, most recently from 2e9517c to b03e542 Compare November 28, 2024 06:48
ebenahar
ebenahar previously approved these changes Dec 3, 2024
@openshift-ci openshift-ci bot added the lgtm label Dec 3, 2024
@paraggit paraggit force-pushed the disable_reclaimspace_operation branch from b03e542 to a17829a Compare December 4, 2024 06:48
@openshift-ci openshift-ci bot removed the lgtm label Dec 4, 2024
Copy link

@ocs-ci ocs-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR validation

Cluster Name:
Cluster Configuration:
PR Test Suite: tier1
PR Test Path: tests/functional/pv/space_reclaim/test_disable_reclaimspace_operation.py
Additional Test Params:
OCP VERSION: 4.18
OCS VERSION: 4.18
tested against branch: master

Job UNSTABLE (some or all tests failed).

Copy link

@ocs-ci ocs-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR validation

Cluster Name:
Cluster Configuration:
PR Test Suite: tier1
PR Test Path: tests/functional/pv/space_reclaim/test_disable_reclaimspace_operation.py
Additional Test Params:
OCP VERSION: 4.18
OCS VERSION: 4.18
tested against branch: master

Job UNSTABLE (some or all tests failed).

@paraggit paraggit force-pushed the disable_reclaimspace_operation branch from 97f3d71 to ecc8aea Compare January 15, 2025 09:40
Copy link

@ocs-ci ocs-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR validation

Cluster Name:
Cluster Configuration:
PR Test Suite: tier1
PR Test Path: tests/functional/pv/space_reclaim/test_disable_reclaimspace_operation.py
Additional Test Params:
OCP VERSION: 4.18
OCS VERSION: 4.18
tested against branch: master

Job UNSTABLE (some or all tests failed).

@paraggit paraggit force-pushed the disable_reclaimspace_operation branch from 08c17c5 to 78aaf4d Compare January 16, 2025 06:27
Copy link

@ocs-ci ocs-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unknown PR validation

Cluster Name:
Cluster Configuration:
PR Test Suite: tier1
PR Test Path: tests/functional/pv/space_reclaim/test_disable_reclaimspace_operation.py
Additional Test Params:
OCP VERSION: 4.18
OCS VERSION: 4.18
tested against branch: master

Job state: ABORTED.

Copy link

@ocs-ci ocs-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR validation

Cluster Name:
Cluster Configuration:
PR Test Suite: tier1
PR Test Path: tests/functional/pv/space_reclaim/test_disable_reclaimspace_operation.py
Additional Test Params:
OCP VERSION: 4.18
OCS VERSION: 4.18
tested against branch: master

Job PASSED.

@paraggit paraggit added the Verified Mark when PR was verified and log provided label Jan 16, 2025
storage_path = pod_obj.get_storage_path("block")
log.info(f"Writing {actual_data_written}GiB of data to the block device")
pod_obj.exec_cmd_on_pod(
f"dd if=/dev/zero of={storage_path} bs=1M count=1024 oflag=direct > /dev/null 2>&1 &",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the command should be saved as a constant

Copy link

openshift-ci bot commented Jan 21, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ebenahar, paraggit, shyRozen

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@shyRozen shyRozen merged commit 455e4fc into red-hat-storage:master Jan 21, 2025
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm size/L PR that changes 100-499 lines Verified Mark when PR was verified and log provided
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants