Only configure libvirt-guests if enabled
If NovaResumeGuestsStateOnHostBoot is not true, there is no reason to configure libvirt-guests. Also a customized libvirt-guests systemd unit file is added via [1] which already has the dependencies configured. Therefore there is no need to manage them via puppet again. Related-Bug: #1849264 Depends-On: https://review.opendev.org/690626 [1] https://github.com/openstack/tripleo-heat-templates/blob/master/deployment/nova/nova-compute-container-puppet.yaml#L777 Change-Id: Ic127937ad83eebb47e34c5f36c826f8dcf1048a9 (cherry picked from commit9d3af781e7
) (cherry picked from commit5a9ea40111
) (cherry picked from commit71664348d4
) (cherry picked from commit0d7b7bfc46
)
This commit is contained in:
parent
0f27a41b7b
commit
00fcfd49f0
|
@ -31,26 +31,11 @@ class tripleo::profile::base::nova::compute::libvirt_guests (
|
||||||
$step = Integer(hiera('step')),
|
$step = Integer(hiera('step')),
|
||||||
$enabled = undef,
|
$enabled = undef,
|
||||||
) {
|
) {
|
||||||
if $step >= 4 {
|
# only configure libvirt-guests if enabled
|
||||||
|
if $step >= 4 and $enabled {
|
||||||
class { '::nova::compute::libvirt_guests':
|
class { '::nova::compute::libvirt_guests':
|
||||||
enabled => $enabled,
|
enabled => $enabled,
|
||||||
}
|
}
|
||||||
include ::nova::compute::libvirt_guests
|
include ::nova::compute::libvirt_guests
|
||||||
|
|
||||||
#set dep to docker to make sure we shutdown instances before libvirt
|
|
||||||
#container stops
|
|
||||||
if str2bool(hiera('docker_enabled', false)) {
|
|
||||||
include ::systemd::systemctl::daemon_reload
|
|
||||||
|
|
||||||
Package<| name == 'docker' |>
|
|
||||||
-> file { '/etc/systemd/system/virt-guest-shutdown.target.wants':
|
|
||||||
ensure => directory,
|
|
||||||
}
|
|
||||||
-> systemd::unit_file { 'paunch-container-shutdown.service':
|
|
||||||
path => '/etc/systemd/system/virt-guest-shutdown.target.wants',
|
|
||||||
target => '/usr/lib/systemd/system/paunch-container-shutdown.service',
|
|
||||||
before => Class['::nova::compute::libvirt_guests'],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue