From 8ecaa0bfbe0eaf2ccf8ad79d6a20639c01bd55a4 Mon Sep 17 00:00:00 2001 From: Fabian Ebner Date: Mon, 10 May 2021 14:18:20 +0200 Subject: [PATCH] api: ceph: create mon: explicitly add subsequent monitors to the monmap in preparation for supporting multiple addresses. The config section does not allow more than one public_addr. Reviewed-by: Dominik Csapak Tested-by: Dominik Csapak Signed-off-by: Fabian Ebner --- PVE/API2/Ceph/MON.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PVE/API2/Ceph/MON.pm b/PVE/API2/Ceph/MON.pm index 7a72cd37..24318a36 100644 --- a/PVE/API2/Ceph/MON.pm +++ b/PVE/API2/Ceph/MON.pm @@ -272,7 +272,6 @@ __PACKAGE__->register_method ({ my $monmaptool_cmd = [ 'monmaptool', - '--create', '--clobber', '--addv', $monid, @@ -284,7 +283,9 @@ __PACKAGE__->register_method ({ if (defined($rados)) { # we can only have a RADOS object if we have a monitor my $mapdata = $rados->mon_command({ prefix => 'mon getmap', format => 'plain' }); file_set_contents($monmap, $mapdata); + run_command($monmaptool_cmd); } else { # we need to create a monmap for the first monitor + push @{$monmaptool_cmd}, '--create'; run_command($monmaptool_cmd); }