ceph: disallow ipv4 in new cluster when ipv6 is enabled

ms_bind_ipv4 is default true and osds look for both
ipv6 and ipv4 addresses in cluster network/public network

since we only allow for one network each (which must be either
ipv4 or ipv6) we disallow ipv4 if ipv6 is detected

this fixes not starting osds on an ipv6 enabled, newly-setup cluster

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2019-06-26 13:16:25 +02:00 committed by Thomas Lamprecht
parent 78f99813bb
commit b8c37fdae1

View File

@ -247,6 +247,7 @@ __PACKAGE__->register_method ({
if (Net::IP::ip_is_ipv6($ip)) {
$monaddr = "[$ip]";
$cfg->{global}->{ms_bind_ipv6} = 'true';
$cfg->{global}->{ms_bind_ipv4} = 'false';
}
run_command("monmaptool --create --clobber --addv $monid '[v2:$monaddr:3300,v1:$monaddr:6789]' --print $monmap");
}