mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-05-28 12:11:05 +00:00
ceph: do not check ips if no network is configured
the network and the cluster network are optional in the ceph config and with 'pveceph init', so only check if we have an ip address from those networks if it is actually configured otherwise, the createosd call dies with an 'ip' error message even if it would work Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
5ae4718fbe
commit
a0ef509a66
@ -284,13 +284,15 @@ __PACKAGE__->register_method ({
|
||||
my $osd_network = $ceph_conf->{global}->{cluster_network};
|
||||
$osd_network //= $ceph_conf->{global}->{public_network}; # fallback
|
||||
|
||||
my $cluster_net_ips = PVE::Network::get_local_ip_from_cidr($osd_network);
|
||||
if (scalar(@$cluster_net_ips) < 1) {
|
||||
my $osd_net_obj = PVE::Network::IP_from_cidr($osd_network);
|
||||
my $osd_base_cidr = $osd_net_obj->{ip} . "/" . $osd_net_obj->{prefixlen};
|
||||
if ($osd_network) { # check only if something is configured
|
||||
my $cluster_net_ips = PVE::Network::get_local_ip_from_cidr($osd_network);
|
||||
if (scalar(@$cluster_net_ips) < 1) {
|
||||
my $osd_net_obj = PVE::Network::IP_from_cidr($osd_network);
|
||||
my $osd_base_cidr = $osd_net_obj->{ip} . "/" . $osd_net_obj->{prefixlen};
|
||||
|
||||
die "No address from ceph cluster network (${osd_base_cidr}) found on node '$nodename'. ".
|
||||
"Check your network config.\n";
|
||||
die "No address from ceph cluster network (${osd_base_cidr}) found on node '$nodename'. ".
|
||||
"Check your network config.\n";
|
||||
}
|
||||
}
|
||||
|
||||
# FIXME: rename params on next API compatibillity change (7.0)
|
||||
|
Loading…
Reference in New Issue
Block a user