@@ -91,9 +91,11 @@ def new(args):
ip = net.get_nonlocal_ip(host)
LOG.debug('Monitor %s at %s', name, ip)
mon_initial_members.append(name)
+ ms_ipv6 = False
try:
socket.inet_pton(socket.AF_INET6, ip)
mon_host.append("[" + ip + "]")
+ ms_ipv6 = True
except socket.error:
mon_host.append(ip)
@@ -106,6 +108,10 @@ def new(args):
cfg.set('global', 'mon initial members', ', '.join(mon_initial_members))
# no spaces here, see http://tracker.newdream.net/issues/3145
cfg.set('global', 'mon host', ','.join(mon_host))
+
+ if ms_ipv6 == True:
+ LOG.debug('Monitors are IPv6, binding Messenger traffic on IPv6')
+ cfg.set('global', 'ms bind ipv6', 'true')
# override undesirable defaults, needed until bobtail
Signed-off-by: Wido den Hollander <wido@widodh.nl> --- ceph_deploy/new.py | 6 ++++++ 1 file changed, 6 insertions(+)