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: CLOSED ERRATA QA Contact: Vinayak Papnoi <vpapnoi>
Severity: medium Docs Contact: Rivka Pollack <rpollack>
Priority: medium    
Version: 5.1CC: adking, akraj, cephqe-warriors, kdreyer, mhackett, saraut, vpapnoi
Target Milestone: ---   
Target Release: 7.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ceph-18.2.0-1 Doc Type: Enhancement
Doc Text:
.Users can now put a host into maintenance mode despite the possibility of losing data Previously, users could not put a host into maintenance mode as stopping all the daemons on that host would cause data unavailability. With this enhancement, a stronger force flag for the `ceph orch host maintenance enter` command called `--yes-i-really-mean-it` is added. Users can now put a host into maintenance mode, even when Cephadm warns against it.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-12-13 15:18:58 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:
Bug Depends On:    
Bug Blocks: 2237662    

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:

Comment 21 errata-xmlrpc 2023-12-13 15:18:58 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 (Red Hat Ceph Storage 7.0 Bug Fix 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/RHBA-2023:7780