Exclues vip from get_ipv6_addr().
This commit is contained in:
parent
7551ee9b21
commit
bd86fc63a4
|
@ -414,10 +414,12 @@ class HAProxyContext(OSContextGenerator):
|
|||
|
||||
cluster_hosts = {}
|
||||
l_unit = local_unit().replace('/', '-')
|
||||
|
||||
if config('prefer-ipv6'):
|
||||
addr = get_ipv6_addr()[0]
|
||||
addr = get_ipv6_addr(exc_list=[config('vip')])[0]
|
||||
else:
|
||||
addr = unit_get('private-address')
|
||||
|
||||
cluster_hosts[l_unit] = get_address_in_network(config('os-internal-network'),
|
||||
addr)
|
||||
|
||||
|
|
|
@ -66,7 +66,10 @@ def resolve_address(endpoint_type=PUBLIC):
|
|||
resolved_address = vip
|
||||
else:
|
||||
if config('prefer-ipv6'):
|
||||
fallback_addr = get_ipv6_addr()
|
||||
list = []
|
||||
if config('vip'):
|
||||
list.append(config('vip'))
|
||||
fallback_addr = get_ipv6_addr(exc_list=list)[0]
|
||||
else:
|
||||
fallback_addr = unit_get(_address_map[endpoint_type]['fallback'])
|
||||
resolved_address = get_address_in_network(
|
||||
|
|
|
@ -147,7 +147,7 @@ def db_joined():
|
|||
raise Exception(e)
|
||||
|
||||
if config('prefer-ipv6'):
|
||||
host = get_ipv6_addr()[0]
|
||||
host = get_ipv6_addr(exc_list=[config('vip')])[0]
|
||||
else:
|
||||
host = unit_get('private-address')
|
||||
|
||||
|
@ -263,9 +263,9 @@ def neutron_plugin_api_relation_joined(rid=None):
|
|||
def cluster_changed():
|
||||
if config('prefer-ipv6'):
|
||||
for rid in relation_ids('cluster'):
|
||||
addr = get_ipv6_addr(exc_list=[config('vip')])[0]
|
||||
relation_set(relation_id=rid,
|
||||
relation_settings={'private-address':
|
||||
get_ipv6_addr()[0]})
|
||||
relation_settings={'private-address': addr})
|
||||
|
||||
CONFIGS.write_all()
|
||||
|
||||
|
|
Loading…
Reference in New Issue