[pve-devel] [PATCH manager v2 7/7] ceph: mon destroy: do not stop monitor ourselves
Dominik Csapak
d.csapak at proxmox.com
Wed Jun 19 13:45:54 CEST 2019
a 'mon remove' does this already for us, so do not stop it
this lead to a race where we could stop the next to the last monitor
before it was removed from the cluster, leading to a state
where two monitor were needed for quorum, but only one did exist
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
PVE/API2/Ceph/MON.pm | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/PVE/API2/Ceph/MON.pm b/PVE/API2/Ceph/MON.pm
index 036c6374..b7f9a8fa 100644
--- a/PVE/API2/Ceph/MON.pm
+++ b/PVE/API2/Ceph/MON.pm
@@ -349,11 +349,9 @@ __PACKAGE__->register_method ({
$assert_mon_can_remove->($monhash, $monlist, $monid, $mondir);
+ # this also stops the service
$rados->mon_command({ prefix => "mon remove", name => $monid, format => 'plain' });
- eval { PVE::Ceph::Services::ceph_service_cmd('stop', $monsection); };
- warn $@ if $@;
-
# delete section
delete $cfg->{$monsection};
--
2.11.0
More information about the pve-devel
mailing list