mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-13 17:45:15 +00:00
ceph: mon create: fix not starting monitor if no public_addr is in conf
when there is no 'public_network' in the config, the monitor can only find an ip if it is given explicitly, either via commandline (not possible with systemd) or via the ceph.conf Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
696a8cac2d
commit
78f99813bb
@ -265,6 +265,11 @@ __PACKAGE__->register_method ({
|
||||
my $monhost = $cfg->{global}->{mon_host} // "";
|
||||
$monhost .= " $ip";
|
||||
$cfg->{global}->{mon_host} = $monhost;
|
||||
if (!defined($cfg->{global}->{public_network})) {
|
||||
# if there is no info about the public_network
|
||||
# we have to set it explicitely for the monitor
|
||||
$cfg->{$monsection}->{public_addr} = $ip;
|
||||
}
|
||||
|
||||
cfs_write_file('ceph.conf', $cfg);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user