Browse Source

Expose [workaround]/ensure_libvirt_rbd_instance_dir_cleanup

This exposes the nova workaround to remove the instance directory on
clean up when using rbd.

Change-Id: Iea47828c8022955cf0f91b891d43eff34a905174
changes/51/779951/3
Christian Rohmann 5 months ago
committed by Takashi Kajinami
parent
commit
6178fbf033
  1. 12
      manifests/workarounds.pp
  2. 5
      releasenotes/notes/workarounds-ensure_libvirt_rbd_instance_dir_cleanup-17da2fc2a88ff5f1.yaml
  3. 5
      spec/classes/nova_workarounds_spec.rb

12
manifests/workarounds.pp

@ -9,6 +9,12 @@
# glance and uploading to ceph instead of a COW clone
# Defaults to $::os_service_default
#
# [*ensure_libvirt_rbd_instance_dir_cleanup*]
# (optional) Ensure the instance directory is removed during clean up when using
# rbd. When enabled this workaround will ensure that the instance directory is
# always removed during cleanup on hosts using ``[libvirt]/images_type=rbd``
# Defaults to $::os_service_default
#
# DEPRECATED
#
# [*enable_numa_live_migration*]
@ -17,6 +23,7 @@
#
class nova::workarounds (
$never_download_image_if_on_rbd = $::os_service_default,
$ensure_libvirt_rbd_instance_dir_cleanup = $::os_service_default,
# DEPRECATED PARAMETER
$enable_numa_live_migration = undef,
) {
@ -29,7 +36,10 @@ class nova::workarounds (
}
nova_config {
'workarounds/never_download_image_if_on_rbd': value => $never_download_image_if_on_rbd;
'workarounds/never_download_image_if_on_rbd':
value => $never_download_image_if_on_rbd;
'workarounds/ensure_libvirt_rbd_instance_dir_cleanup':
value => $ensure_libvirt_rbd_instance_dir_cleanup;
}
}

5
releasenotes/notes/workarounds-ensure_libvirt_rbd_instance_dir_cleanup-17da2fc2a88ff5f1.yaml

@ -0,0 +1,5 @@
---
features:
- |
Support for the ``workarounds/ensure_libvirt_rbd_instance_dir_cleanup``
parameter has been added.

5
spec/classes/nova_workarounds_spec.rb

@ -11,18 +11,21 @@ describe 'nova::workarounds' do
context 'with default parameters' do
it { is_expected.not_to contain_nova_config('workarounds/enable_numa_live_migration') }
it { is_expected.to contain_nova_config('workarounds/never_download_image_if_on_rbd').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_nova_config('workarounds/ensure_libvirt_rbd_instance_dir_cleanup').with_value('<SERVICE DEFAULT>') }
end
context 'with overridden parameters' do
let :params do
{
:enable_numa_live_migration => true,
:never_download_image_if_on_rbd => true
:never_download_image_if_on_rbd => true,
:ensure_libvirt_rbd_instance_dir_cleanup => true
}
end
it { is_expected.to contain_nova_config('workarounds/enable_numa_live_migration').with_value('true') }
it { is_expected.to contain_nova_config('workarounds/never_download_image_if_on_rbd').with_value('true') }
it { is_expected.to contain_nova_config('workarounds/ensure_libvirt_rbd_instance_dir_cleanup').with_value('true') }
end
end

Loading…
Cancel
Save