From dfe826402b8216650d86a70bf2c3a6d478e9048b Mon Sep 17 00:00:00 2001 From: Lingxian Kong Date: Mon, 13 Jan 2020 15:43:02 +1300 Subject: [PATCH] Config admin clients as default Change-Id: Ib4dc349ab7ed4193189ed6bc2bae699d51064998 --- devstack/plugin.sh | 10 ---------- ...ed.yaml => ussuri-add-service-status-updated.yaml} | 0 .../notes/ussuri-admin-clients-a14514a835ae11ea.yaml | 11 +++++++++++ ...thy.yaml => ussuri-database-instance-healthy.yaml} | 0 ...l => ussuri-delete-datastoredad784e2345711ea.yaml} | 0 ...fig.yaml => ussuri-service-credential-config.yaml} | 0 trove/common/cfg.py | 8 ++++---- trove/tests/unittests/taskmanager/test_models.py | 2 +- 8 files changed, 16 insertions(+), 15 deletions(-) rename releasenotes/notes/{ussuri-03-add-service-status-updated.yaml => ussuri-add-service-status-updated.yaml} (100%) create mode 100644 releasenotes/notes/ussuri-admin-clients-a14514a835ae11ea.yaml rename releasenotes/notes/{ussuri-02-database-instance-healthy.yaml => ussuri-database-instance-healthy.yaml} (100%) rename releasenotes/notes/{ussuri-04-delete-datastoredad784e2345711ea.yaml => ussuri-delete-datastoredad784e2345711ea.yaml} (100%) rename releasenotes/notes/{ussuri-01-service-credential-config.yaml => ussuri-service-credential-config.yaml} (100%) diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 7529a05797..12b6330417 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -237,11 +237,6 @@ function configure_trove { iniset $TROVE_CONF DEFAULT taskmanager_manager trove.taskmanager.manager.Manager iniset $TROVE_CONF DEFAULT default_datastore $TROVE_DATASTORE_TYPE - iniset $TROVE_CONF DEFAULT remote_nova_client trove.common.clients_admin.nova_client_trove_admin - iniset $TROVE_CONF DEFAULT remote_cinder_client trove.common.clients_admin.cinder_client_trove_admin - iniset $TROVE_CONF DEFAULT remote_neutron_client trove.common.clients_admin.neutron_client_trove_admin - iniset $TROVE_CONF DEFAULT remote_glance_client trove.common.clients_admin.glance_client_trove_admin - iniset $TROVE_CONF cassandra tcp_ports 7000,7001,7199,9042,9160 iniset $TROVE_CONF couchbase tcp_ports 8091,8092,4369,11209-11211,21100-21199 iniset $TROVE_CONF couchdb tcp_ports 5984 @@ -275,11 +270,6 @@ function configure_trove { iniset $TROVE_GUESTAGENT_CONF service_credentials region_name $REGION_NAME iniset $TROVE_GUESTAGENT_CONF service_credentials auth_url $TROVE_AUTH_ENDPOINT - iniset $TROVE_GUESTAGENT_CONF DEFAULT remote_nova_client trove.common.clients_admin.nova_client_trove_admin - iniset $TROVE_GUESTAGENT_CONF DEFAULT remote_cinder_client trove.common.clients_admin.cinder_client_trove_admin - iniset $TROVE_GUESTAGENT_CONF DEFAULT remote_neutron_client trove.common.clients_admin.neutron_client_trove_admin - iniset $TROVE_GUESTAGENT_CONF DEFAULT remote_glance_client trove.common.clients_admin.glance_client_trove_admin - # 1. To avoid 'Connection timed out' error of sudo command inside the guest agent # 2. Config the controller IP address used by guest-agent to download Trove code during initialization (only valid for dev_mode=true). common_cloudinit=/etc/trove/cloudinit/common.cloudinit diff --git a/releasenotes/notes/ussuri-03-add-service-status-updated.yaml b/releasenotes/notes/ussuri-add-service-status-updated.yaml similarity index 100% rename from releasenotes/notes/ussuri-03-add-service-status-updated.yaml rename to releasenotes/notes/ussuri-add-service-status-updated.yaml diff --git a/releasenotes/notes/ussuri-admin-clients-a14514a835ae11ea.yaml b/releasenotes/notes/ussuri-admin-clients-a14514a835ae11ea.yaml new file mode 100644 index 0000000000..5d746df807 --- /dev/null +++ b/releasenotes/notes/ussuri-admin-clients-a14514a835ae11ea.yaml @@ -0,0 +1,11 @@ +--- +upgrade: + - | + Trove is now using admin clients by default to communicate with Nova, + Cinder, Neutron and Glance. Deployers want to stick to the old clients need + to explicitly config the following options: + + * remote_nova_client + * remote_cinder_client + * remote_neutron_client + * remote_glance_client diff --git a/releasenotes/notes/ussuri-02-database-instance-healthy.yaml b/releasenotes/notes/ussuri-database-instance-healthy.yaml similarity index 100% rename from releasenotes/notes/ussuri-02-database-instance-healthy.yaml rename to releasenotes/notes/ussuri-database-instance-healthy.yaml diff --git a/releasenotes/notes/ussuri-04-delete-datastoredad784e2345711ea.yaml b/releasenotes/notes/ussuri-delete-datastoredad784e2345711ea.yaml similarity index 100% rename from releasenotes/notes/ussuri-04-delete-datastoredad784e2345711ea.yaml rename to releasenotes/notes/ussuri-delete-datastoredad784e2345711ea.yaml diff --git a/releasenotes/notes/ussuri-01-service-credential-config.yaml b/releasenotes/notes/ussuri-service-credential-config.yaml similarity index 100% rename from releasenotes/notes/ussuri-01-service-credential-config.yaml rename to releasenotes/notes/ussuri-service-credential-config.yaml diff --git a/trove/common/cfg.py b/trove/common/cfg.py index 3a627cbe22..37027bd915 100644 --- a/trove/common/cfg.py +++ b/trove/common/cfg.py @@ -334,13 +334,13 @@ common_opts = [ default='trove.common.clients.guest_client', help='Client to send Guest Agent calls to.'), cfg.StrOpt('remote_nova_client', - default='trove.common.clients.nova_client', + default='trove.common.clients_admin.nova_client_trove_admin', help='Client to send Nova calls to.'), cfg.StrOpt('remote_neutron_client', - default='trove.common.clients.neutron_client', + default='trove.common.clients_admin.neutron_client_trove_admin', help='Client to send Neutron calls to.'), cfg.StrOpt('remote_cinder_client', - default='trove.common.clients.cinder_client', + default='trove.common.clients_admin.cinder_client_trove_admin', help='Client to send Cinder calls to.'), cfg.StrOpt('remote_swift_client', default='trove.common.clients.swift_client', @@ -349,7 +349,7 @@ common_opts = [ default='trove.common.trove_remote.trove_client', help='Client to send Trove calls to.'), cfg.StrOpt('remote_glance_client', - default='trove.common.clients.glance_client', + default='trove.common.clients_admin.glance_client_trove_admin', help='Client to send Glance calls to.'), cfg.StrOpt('exists_notification_transformer', help='Transformer for exists notifications.'), diff --git a/trove/tests/unittests/taskmanager/test_models.py b/trove/tests/unittests/taskmanager/test_models.py index 907eeab691..8d7b1915b7 100644 --- a/trove/tests/unittests/taskmanager/test_models.py +++ b/trove/tests/unittests/taskmanager/test_models.py @@ -395,7 +395,7 @@ class FreshInstanceTasksTest(BaseFreshInstanceTasksTest): @patch.object(taskmanager_models.FreshInstanceTasks, '_build_volume_info') @patch.object(taskmanager_models.FreshInstanceTasks, '_guest_prepare') @patch.object(template, 'SingleInstanceConfigTemplate') - @patch('trove.common.clients.neutron_client') + @patch('trove.common.clients_admin.neutron_client_trove_admin') def test_create_instance_with_mgmt_port(self, mock_neutron_client, mock_single_instance_template,