Bug 1940957

Summary: Deletion of Rejected NamespaceStore is stuck even when target bucket and bucketclass are deleted
Product: [Red Hat Storage] Red Hat OpenShift Container Storage Reporter: Filip Balák <fbalak>
Component: Multi-Cloud Object GatewayAssignee: Romy Ayalon <rayalon>
Status: CLOSED ERRATA QA Contact: Filip Balák <fbalak>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.7CC: ebenahar, etamir, muagarwa, nbecker, ocs-bugs
Target Milestone: ---   
Target Release: OCS 4.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 4.7.0-336.ci Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-19 09:20:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Filip Balák 2021-03-19 16:02:12 UTC
Description of problem (please be detailed as possible and provide log
snippests):
User creates NamespaceStore and use it in bucketclass and Namespace bucket. User tries to delete the NamespaceStore but the Namespacestore becomes Rejected. User sees from messages in NamespaceStore yaml that the store is not deleted because it's used in bucket:
  DeleteNamespaceResourceAPI cannot complete because namespace store "aws-ns-store-e6f984d1b526484292723bdf557" has buckets attached

The NamespaceStore can not be deleted from UI (kebab menu is grey and unavailable) or from cli (command gets stuck and is not responding). When user deletes target bucket and bucketclass then the NamespaceStore is still stuck and still can not be deleted via UI or cli.

Version of all relevant components (if applicable):
ocs-operator.v4.7.0-286.ci

Is there any workaround available to the best of your knowledge?
When target_bucket in yaml is set to non-existent bucket (when in Rejeckted state) then deletion successfully continues.

Rate from 1 - 5 the complexity of the scenario you performed that caused this
bug (1 - very simple, 5 - very complex)?
2

Can this issue reproducible?
yes

Steps to Reproduce:
1. Create NamespaceStore.
2. Create Bucketclass that uses created NamespaceStore.
3. Create Namespace Bucket that uses created Bucketclass.
4. Try to delete the NamespaceStore.
5. Check status of NamespaStore.
6. Delete Namespace Bucket.
7. Delete Bucketclass.
Try to delete NamespaceStore again.

Actual results:
Command for NamespaceStore deletion is stuck. Conditions messages still show:
  DeleteNamespaceResourceAPI cannot complete because namespace store "<name of the NamespaceStore>" has buckets attached

Expected results:
When problem from Conditions status messages is resolved, deletion of NamespaceStore should be resumed or user should be able to initiate deletion again.

Additional info:

Comment 4 Filip Balák 2021-04-12 10:51:46 UTC
NamespaceStore deletion is resumed when bucket and bucketclass are deleted. --> VERIFIED

Tested with:
ocs-operator.v4.7.0-344.ci

Comment 7 errata-xmlrpc 2021-05-19 09:20:45 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Red Hat OpenShift Container Storage 4.7.0 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:2041