From bf348d8f97f56613098ebba2fafb38cc3f55570f Mon Sep 17 00:00:00 2001 From: Ade Lee Date: Fri, 22 May 2020 10:45:48 -0400 Subject: [PATCH] Deprecate novajoin We are deprecating and removing novajoin in Victoria. Lets remove the config option and add a service to clean it up on the undercloud Depends-On: I7803cccc4b4bf8c7cc201372ec91f9254cef7eb3 Change-Id: I8d4af24337ff8123b3d9899982033df05470cc22 --- tripleoclient/config/undercloud.py | 3 +-- .../v1/undercloud/test_install_upgrade.py | 25 +++++++++++++++++-- tripleoclient/v1/undercloud_config.py | 15 ++++++++--- 3 files changed, 35 insertions(+), 8 deletions(-) diff --git a/tripleoclient/config/undercloud.py b/tripleoclient/config/undercloud.py index 38fd0315a..12fdb25c6 100644 --- a/tripleoclient/config/undercloud.py +++ b/tripleoclient/config/undercloud.py @@ -293,8 +293,7 @@ class UndercloudConfig(StandaloneConfig): default='', help=_( 'One Time Password to register Undercloud node ' - 'with an IPA server. Required when ' - 'enable_novajoin = True.') + 'with an IPA server.') ), cfg.BoolOpt('ipxe_enabled', default=True, diff --git a/tripleoclient/tests/v1/undercloud/test_install_upgrade.py b/tripleoclient/tests/v1/undercloud/test_install_upgrade.py index 7fa7b8f8e..f7ab68643 100644 --- a/tripleoclient/tests/v1/undercloud/test_install_upgrade.py +++ b/tripleoclient/tests/v1/undercloud/test_install_upgrade.py @@ -93,6 +93,8 @@ class TestUndercloudInstall(TestPluginV1): '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/ironic-inspector.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' + 'services/undercloud-remove-novajoin.yaml', '-e', + '/usr/share/openstack-tripleo-heat-templates/environments/' 'disable-telemetry.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/tempest.yaml', '-e', @@ -157,6 +159,8 @@ class TestUndercloudInstall(TestPluginV1): '/home/stack/foo.yaml', '-e', '/usertht/environments/services/ironic.yaml', '-e', '/usertht/environments/services/ironic-inspector.yaml', '-e', + '/usertht/environments/services/' + 'undercloud-remove-novajoin.yaml', '-e', '/usertht/environments/' 'disable-telemetry.yaml', '-e', '/usertht/environments/services/tempest.yaml', '-e', @@ -320,6 +324,8 @@ class TestUndercloudInstall(TestPluginV1): '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/ironic-inspector.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' + 'services/undercloud-remove-novajoin.yaml', '-e', + '/usr/share/openstack-tripleo-heat-templates/environments/' 'disable-telemetry.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/tempest.yaml', '-e', @@ -387,6 +393,8 @@ class TestUndercloudInstall(TestPluginV1): '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/ironic-inspector.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' + 'services/undercloud-remove-novajoin.yaml', '-e', + '/usr/share/openstack-tripleo-heat-templates/environments/' 'disable-telemetry.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/tempest.yaml', '-e', @@ -450,6 +458,8 @@ class TestUndercloudInstall(TestPluginV1): '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/ironic-inspector.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' + 'services/undercloud-remove-novajoin.yaml', '-e', + '/usr/share/openstack-tripleo-heat-templates/environments/' 'disable-telemetry.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/tempest.yaml', '-e', @@ -510,6 +520,8 @@ class TestUndercloudInstall(TestPluginV1): '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/ironic-inspector.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' + 'services/undercloud-remove-novajoin.yaml', '-e', + '/usr/share/openstack-tripleo-heat-templates/environments/' 'disable-telemetry.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/tempest.yaml', '-e', @@ -674,11 +686,12 @@ class TestUndercloudUpgrade(TestPluginV1): '/usr/share/openstack-tripleo-heat-templates/environments/' 'podman.yaml', '-e', '/home/stack/foo.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' - 'services/ironic.yaml', - '-e', + 'services/ironic.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/ironic-inspector.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' + 'services/undercloud-remove-novajoin.yaml', '-e', + '/usr/share/openstack-tripleo-heat-templates/environments/' 'disable-telemetry.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/tempest.yaml', '-e', @@ -746,6 +759,8 @@ class TestUndercloudUpgrade(TestPluginV1): '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/ironic-inspector.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' + 'services/undercloud-remove-novajoin.yaml', '-e', + '/usr/share/openstack-tripleo-heat-templates/environments/' 'disable-telemetry.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/tempest.yaml', '-e', @@ -812,6 +827,8 @@ class TestUndercloudUpgrade(TestPluginV1): '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/ironic-inspector.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' + 'services/undercloud-remove-novajoin.yaml', '-e', + '/usr/share/openstack-tripleo-heat-templates/environments/' 'disable-telemetry.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/tempest.yaml', '-e', @@ -876,6 +893,8 @@ class TestUndercloudUpgrade(TestPluginV1): '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/ironic-inspector.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' + 'services/undercloud-remove-novajoin.yaml', '-e', + '/usr/share/openstack-tripleo-heat-templates/environments/' 'disable-telemetry.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/tempest.yaml', '-e', @@ -946,6 +965,8 @@ class TestUndercloudUpgrade(TestPluginV1): '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/ironic-inspector.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' + 'services/undercloud-remove-novajoin.yaml', '-e', + '/usr/share/openstack-tripleo-heat-templates/environments/' 'disable-telemetry.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/tempest.yaml', '-e', diff --git a/tripleoclient/v1/undercloud_config.py b/tripleoclient/v1/undercloud_config.py index 97bfa237f..f4fde9e43 100644 --- a/tripleoclient/v1/undercloud_config.py +++ b/tripleoclient/v1/undercloud_config.py @@ -619,14 +619,21 @@ def prepare_undercloud_deploy(upgrade=False, no_validations=True, tht_templates, "environments/services/mistral.yaml")] if CONF.get('enable_novajoin'): - deploy_args += ['-e', os.path.join( - tht_templates, "environments/services/novajoin.yaml")] - env_data['NovajoinIpaOtp'] = CONF['ipa_otp'] - elif CONF.get('ipa_otp'): + LOG.warning('Novajoin has been deprecated and no longer be installed ' + 'using the enable_novajoin option. Please remove it from ' + 'undercloud.conf. TLS Everywhere is now implemented ' + 'using an ansible module instead.') + + if CONF.get('ipa_otp'): deploy_args += ['-e', os.path.join( tht_templates, "environments/services/undercloud-tls.yaml")] env_data['UndercloudIpaOtp'] = CONF['ipa_otp'] + # add service to remove novajoin containers + deploy_args += ['-e', os.path.join( + tht_templates, 'environments/services/undercloud-remove-novajoin.yaml') + ] + if CONF.get('enable_zaqar'): deploy_args += ['-e', os.path.join( tht_templates, "environments/services/zaqar-swift-backend.yaml")]