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 trash operations at scale #3556

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

manasagowri
Copy link
Contributor

Adding trash operations at scale. Automating test case - CEPH-83582444
Automated only a part of the above polarion test case in this PR since it is a pretty big change.
The steps automated for this are

  1. Run IOs on images, create snaps and clones for few of the images created (this is useful while doing trash purge)
  2. Move images to trash and verify that its present in trash list
  3. Purge trash for the pool, verify that all images which don't have snaps or clones are deleted permanently from trash
  4. Restore rest of the images from trash and verify that they are present in rbd ls.

Success Logs

Sequential execution - http://magna002.ceph.redhat.com/cephci-jenkins/cephci-run-M9F1I4/
Parallel execution - http://magna002.ceph.redhat.com/cephci-jenkins/cephci-run-E5GA9C/

cli/rbd/trash/trash.py Show resolved Hide resolved
cli/rbd/trash/trash.py Show resolved Hide resolved
tests/rbd/test_rbd_trash_operations.py Show resolved Hide resolved
Copy link
Contributor

@sunilangadi2 sunilangadi2 left a comment

Choose a reason for hiding this comment

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

LGTM.

@openshift-ci openshift-ci bot added the lgtm Add this label when the PR is good to be merged label Apr 1, 2024
Copy link
Contributor

openshift-ci bot commented Apr 1, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: manasagowri, sunilangadi2

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


trash_list = json.loads(out)
image_id = [
trash_image.get("id")
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add NoneType check for trash_image.get("id"), otherwise image_id list may end up in NoneTypes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If there is an image, there will definitely be an ID. So I think we don't need a nonetype check here. Please let me know if you still think otherwise.

log.info(
f"Creating snaps and clones for every alternate image in the pool {pool}"
)
rc = wrapper_for_image_ops(
Copy link
Contributor

Choose a reason for hiding this comment

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

md5sum validations for snap_clone operations makes this complete

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure will add this as part of my next partial PR for this. Hope that's okay

log.info(
f"Restore images from trash, create new images and verify for pool {pool}"
)
rc = restore_and_create_new_image(
Copy link
Contributor

Choose a reason for hiding this comment

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

after restoring images from trash, IMHO we should do md5sum check of restored images to prior to trash images and perform IO on restored image to make sure its usable after restore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure will add this as part of my next partial PR for this. Hope that's okay

@openshift-ci openshift-ci bot removed the lgtm Add this label when the PR is good to be merged label Apr 1, 2024
Copy link

This Pull request has been automatically marked as STALE due to inactivity for 15 days and will be CLOSED on further inactivity on the PR for another 15 days.

Signed-off-by: manasagowri <manasagowri16@gmail.com>
Copy link

This Pull request has been automatically marked as STALE due to inactivity for 15 days and will be CLOSED on further inactivity on the PR for another 15 days.

Copy link
Contributor

mergify bot commented May 20, 2024

"This pull request now has conflicts with the target branch. Could you please resolve conflicts and force push the corrected changes?"

@openshift-merge-robot
Copy link
Contributor

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link

github-actions bot commented Jun 4, 2024

This Pull request has been automatically marked as STALE due to inactivity for 15 days and will be CLOSED on further inactivity on the PR for another 15 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants