Disable VIP validation when UI is enabled

The UI needs to be accessible from outside the undercloud, which in
many cases means it can't be listening on the provisioning network
because that network is often not routable.

This is somewhat unfortunate because we also have reports that
moving the VIP outside the provisioning network can break
installation[1], but we have two conflicting requirements here and
the UI takes precedence.  Hopefully if the referenced bug reoccurs
as a result of this change we can investigate further and find a
way to validate that doesn't break the UI.

Change-Id: If4e77e3b6fc8444569c2a4672bd270e249436a73
1: https://bugzilla.redhat.com/show_bug.cgi?id=1268451
Closes-Bug: 1668180
(cherry picked from commit dc14935f9f)
(cherry picked from commit e32b025a8c)
This commit is contained in:
Ben Nemec 2017-03-23 15:23:28 +00:00
parent e98bad554b
commit d6ce48f646
2 changed files with 6 additions and 1 deletions

View File

@ -119,3 +119,8 @@ class TestValidator(base.BaseTestCase):
save_params = dict(params)
validator.validate_config(params, lambda x: None)
self.assertEqual(save_params, params)
def test_allow_all_with_ui(self):
self.conf.config(undercloud_admin_vip='10.0.0.10',
generate_service_certificate=True,
enable_ui=True)

View File

@ -76,7 +76,7 @@ def _validate_in_cidr(params, error_callback):
params['inspection_end'] = inspection_iprange[1]
validate_addr_in_cidr(params, 'just_local_ip', 'local_ip')
validate_addr_in_cidr(params, 'network_gateway')
if params['undercloud_service_certificate']:
if params['undercloud_service_certificate'] and not params['enable_ui']:
validate_addr_in_cidr(params, 'undercloud_public_vip')
validate_addr_in_cidr(params, 'undercloud_admin_vip')
validate_addr_in_cidr(params, 'dhcp_start')