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

core: Cleanup blockpool with annotation #14895

Merged
merged 1 commit into from
Oct 24, 2024
Merged

Conversation

Madhu-1
Copy link
Member

@Madhu-1 Madhu-1 commented Oct 23, 2024

This is similar to #14052 we did for radosnamespace and this is an extension to support cleanup at the blockpool level to cleanup the images and the snapshots in a pool.

Motive:- I saw an issue where users are using scripts to cleanup the resources, I thought it's better to have the functionality in Rook itself.

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the developer guide.
  • Reviewed the developer guide on Submitting a Pull Request
  • Pending release notes updated with breaking and/or notable changes for the next minor release.
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.

Note:- I tried to keep the changes minimal as much as possible and reuse whatever we have for the rados namespace cleanup (with little modification)

If this is good, i would like to do one final round of testing before merging.

@Madhu-1 Madhu-1 requested review from travisn and sp98 October 23, 2024 10:17
This is similar to rook#14052 we did for radosnamespace
and this is an extension to support cleanup
at the blockpool level to cleanup the images
and the snapshots in a pool.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
Copy link
Member

@travisn travisn left a comment

Choose a reason for hiding this comment

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

LGTM, will hold off approving until your testing is confirmed.

Next, do we need to clean up the CephFilesystem as well?

@Madhu-1
Copy link
Member Author

Madhu-1 commented Oct 24, 2024

[🎩︎]mrajanna@li-2cfbef4c-22d9-11b2-a85c-a3e4a93c405f rbd $]kuberc logs po/cleanup-cephblockpool-replicapool-r4p8x
2024/10/24 07:35:58 maxprocs: Leaving GOMAXPROCS=12: CPU quota undefined
2024-10-24 07:35:58.378460 I | rookcmd: starting Rook v1.15.0-alpha.0.292.g4e2971731-dirty with arguments '/usr/local/bin/rook ceph clean CephBlockPool'
2024-10-24 07:35:58.378489 I | rookcmd: flag values: 
2024-10-24 07:35:58.378954 I | cleanup: starting clean up of CephBlockPool "replicapool" resource
2024-10-24 07:35:58.378977 D | exec: Running command: rbd ls -l replicapool --cluster=rook-ceph --conf=/var/lib/rook/rook-ceph/rook-ceph.config --name=client.admin --keyring=/var/lib/rook/rook-ceph/client.admin.keyring --format json
2024-10-24 07:35:58.418423 I | cleanup: successfully cleaned up CephBlockPool "replicapool" resource
[🎩︎]mrajanna@li-2cfbef4c-22d9-11b2-a85c-a3e4a93c405f rbd $]kuberc get cephblockpool
NAME          PHASE   TYPE         FAILUREDOMAIN   AGE
builtin-mgr   Ready   Replicated   host            21m

Tested it, it works as expected

@Madhu-1
Copy link
Member Author

Madhu-1 commented Oct 24, 2024

LGTM, will hold off approving until your testing is confirmed.

Next, do we need to clean up the CephFilesystem as well?

@travisn i assume this is not required because we always use subvolumegroup and subvolume concept and we already have cleanup job for subvolumegroup

@Madhu-1 Madhu-1 requested a review from travisn October 24, 2024 07:39
@travisn
Copy link
Member

travisn commented Oct 24, 2024

LGTM, will hold off approving until your testing is confirmed.
Next, do we need to clean up the CephFilesystem as well?

@travisn i assume this is not required because we always use subvolumegroup and subvolume concept and we already have cleanup job for subvolumegroup

Yeah, that's probably sufficient. Though perhaps for consistency it could help on the CephFilesystem so that all subvolumegroups would be automatically cleaned up, instead of annotating each svg individually.

@travisn travisn merged commit 58df41e into rook:master Oct 24, 2024
56 checks passed
travisn added a commit that referenced this pull request Oct 24, 2024
core: Cleanup blockpool with annotation (backport #14895)
@Madhu-1
Copy link
Member Author

Madhu-1 commented Oct 28, 2024

LGTM, will hold off approving until your testing is confirmed.
Next, do we need to clean up the CephFilesystem as well?

@travisn i assume this is not required because we always use subvolumegroup and subvolume concept and we already have cleanup job for subvolumegroup

Yeah, that's probably sufficient. Though perhaps for consistency it could help on the CephFilesystem so that all subvolumegroups would be automatically cleaned up, instead of annotating each svg individually.

Yeah we could try that, let me see if i can take care of it.

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.

2 participants