diff --git a/devstack/plugin.sh b/devstack/plugin.sh index e8b79d76..e2368d0b 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -13,8 +13,8 @@ function configure { iniset $TEMPEST_CONFIG whitebox-nova-compute config_path "$WHITEBOX_NOVA_COMPUTE_CONFIG_PATH" iniset $TEMPEST_CONFIG whitebox-nova-compute restart_command "$WHITEBOX_NOVA_COMPUTE_RESTART_COMMAND" - iniset $TEMPEST_CONFIG whitebox-nova-libvirt restart_command "$WHITEBOX_NOVA_LIBVIRT_RESTART_COMMAND" - iniset $TEMPEST_CONFIG whitebox-nova-libvirt stop_command "$WHITEBOX_NOVA_LIBVIRT_STOP_COMMAND" + iniset $TEMPEST_CONFIG whitebox-libvirt restart_command "$WHITEBOX_LIBVIRT_RESTART_COMMAND" + iniset $TEMPEST_CONFIG whitebox-libvirt stop_command "$WHITEBOX_LIBVIRT_STOP_COMMAND" iniset $TEMPEST_CONFIG whitebox-database user $DATABASE_USER iniset $TEMPEST_CONFIG whitebox-database password $DATABASE_PASSWORD diff --git a/devstack/settings b/devstack/settings index 427ba99d..9670dde2 100644 --- a/devstack/settings +++ b/devstack/settings @@ -5,5 +5,5 @@ WHITEBOX_AVAILABLE_CINDER_STORAGE=${WHITEBOX_AVAILABLE_CINDER_STORAGE:-24} WHITEBOX_NOVA_COMPUTE_CONFIG_PATH=${WHITEBOX_NOVA_COMPUTE_CONFIG_PATH:-/etc/nova/nova-cpu.conf} WHITEBOX_NOVA_COMPUTE_RESTART_COMMAND=${WHITEBOX_NOVA_COMPUTE_RESTART_COMMAND:-'systemctl restart devstack@n-cpu'} -WHITEBOX_NOVA_LIBVIRT_RESTART_COMMAND=${WHITEBOX_NOVA_LIBVIRT_RESTART_COMMAND:-'systemctl restart libvirtd'} -WHITEBOX_NOVA_LIBVIRT_STOP_COMMAND=${WHITEBOX_NOVA_LIBVIRT_STOP_COMMAND:-'systemctl stop libvirtd'} +WHITEBOX_LIBVIRT_RESTART_COMMAND=${WHITEBOX_LIBVIRT_RESTART_COMMAND:-'systemctl restart libvirtd'} +WHITEBOX_LIBVIRT_STOP_COMMAND=${WHITEBOX_LIBVIRT_STOP_COMMAND:-'systemctl stop libvirtd'} diff --git a/whitebox_tempest_plugin/api/compute/test_volume_negative.py b/whitebox_tempest_plugin/api/compute/test_volume_negative.py index 1bd8431b..19c10735 100644 --- a/whitebox_tempest_plugin/api/compute/test_volume_negative.py +++ b/whitebox_tempest_plugin/api/compute/test_volume_negative.py @@ -72,8 +72,8 @@ class VolumesAdminNegativeTest(base.BaseWhiteboxComputeTest, len(disks_before_attach)) host = self.get_ctlplane_address(server['OS-EXT-SRV-ATTR:host']) - # stop the nova_libvirt service - clients.ServiceManager(host, 'nova-libvirt').stop() + # stop the libvirt service + clients.ServiceManager(host, 'libvirt').stop() # While this call to n-api will return successfully the underlying call # to the virt driver will fail as the libvirt service is stopped. @@ -84,10 +84,10 @@ class VolumesAdminNegativeTest(base.BaseWhiteboxComputeTest, self.assertEqual( len(disks_after_failed_detach), len(disks_after_attach)) - # restart the nova_libvirt after failed detach - clients.ServiceManager(host, 'nova-libvirt').restart() + # restart libvirt after failed detach + clients.ServiceManager(host, 'libvirt').restart() - # This will be a successful detach as nova_libvirt is started again + # This will be a successful detach as libvirt is started again self.servers_client.detach_volume(server['id'], attachment['volumeId']) waiters.wait_for_volume_resource_status( self.volumes_client, attachment['volumeId'], 'available') diff --git a/whitebox_tempest_plugin/config.py b/whitebox_tempest_plugin/config.py index cddb53a9..4a30e855 100644 --- a/whitebox_tempest_plugin/config.py +++ b/whitebox_tempest_plugin/config.py @@ -85,19 +85,23 @@ nova_compute_opts = [ 'privilege management (ie, no sudo).'), ] -nova_libvirt_group = cfg.OptGroup( - name='whitebox-nova-libvirt', - title='Config options to manage the nova-libvirt service') +libvirt_group = cfg.OptGroup( + name='whitebox-libvirt', + title='Config options to manage the libvirt service') -nova_libvirt_opts = [ +libvirt_opts = [ cfg.StrOpt( 'restart_command', - help='Command to restart the nova-libvirt service, without any ' - 'privilege management (ie, no sudo).'), + help='Command to restart the libvirt service, without any ' + 'privilege management (ie, no sudo).', + deprecated_opts=[cfg.DeprecatedOpt('restart_command', + group='whitebox-nova-libvirt')]), cfg.StrOpt( 'stop_command', - help='Command to stop the nova-libvirt service, without any ' - 'privilege management (ie, no sudo).'), + help='Command to stop the libvirt service, without any ' + 'privilege management (ie, no sudo).', + deprecated_opts=[cfg.DeprecatedOpt('stop_command', + group='whitebox-nova-libvirt')]) ] database_group = cfg.OptGroup( diff --git a/whitebox_tempest_plugin/plugin.py b/whitebox_tempest_plugin/plugin.py index 08057b9a..d1ada83d 100644 --- a/whitebox_tempest_plugin/plugin.py +++ b/whitebox_tempest_plugin/plugin.py @@ -38,8 +38,8 @@ class WhiteboxTempestPlugin(plugins.TempestPlugin): whitebox_config.nova_compute_opts) config.register_opt_group(conf, whitebox_config.database_group, whitebox_config.database_opts) - config.register_opt_group(conf, whitebox_config.nova_libvirt_group, - whitebox_config.nova_libvirt_opts) + config.register_opt_group(conf, whitebox_config.libvirt_group, + whitebox_config.libvirt_opts) config.register_opt_group(conf, whitebox_config.hardware_group, whitebox_config.hardware_opts) @@ -48,8 +48,8 @@ class WhiteboxTempestPlugin(plugins.TempestPlugin): whitebox_config.general_opts), (whitebox_config.nova_compute_group.name, whitebox_config.nova_compute_opts), - (whitebox_config.nova_libvirt_group.name, - whitebox_config.nova_libvirt_opts), + (whitebox_config.libvirt_group.name, + whitebox_config.libvirt_opts), (whitebox_config.database_group.name, whitebox_config.database_opts), (whitebox_config.hardware_group.name, diff --git a/whitebox_tempest_plugin/tests/test_clients.py b/whitebox_tempest_plugin/tests/test_clients.py index d2f40281..4d27cbac 100644 --- a/whitebox_tempest_plugin/tests/test_clients.py +++ b/whitebox_tempest_plugin/tests/test_clients.py @@ -152,8 +152,8 @@ class ServiceManagerTestCase(base.WhiteboxPluginTestCase): def test_stop(self): self.flags(stop_command='fake stop command', - group='whitebox-nova-libvirt') - service = clients.ServiceManager('fake-host', 'nova-libvirt') + group='whitebox-libvirt') + service = clients.ServiceManager('fake-host', 'libvirt') with mock.patch.object(service, 'execute') as mock_exec: service.stop() mock_exec.assert_called_with('fake stop command', sudo=True)