Browse Source

Disable libvirtd.service before starting sockets

This change makes sure that libvirtd.service is stopped when starting
libvirtd-tcp/tls.socket, because these socket fails to start if
libvirtd.service is already running.

Depends-on: https://review.opendev.org/#/c/759595/
Change-Id: I4a670aa77f0f0406a96db07877354b5067ddf1da
(cherry picked from commit 451f520321)
(cherry picked from commit 675474d0e5)
(cherry picked from commit 736a330cd2)
changes/24/782724/1
Takashi Kajinami 6 months ago
committed by Tobias Urdin
parent
commit
a6adf208c5
1 changed files with 11 additions and 1 deletions
  1. +11
    -1
      manifests/migration/libvirt.pp

+ 11
- 1
manifests/migration/libvirt.pp View File

@ -274,13 +274,23 @@ class nova::migration::libvirt(
$manage_services = pick($::nova::compute::libvirt::manage_libvirt_services, true)
if $manage_services {
# libvirtd.service should be stopped before socket service is started.
# Otherwise, socket service fails to start.
exec { 'stop libvirtd.service':
path => ['/sbin', '/usr/sbin', '/bin', '/usr/bin'],
command => 'systemctl -q stop libvirtd.service',
unless => "systemctl -q is-active libvirtd-${transport_real}.socket",
require => Anchor['nova::install::end']
}
service { "libvirtd-${transport_real}":
ensure => 'running',
name => "libvirtd-${transport_real}.socket",
enable => true,
require => Anchor['nova::config::end']
}
Service["libvirtd-${transport_real}"] -> Service<| title == 'libvirt' |>
Exec['stop libvirtd.service'] -> Service["libvirtd-${transport_real}"] -> Service<| title == 'libvirt' |>
}
# --listen option should be disabled in newer libvirt


Loading…
Cancel
Save