[pve-devel] [PATCH RFC manager] ceph: disallow ipv4 in new cluster when ipv6 is enabled

Dominik Csapak d.csapak at proxmox.com
Wed Jun 26 13:16:25 CEST 2019


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 at proxmox.com>
---
i am not really sure if this makes sense this way, or if we should
let the admin make this choice somehow

either way the current state is broken when using ipv6, since
osds will not start, with the only hint in the syslog

 PVE/API2/Ceph/MON.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/PVE/API2/Ceph/MON.pm b/PVE/API2/Ceph/MON.pm
index d86df30b..6ca45e5b 100644
--- a/PVE/API2/Ceph/MON.pm
+++ b/PVE/API2/Ceph/MON.pm
@@ -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");
 		    }
-- 
2.20.1





More information about the pve-devel mailing list