Network space aware address for cluster relation
Use the get_relation_ip function for selecting addresses for the cluster relationship. Including overrides for the admin, internal, and public config settings or extra bindings. Change-Id: I6d92523be1707549751d7153cd395f7bae217952 Partial-Bug: #1687439
This commit is contained in:
parent
8b066b7eab
commit
d62a2e75c3
|
@ -146,8 +146,6 @@ from charmhelpers.contrib.openstack.ip import (
|
|||
from charmhelpers.contrib.network.ip import (
|
||||
get_iface_for_address,
|
||||
get_netmask_for_address,
|
||||
get_address_in_network,
|
||||
get_ipv6_addr,
|
||||
is_ipv6,
|
||||
get_relation_ip,
|
||||
)
|
||||
|
@ -559,15 +557,13 @@ def cluster_joined(rid=None, ssl_sync_request=True):
|
|||
settings = {}
|
||||
|
||||
for addr_type in ADDRESS_TYPES:
|
||||
address = get_address_in_network(
|
||||
config('os-{}-network'.format(addr_type))
|
||||
)
|
||||
address = get_relation_ip(
|
||||
addr_type,
|
||||
cidr_network=config('os-{}-network'.format(addr_type)))
|
||||
if address:
|
||||
settings['{}-address'.format(addr_type)] = address
|
||||
|
||||
if config('prefer-ipv6'):
|
||||
private_addr = get_ipv6_addr(exc_list=[config('vip')])[0]
|
||||
settings['private-address'] = private_addr
|
||||
settings['private-address'] = get_relation_ip('cluster')
|
||||
|
||||
relation_set(relation_id=rid, relation_settings=settings)
|
||||
|
||||
|
|
|
@ -102,7 +102,6 @@ TO_PATCH = [
|
|||
# ip
|
||||
'get_iface_for_address',
|
||||
'get_netmask_for_address',
|
||||
'get_address_in_network',
|
||||
'git_install',
|
||||
'is_service_present',
|
||||
'delete_service_entry',
|
||||
|
|
Loading…
Reference in New Issue