Browse Source

Merge "Remove leftover for undercloud keepalived service"

changes/57/787157/2
Zuul 2 weeks ago
committed by Gerrit Code Review
parent
commit
9c4217725c
2 changed files with 13 additions and 58 deletions
  1. +11
    -32
      tripleoclient/tests/v1/undercloud/test_install_upgrade.py
  2. +2
    -26
      tripleoclient/v1/undercloud_config.py

+ 11
- 32
tripleoclient/tests/v1/undercloud/test_install_upgrade.py View File

@ -102,9 +102,7 @@ class TestUndercloudInstall(TestPluginV1):
'/usr/share/openstack-tripleo-heat-templates/environments/'
'ssl/tls-endpoints-public-ip.yaml', '-e',
'/usr/share/openstack-tripleo-heat-templates/environments/'
'services/undercloud-haproxy.yaml', '-e',
'/usr/share/openstack-tripleo-heat-templates/environments/'
'services/undercloud-keepalived.yaml',
'services/undercloud-haproxy.yaml',
# TODO(cjeanner) drop once we have proper oslo.privsep
'--deployment-user', 'stack',
'--output-dir=/home/stack', '--cleanup',
@ -163,8 +161,7 @@ class TestUndercloudInstall(TestPluginV1):
'--public-virtual-ip', '192.168.24.2',
'--control-virtual-ip', '192.168.24.3', '-e',
'/usertht/environments/ssl/tls-endpoints-public-ip.yaml', '-e',
'/usertht/environments/services/undercloud-haproxy.yaml', '-e',
'/usertht/environments/services/undercloud-keepalived.yaml',
'/usertht/environments/services/undercloud-haproxy.yaml',
# TODO(cjeanner) drop once we have proper oslo.privsep
'--deployment-user', 'stack',
'--output-dir=/foo', '--cleanup', '-e',
@ -328,9 +325,7 @@ class TestUndercloudInstall(TestPluginV1):
'/usr/share/openstack-tripleo-heat-templates/environments/'
'ssl/tls-endpoints-public-ip.yaml', '-e',
'/usr/share/openstack-tripleo-heat-templates/environments/'
'services/undercloud-haproxy.yaml', '-e',
'/usr/share/openstack-tripleo-heat-templates/environments/'
'services/undercloud-keepalived.yaml',
'services/undercloud-haproxy.yaml',
# TODO(cjeanner) drop once we have proper oslo.privsep
'--deployment-user', 'stack',
'--output-dir=/home/stack',
@ -394,9 +389,7 @@ class TestUndercloudInstall(TestPluginV1):
'/usr/share/openstack-tripleo-heat-templates/environments/'
'ssl/tls-endpoints-public-ip.yaml', '-e',
'/usr/share/openstack-tripleo-heat-templates/environments/'
'services/undercloud-haproxy.yaml', '-e',
'/usr/share/openstack-tripleo-heat-templates/environments/'
'services/undercloud-keepalived.yaml',
'services/undercloud-haproxy.yaml',
# TODO(cjeanner) drop once we have proper oslo.privsep
'--deployment-user', 'stack',
'--output-dir=/home/stack', '--cleanup',
@ -456,9 +449,7 @@ class TestUndercloudInstall(TestPluginV1):
'/usr/share/openstack-tripleo-heat-templates/environments/'
'ssl/tls-endpoints-public-ip.yaml', '-e',
'/usr/share/openstack-tripleo-heat-templates/environments/'
'services/undercloud-haproxy.yaml', '-e',
'/usr/share/openstack-tripleo-heat-templates/environments/'
'services/undercloud-keepalived.yaml',
'services/undercloud-haproxy.yaml',
# TODO(cjeanner) drop once we have proper oslo.privsep
'--deployment-user', 'stack',
'--output-dir=/home/stack', '--cleanup',
@ -519,9 +510,7 @@ class TestUndercloudInstall(TestPluginV1):
'/usr/share/openstack-tripleo-heat-templates/environments/'
'ssl/tls-endpoints-public-ip.yaml', '-e',
'/usr/share/openstack-tripleo-heat-templates/environments/'
'services/undercloud-haproxy.yaml', '-e',
'/usr/share/openstack-tripleo-heat-templates/environments/'
'services/undercloud-keepalived.yaml',
'services/undercloud-haproxy.yaml',
'--deployment-user', 'stack',
'--output-dir=/home/stack', '--cleanup',
'-e', '/home/stack/tripleo-config-generated-env-files/'
@ -664,9 +653,7 @@ class TestUndercloudUpgrade(TestPluginV1):
'/usr/share/openstack-tripleo-heat-templates/environments/'
'ssl/tls-endpoints-public-ip.yaml', '-e',
'/usr/share/openstack-tripleo-heat-templates/environments/'
'services/undercloud-haproxy.yaml', '-e',
'/usr/share/openstack-tripleo-heat-templates/environments/'
'services/undercloud-keepalived.yaml',
'services/undercloud-haproxy.yaml',
# TODO(cjeanner) drop once we have proper oslo.privsep
'--deployment-user', 'stack',
'--output-dir=/home/stack', '--cleanup',
@ -730,9 +717,7 @@ class TestUndercloudUpgrade(TestPluginV1):
'/usr/share/openstack-tripleo-heat-templates/environments/'
'ssl/tls-endpoints-public-ip.yaml', '-e',
'/usr/share/openstack-tripleo-heat-templates/environments/'
'services/undercloud-haproxy.yaml', '-e',
'/usr/share/openstack-tripleo-heat-templates/environments/'
'services/undercloud-keepalived.yaml',
'services/undercloud-haproxy.yaml',
'--deployment-user', 'stack',
'--output-dir=/home/stack', '--cleanup',
'-e', '/home/stack/tripleo-config-generated-env-files/'
@ -795,9 +780,7 @@ class TestUndercloudUpgrade(TestPluginV1):
'/usr/share/openstack-tripleo-heat-templates/environments/'
'ssl/tls-endpoints-public-ip.yaml', '-e',
'/usr/share/openstack-tripleo-heat-templates/environments/'
'services/undercloud-haproxy.yaml', '-e',
'/usr/share/openstack-tripleo-heat-templates/environments/'
'services/undercloud-keepalived.yaml',
'services/undercloud-haproxy.yaml',
# TODO(cjeanner) drop once we have proper oslo.privsep
'--deployment-user', 'stack',
'--output-dir=/home/stack', '--cleanup',
@ -858,9 +841,7 @@ class TestUndercloudUpgrade(TestPluginV1):
'/usr/share/openstack-tripleo-heat-templates/environments/'
'ssl/tls-endpoints-public-ip.yaml', '-e',
'/usr/share/openstack-tripleo-heat-templates/environments/'
'services/undercloud-haproxy.yaml', '-e',
'/usr/share/openstack-tripleo-heat-templates/environments/'
'services/undercloud-keepalived.yaml',
'services/undercloud-haproxy.yaml',
# TODO(cjeanner) drop once we have proper oslo.privsep
'--deployment-user', 'stack',
'--output-dir=/home/stack', '--cleanup',
@ -927,9 +908,7 @@ class TestUndercloudUpgrade(TestPluginV1):
'/usr/share/openstack-tripleo-heat-templates/environments/'
'ssl/tls-endpoints-public-ip.yaml', '-e',
'/usr/share/openstack-tripleo-heat-templates/environments/'
'services/undercloud-haproxy.yaml', '-e',
'/usr/share/openstack-tripleo-heat-templates/environments/'
'services/undercloud-keepalived.yaml',
'services/undercloud-haproxy.yaml',
'--deployment-user', 'stack',
'--output-dir=/home/stack', '--cleanup',
'-e', '/home/stack/tripleo-config-generated-env-files/'


+ 2
- 26
tripleoclient/v1/undercloud_config.py View File

@ -721,41 +721,17 @@ def prepare_undercloud_deploy(upgrade=False, no_validations=True,
admin_ip = netaddr.IPAddress(admin_host)
deploy_args += ['--control-virtual-ip', admin_host]
if CONF.get('net_config_override', None):
if (admin_ip not in local_net.cidr):
LOG.warning('You may need to specify a custom '
'ControlVirtualInterface in a custom env file to '
'correctly assign the ip address to an interface '
'for undercloud_admin_host. By default it will be '
'set to br-ctlplane.')
if (public_ip not in local_net.cidr):
LOG.warning('You may need to specify a custom '
'PublicVirtualInterface in a custom env file to '
'correctly assign the ip address to an interface '
'for undercloud_public_host. By default it will be'
' set to br-ctlplane.')
else:
if not CONF.get('net_config_override', None):
if (admin_ip not in local_net.cidr or
public_ip not in local_net.cidr):
LOG.warning('undercloud_admin_host or undercloud_public_host '
'is not in the same cidr as local_ip.')
# Define the *VirtualInterfaces for keepalived. These are used when
# configuring the undercloud_*_host addresses. If these adddesses are
# not in the default cidr for the ctlplane, it will not be defined
# and leads to general sadness during the deployment. Our default
# net_config uses br-ctlplane. See rhbz#1737150
env_data['ControlVirtualInterface'] = 'br-ctlplane'
env_data['PublicVirtualInterface'] = 'br-ctlplane'
deploy_args += [
'-e', endpoint_environment,
'-e', os.path.join(
tht_templates,
'environments/services/undercloud-haproxy.yaml'),
'-e', os.path.join(
tht_templates,
'environments/services/undercloud-keepalived.yaml')]
'environments/services/undercloud-haproxy.yaml')]
u = CONF.get('deployment_user') or utils.get_deployment_user()
env_data['DeploymentUser'] = u


Loading…
Cancel
Save