Merge "Allow usage of duplicated IPs for undercloud config"
This commit is contained in:
commit
ecb55f2e90
|
@ -322,18 +322,14 @@ class TestNetworkSettings(TestBaseNetworkSettings):
|
|||
undercloud_admin_host='192.168.24.3',
|
||||
undercloud_public_host='192.168.24.1',
|
||||
generate_service_certificate=True)
|
||||
self.assertRaises(exceptions.InvalidConfiguration,
|
||||
undercloud_config._process_network_args,
|
||||
env)
|
||||
undercloud_config._process_network_args(env)
|
||||
|
||||
# undercloud_admin_host == undercloud_public_host
|
||||
self.conf.config(local_ip='192.168.24.1/24',
|
||||
undercloud_admin_host='192.168.24.2',
|
||||
undercloud_public_host='192.168.24.2',
|
||||
generate_service_certificate=True)
|
||||
self.assertRaises(exceptions.InvalidConfiguration,
|
||||
undercloud_config._process_network_args,
|
||||
env)
|
||||
undercloud_config._process_network_args(env)
|
||||
|
||||
# We do not care about ip duplication when ssl is disabled
|
||||
self.conf.config(local_ip='192.168.24.1/24',
|
||||
|
|
|
@ -408,15 +408,9 @@ def _process_network_args(env):
|
|||
# value here.
|
||||
if (CONF.get('generate_service_certificate') or
|
||||
CONF.get('undercloud_service_certificate')):
|
||||
undercloud_ips = [
|
||||
CONF.local_ip.split('/')[0],
|
||||
CONF.undercloud_admin_host,
|
||||
CONF.undercloud_public_host
|
||||
]
|
||||
if len(undercloud_ips) != len(set(undercloud_ips)):
|
||||
msg = ("The same IP is used for multiple endpoints. Please use "
|
||||
"unique ips for local_ip, undercloud_admin_host and "
|
||||
"undercloud_public_host")
|
||||
if CONF.local_ip.split('/')[0] == CONF.undercloud_admin_host:
|
||||
msg = ("Different IPs should be assigned to local_ip and "
|
||||
"undercloud_admin_host")
|
||||
raise exceptions.InvalidConfiguration(msg)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue