Browse Source

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 commit 9d3af781e7)
(cherry picked from commit 5a9ea40111)
(cherry picked from commit 71664348d4)
(cherry picked from commit 0d7b7bfc46)
changes/48/691248/1
Martin Schuppert 4 months ago
parent
commit
00fcfd49f0
1 changed files with 3 additions and 18 deletions
  1. +3
    -18
      manifests/profile/base/nova/compute/libvirt_guests.pp

+ 3
- 18
manifests/profile/base/nova/compute/libvirt_guests.pp View File

@@ -31,26 +31,11 @@ class tripleo::profile::base::nova::compute::libvirt_guests (
$step = Integer(hiera('step')),
$enabled = undef,
) {
if $step >= 4 {
# only configure libvirt-guests if enabled
if $step >= 4 and $enabled {
class { '::nova::compute::libvirt_guests':
enabled => $enabled,
enabled => $enabled,
}
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…
Cancel
Save