mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-15 00:24:03 +00:00
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 <d.csapak@proxmox.com> Tested-by: Dominik Csapak <d.csapak@proxmox.com> Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
parent
57951fc78b
commit
8ecaa0bfbe
@ -272,7 +272,6 @@ __PACKAGE__->register_method ({
|
|||||||
|
|
||||||
my $monmaptool_cmd = [
|
my $monmaptool_cmd = [
|
||||||
'monmaptool',
|
'monmaptool',
|
||||||
'--create',
|
|
||||||
'--clobber',
|
'--clobber',
|
||||||
'--addv',
|
'--addv',
|
||||||
$monid,
|
$monid,
|
||||||
@ -284,7 +283,9 @@ __PACKAGE__->register_method ({
|
|||||||
if (defined($rados)) { # we can only have a RADOS object if we have a monitor
|
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' });
|
my $mapdata = $rados->mon_command({ prefix => 'mon getmap', format => 'plain' });
|
||||||
file_set_contents($monmap, $mapdata);
|
file_set_contents($monmap, $mapdata);
|
||||||
|
run_command($monmaptool_cmd);
|
||||||
} else { # we need to create a monmap for the first monitor
|
} else { # we need to create a monmap for the first monitor
|
||||||
|
push @{$monmaptool_cmd}, '--create';
|
||||||
run_command($monmaptool_cmd);
|
run_command($monmaptool_cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user