Bug 2107339

Summary: [cephadm] ceph orch host maintenance enter ignores the --force flag
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Michael J. Kidd <linuxkidd>
Component: CephadmAssignee: Adam King <adking>
Status: POST --- QA Contact: Manasa <mgowri>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.1CC: adking, cephqe-warriors, mhackett, saraut
Target Milestone: ---   
Target Release: 7.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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 Michael J. Kidd 2022-07-14 18:41:16 UTC
Description of problem:
- In a degraded environment, supplied the --force flag, but the host still did not enter maintenance mode:

[root@mgmt-0 ~]# ceph orch host maintenance enter osds-0.ceph5t.lab.pnq2.cee.redhat.com --force
unsafe to stop osd(s) at this time (97 PGs are or would become offline)
Note: Warnings can be bypassed with the --force flag

Version-Release number of selected component (if applicable):
RHCS 5.1z1

How reproducible:
100%

Steps to Reproduce:
1. Set multiple OSD hosts into maintenance mode without allowing rebalance
2. Attempt to set another OSD host into maintenance mode using --force


Actual results:
[root@mgmt-0 ~]# ceph orch host maintenance enter osds-0.ceph5t.lab.pnq2.cee.redhat.com --force
unsafe to stop osd(s) at this time (97 PGs are or would become offline)
Note: Warnings can be bypassed with the --force flag

Expected results:
- Host to enter maintenance mode

Additional info: