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
rgw: OBC is not removed if object store CR is in deleted state #10702
Comments
This is by design to prevent accidental data loss. You can remove the finalizer on the CR to force removal. Does that work for you? |
remove finalizer on the which CR? objectbucketclaim? If yes, then it will not work, i tried. Rook waits until real bucket is removed (i did that with radosgw-admin bucket rm ...) - then it continued deletion process. If remove finalizer for object store - no, that will not work. |
Rook intentionally doesn't delete object stores when buckets exist (including OBCs) to prevent data loss. It should be possible to remove the finalizer on the CephObjectStore to have the resource removed by Kubernetes. |
but just remove finalizer from cephojbectstore - it will not remove correctly objectstore from ceph itself, in case if ceph cluster itself is going be used, but without rgw |
That's correct. To safely remove the store, Rook requires the the user to remove all buckets. This prevents accidental data loss when users accidentally delete a resource or the whole namespace, giving them time to back up their cluster data. |
yes, my point is that when someone forgot to remove user/bucket (in my case bucket) it is impossible to properly continue remove process:
|
Ah, so you're seeing that rook won't delete the obc if the object store is already in a deleted state. In that case, agreed that rook should continue with the obc deletion. |
Agreed. The OBC should still attempt to delete, even if the object store is in deleting state. |
Exactly. Rook just looping over check bucket is still present in rgw and not checking that objectbucketclaim resource has now deletion timestamp. That's the case. |
The object store controller isn't aware of OBCs specifically. It only checks buckets. But if the OBC controller isn't deleting an OBC because the store is deleting, that is an issue. Are you seeing an issue with the OBC controller not removing a bucket? |
yep, for some reason it won't delete OBC when objectstore is also deleting |
@degorenko have u deleted the bucket from the backend before deleting OBC, then OBC deletion may stuck. Same happens if object store CR is deleted before removing OBC(checks for object store repeatedly) @travisn and @BlaineEXE do we need to handle the above situation gracefully for OBC CR deletion scenarios ?? |
I believe there are 2 distinct cases you outlined above. To make sure we are on the same page, I think the behavior we want is as follows: The underlying code that does deletion of buckets for OBCs should be idempotent. If the bucket doesn't exist, then the delete operation should be a success. If the CephObjectStore that an OBC references gets deleted forcibly, then we should allow the OBCs that reference it to be deleted gracefully. Does that sound right to you @thotz ? |
@BlaineEXE : Yeah above are the exact cases which I am referring to |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions. |
Is this a bug report or feature request?
Deviation from expected behavior:
CephObjectStore is not removed when objectbucketclaim resources are exists
Expected behavior:
CephObjectStore is removed
How to reproduce it (minimal and precise):
Create some objectbucketclaim resources, remove CephObjectStore.
Related ObjectBucketClaim resource is:
Rook version is 1.8.5
The text was updated successfully, but these errors were encountered: