]> git.proxmox.com Git - pve-manager.git/commitdiff
ceph: disallow ipv4 in new cluster when ipv6 is enabled
authorDominik Csapak <d.csapak@proxmox.com>
Wed, 26 Jun 2019 11:16:25 +0000 (13:16 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 28 Jun 2019 13:14:04 +0000 (15:14 +0200)
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>
PVE/API2/Ceph/MON.pm

index b8fde40e9c078b03b6c046b8358fdddce550d45d..e8963264b66262318367b53f198fc0f9bacb95b5 100644 (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");
                    }