Merge "Only validate admin and public host in local_subnet cidr"
This commit is contained in:
commit
4462be0aae
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Fixes a validation issue, validation would fail when multiple ctlplane
|
||||||
|
subnets were defined in ``undercloud.conf``.
|
||||||
|
`Bug: 1791088 <https://bugs.launchpad.net/tripleo/+bug/1791088>`_.
|
@ -284,25 +284,25 @@ def _validate_in_cidr(subnet_props, subnet_name):
|
|||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise FailedValidation(message)
|
raise FailedValidation(message)
|
||||||
|
|
||||||
|
validate_addr_in_cidr(subnet_props.gateway, 'gateway')
|
||||||
|
validate_addr_in_cidr(subnet_props.dhcp_start, 'dhcp_start')
|
||||||
|
validate_addr_in_cidr(subnet_props.dhcp_end, 'dhcp_end')
|
||||||
if subnet_name == CONF.local_subnet:
|
if subnet_name == CONF.local_subnet:
|
||||||
validate_addr_in_cidr(str(netaddr.IPNetwork(CONF.local_ip).ip),
|
validate_addr_in_cidr(str(netaddr.IPNetwork(CONF.local_ip).ip),
|
||||||
'local_ip')
|
'local_ip')
|
||||||
validate_addr_in_cidr(subnet_props.gateway, 'gateway')
|
# NOTE(bnemec): The ui needs to be externally accessible, which means
|
||||||
# NOTE(bnemec): The ui needs to be externally accessible, which means in
|
# in many cases we can't have the public vip on the provisioning
|
||||||
# many cases we can't have the public vip on the provisioning network.
|
# network. In that case users are on their own to ensure they've picked
|
||||||
# In that case users are on their own to ensure they've picked valid
|
# valid values for the VIP hosts.
|
||||||
# values for the VIP hosts.
|
if ((CONF.undercloud_service_certificate or
|
||||||
if ((CONF.undercloud_service_certificate or
|
CONF.generate_service_certificate) and
|
||||||
CONF.generate_service_certificate) and
|
not CONF.enable_ui):
|
||||||
not CONF.enable_ui):
|
validate_addr_in_cidr(CONF['undercloud_public_host'],
|
||||||
validate_addr_in_cidr(CONF['undercloud_public_host'],
|
'undercloud_public_host',
|
||||||
'undercloud_public_host',
|
require_ip=False, log_only=True)
|
||||||
require_ip=False, log_only=True)
|
validate_addr_in_cidr(CONF['undercloud_admin_host'],
|
||||||
validate_addr_in_cidr(CONF['undercloud_admin_host'],
|
'undercloud_admin_host',
|
||||||
'undercloud_admin_host',
|
require_ip=False)
|
||||||
require_ip=False)
|
|
||||||
validate_addr_in_cidr(subnet_props.dhcp_start, 'dhcp_start')
|
|
||||||
validate_addr_in_cidr(subnet_props.dhcp_end, 'dhcp_end')
|
|
||||||
|
|
||||||
|
|
||||||
def _validate_dhcp_range(subnet_props):
|
def _validate_dhcp_range(subnet_props):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user