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/758876/
Change-Id: I4a670aa77f0f0406a96db07877354b5067ddf1da
(cherry picked from commit 451f520321)
changes/77/758877/4
Takashi Kajinami 10 months ago
parent
commit
de28395cef
  1. 12
      manifests/migration/libvirt.pp

12
manifests/migration/libvirt.pp

@ -244,13 +244,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