From 0faa33a6b07f711054ebd8deeaad34a1704745b6 Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Mon, 5 Aug 2019 09:49:57 -0600 Subject: [PATCH] Disable telemetry if it's not enabled The disable-telemetry.yaml environment is used to disable all the telemetry services and to disable the notification drivers. Since we didn't have this by default, notifications were still being sent to the undercloud rabbitmq and never consumed. Change-Id: I53eab2c41c80f5dafff9824bf3086e1d9a369e22 Closes-Bug: #1838828 --- .../v1/undercloud/test_install_upgrade.py | 22 +++++++++++++++++++ tripleoclient/v1/undercloud_config.py | 3 +++ 2 files changed, 25 insertions(+) diff --git a/tripleoclient/tests/v1/undercloud/test_install_upgrade.py b/tripleoclient/tests/v1/undercloud/test_install_upgrade.py index a284441c2..1f8d82cef 100644 --- a/tripleoclient/tests/v1/undercloud/test_install_upgrade.py +++ b/tripleoclient/tests/v1/undercloud/test_install_upgrade.py @@ -95,6 +95,8 @@ class TestUndercloudInstall(TestPluginV1): '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/zaqar-swift-backend.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' + 'disable-telemetry.yaml', '-e', + '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/tempest.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' 'public-tls-undercloud.yaml', @@ -157,6 +159,8 @@ class TestUndercloudInstall(TestPluginV1): '/usertht/environments/services/ironic-inspector.yaml', '-e', '/usertht/environments/services/mistral.yaml', '-e', '/usertht/environments/services/zaqar-swift-backend.yaml', '-e', + '/usertht/environments/' + 'disable-telemetry.yaml', '-e', '/usertht/environments/services/tempest.yaml', '-e', '/usertht/environments/public-tls-undercloud.yaml', '--public-virtual-ip', '192.168.24.2', @@ -320,6 +324,8 @@ class TestUndercloudInstall(TestPluginV1): '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/zaqar-swift-backend.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' + 'disable-telemetry.yaml', '-e', + '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/tempest.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' 'public-tls-undercloud.yaml', @@ -387,6 +393,8 @@ class TestUndercloudInstall(TestPluginV1): '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/zaqar-swift-backend.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' + 'disable-telemetry.yaml', '-e', + '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/tempest.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' 'public-tls-undercloud.yaml', @@ -450,6 +458,8 @@ class TestUndercloudInstall(TestPluginV1): '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/zaqar-swift-backend.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' + 'disable-telemetry.yaml', '-e', + '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/tempest.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' 'public-tls-undercloud.yaml', @@ -510,6 +520,8 @@ class TestUndercloudInstall(TestPluginV1): '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/zaqar-swift-backend.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' + 'disable-telemetry.yaml', '-e', + '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/tempest.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/barbican.yaml', '-e', @@ -594,6 +606,8 @@ class TestUndercloudUpgrade(TestPluginV1): '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/zaqar-swift-backend.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' + 'disable-telemetry.yaml', '-e', + '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/tempest.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' 'public-tls-undercloud.yaml', @@ -657,6 +671,8 @@ class TestUndercloudUpgrade(TestPluginV1): '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/zaqar-swift-backend.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' + 'disable-telemetry.yaml', '-e', + '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/tempest.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' 'public-tls-undercloud.yaml', @@ -719,6 +735,8 @@ class TestUndercloudUpgrade(TestPluginV1): '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/zaqar-swift-backend.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' + 'disable-telemetry.yaml', '-e', + '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/tempest.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' 'public-tls-undercloud.yaml', @@ -781,6 +799,8 @@ class TestUndercloudUpgrade(TestPluginV1): '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/zaqar-swift-backend.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' + 'disable-telemetry.yaml', '-e', + '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/tempest.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' 'public-tls-undercloud.yaml', @@ -847,6 +867,8 @@ class TestUndercloudUpgrade(TestPluginV1): '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/zaqar-swift-backend.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' + 'disable-telemetry.yaml', '-e', + '/usr/share/openstack-tripleo-heat-templates/environments/' 'services/tempest.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' 'public-tls-undercloud.yaml', diff --git a/tripleoclient/v1/undercloud_config.py b/tripleoclient/v1/undercloud_config.py index 8b2ab2321..a4097c9c6 100644 --- a/tripleoclient/v1/undercloud_config.py +++ b/tripleoclient/v1/undercloud_config.py @@ -559,6 +559,9 @@ def prepare_undercloud_deploy(upgrade=False, no_validations=False, if CONF.get('enable_telemetry'): for env_file in TELEMETRY_DOCKER_ENV_YAML: deploy_args += ['-e', os.path.join(tht_templates, env_file)] + else: + deploy_args += ['-e', os.path.join( + tht_templates, "environments/disable-telemetry.yaml")] if CONF.get('enable_cinder'): deploy_args += ['-e', os.path.join(