Bug 2119510

Summary: [4.9.z clone] OSD Removal template needs to expose option to force remove the OSD
Product: [Red Hat Storage] Red Hat OpenShift Data Foundation Reporter: Travis Nielsen <tnielsen>
Component: ocs-operatorAssignee: Subham Rai <srai>
Status: CLOSED DUPLICATE QA Contact: Itzhak <ikave>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.9CC: ebenahar, ikave, madam, nberry, ocs-bugs, odf-bz-bot, oviner, rcyriac, sheggodu, sostapov
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-22 16:27:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2027396    
Bug Blocks: 2119525    

Description Travis Nielsen 2022-08-18 17:21:09 UTC
This bug was initially created as a copy of Bug #2027826

I am copying this bug because: 



This bug was initially created as a copy of Bug #2026007

I am copying this bug because: 

An OCS operator update is needed to expose an option to force removal of an OSD if Ceph indicates the OSD is not safe-to-destroy.

If https://bugzilla.redhat.com/show_bug.cgi?id=2027396 is approved for 4.9.z, we will also need this for 4.9.z.


Description of problem (please be detailed as possible and provide log
snippets):
Use ceph 'osd safe-to-destroy' and 'osd ok-to-stop' feature in OSD purge job

[1] mgr: implement 'osd safe-to-destroy' and 'osd ok-to-stop' commands
     https://github.com/ceph/ceph/pull/16976 
     An osd is safe to destroy if
we have osd_stat for it
osd_stat indicates no pgs stored
all pgs are known
no pgs map to it
i.e., overall data durability will not be affected
An OSD is ok to stop if

we have the pg stats we need
no PGs will drop below min_size
i.e., availability won't be immediately compromised

Comment 3 Travis Nielsen 2022-08-22 13:44:36 UTC
The fix is already in 4.10 and newer. Moving this BZ back to 4.9 for approval on the backport along with the other BZs also to consider back to 4.6.z.

Comment 4 Travis Nielsen 2022-08-22 16:27:55 UTC
I see, there was some confusion about this specific BZ for 4.9. We will go with the other 4.9 BZ 2120260 that was already approved.

*** This bug has been marked as a duplicate of bug 2120260 ***

Comment 5 Red Hat Bugzilla 2023-12-08 04:30:10 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days