Merge "Ceph monitor host is able to lock when only 2 monitors are avilable"

This commit is contained in:
Zuul 2022-06-18 13:33:51 +00:00 committed by Gerrit Code Review
commit 9bf7cbb488

View File

@ -591,11 +591,10 @@ def check_node_lock_ceph_mon(ihost, force=False, ceph_helper=None):
ceph_helper.get_monitors_status(pecan.request.dbapi)
is_in_active_monitors = ihost['hostname'] in active_monitors
host_has_last_mon = num_monitors == 1 and is_in_active_monitors
if (num_monitors < required_monitors and
not force and is_in_active_monitors or
host_has_last_mon):
if (num_monitors <= required_monitors
and is_in_active_monitors
and not force):
raise wsme.exc.ClientSideError(_(
"Only %d storage "
"monitor available. At least %d unlocked and "