Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
This project is now read‑only. Starting Monday, February 2, please use https://ibm-ceph.atlassian.net/ for all bug tracking management.

Bug 2210969

Summary: [RFE] Provide option to Zap the OSDs on hosts when they are being drained for host removal
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Pawan <pdhiran>
Component: CephadmAssignee: Adam King <adking>
Status: CLOSED DUPLICATE QA Contact: Mohit Bisht <mobisht>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.1CC: cephqe-warriors
Target Milestone: ---Keywords: FutureFeature
Target Release: 6.1z1   
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: 2023-05-30 12:09:53 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 Pawan 2023-05-30 07:25:58 UTC
Description of problem:
Provide option to Zap the OSDs on hosts when they are being drained for host removal.

Currently, Supported command options only include --force option. If we have a --zap option along with the "drain" or "rm" command, it would be Great!



 Monitor commands:
 =================
orch host drain <hostname> [--force]                                                                                       drain all daemons from a host

 Monitor commands:
 =================
orch host rm <hostname> [--force] [--offline]


# ceph orch host drain dell-r640-077.dsal.lab.eng.tlv2.redhat.com
Scheduled to remove the following daemons from host 'dell-r640-077.dsal.lab.eng.tlv2.redhat.com'
type                 id
-------------------- ---------------
ceph-exporter        dell-r640-077
node-exporter        dell-r640-077
mon                  dell-r640-077
osd                  1
osd                  100
osd                  107
osd                  116
osd                  124
osd                  132
osd                  139
osd                  18
osd                  26
osd                  34
osd                  42
osd                  50
osd                  58
osd                  66
osd                  75
osd                  83
osd                  9
osd                  91
rgw                  rgw.1.dell-r640-077.xhojsy



Post running the drain command on a host, we can see that all OSDs on that host are scheduled for removal, but not zapped. 

[root@dell-r640-061 ~]# ceph orch osd rm status
OSD  HOST                                        STATE     PGS  REPLACE  FORCE  ZAP    DRAIN STARTED AT
1    dell-r640-077.dsal.lab.eng.tlv2.redhat.com  started    48  False    False  False
9    dell-r640-077.dsal.lab.eng.tlv2.redhat.com  started    43  False    False  False
18   dell-r640-077.dsal.lab.eng.tlv2.redhat.com  started    55  False    False  False
26   dell-r640-077.dsal.lab.eng.tlv2.redhat.com  started    45  False    False  False
34   dell-r640-077.dsal.lab.eng.tlv2.redhat.com  started    51  False    False  False
42   dell-r640-077.dsal.lab.eng.tlv2.redhat.com  started    28  False    False  False
50   dell-r640-077.dsal.lab.eng.tlv2.redhat.com  started    49  False    False  False
58   dell-r640-077.dsal.lab.eng.tlv2.redhat.com  started    53  False    False  False
66   dell-r640-077.dsal.lab.eng.tlv2.redhat.com  started    52  False    False  False
75   dell-r640-077.dsal.lab.eng.tlv2.redhat.com  started    39  False    False  False
83   dell-r640-077.dsal.lab.eng.tlv2.redhat.com  started    51  False    False  False
91   dell-r640-077.dsal.lab.eng.tlv2.redhat.com  draining    7  False    False  False  2023-05-30 05:34:28.020006
100  dell-r640-077.dsal.lab.eng.tlv2.redhat.com  started    43  False    False  False
107  dell-r640-077.dsal.lab.eng.tlv2.redhat.com  started    43  False    False  False
116  dell-r640-077.dsal.lab.eng.tlv2.redhat.com  started    37  False    False  False
124  dell-r640-077.dsal.lab.eng.tlv2.redhat.com  draining   12  False    False  False  2023-05-30 05:34:29.035278
132  dell-r640-077.dsal.lab.eng.tlv2.redhat.com  started    42  False    False  False
139  dell-r640-077.dsal.lab.eng.tlv2.redhat.com  started    53  False    False  False

Version-Release number of selected component (if applicable):
any

How reproducible:
Always

Steps to Reproduce:
1. Deploy a RHCS cluster.
2. Schedule a node to be removed from the cluster.
3. The nodes that are drained, there is no option to Zap the OSDs ( all the OSDs on the host being removed )

Actual results:
OSDs on removed hosts are not cleaned up, as there is no option to zap OSDs with drain/ rm operations

Expected results:
Need option to Zap the OSDs with drain or rm operation.

Additional info:

Comment 1 Adam King 2023-05-30 12:09:53 UTC

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