Merge "Rename nova-libvirt to libvirt"

This commit is contained in:
Zuul 2020-06-22 15:39:08 +00:00 committed by Gerrit Code Review
commit 12eca6f75e
6 changed files with 27 additions and 23 deletions

View File

@ -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

View File

@ -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'}

View File

@ -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')

View File

@ -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(

View File

@ -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,

View File

@ -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)