in preparation for supporting multiple addresses. The config section does not
allow more than one public_addr.

Signed-off-by: Fabian Ebner <f.eb...@proxmox.com>
---
 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 0f9b30ba..6f232e34 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);
                    }
 
-- 
2.20.1



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to