Fix configuring libvirt before installation
When enabling nova::migration::libvirt, it will try to configure libvirtd.conf before installing libvirt package. This patchset adds a dependency to make sure libvirt package has been installed when running nova::migration::libvirt. Change-Id: I981217c2bbecb276f25fa98d897e1da93d7e02a7 Closes-bug: #1254372
This commit is contained in:
@@ -4,6 +4,8 @@
|
|||||||
#
|
#
|
||||||
class nova::migration::libvirt {
|
class nova::migration::libvirt {
|
||||||
|
|
||||||
|
Package['libvirt'] -> File_line<| path == '/etc/libvirt/libvirtd.conf' |>
|
||||||
|
|
||||||
case $::osfamily {
|
case $::osfamily {
|
||||||
'RedHat': {
|
'RedHat': {
|
||||||
file_line { '/etc/libvirt/libvirtd.conf listen_tls':
|
file_line { '/etc/libvirt/libvirtd.conf listen_tls':
|
||||||
@@ -32,6 +34,8 @@ class nova::migration::libvirt {
|
|||||||
line => 'LIBVIRTD_ARGS="--listen"',
|
line => 'LIBVIRTD_ARGS="--listen"',
|
||||||
match => 'LIBVIRTD_ARGS=',
|
match => 'LIBVIRTD_ARGS=',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Package['libvirt'] -> File_line<| path == '/etc/sysconfig/libvirtd' |>
|
||||||
}
|
}
|
||||||
|
|
||||||
'Debian': {
|
'Debian': {
|
||||||
@@ -62,6 +66,7 @@ class nova::migration::libvirt {
|
|||||||
match => 'libvirtd_opts=',
|
match => 'libvirtd_opts=',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Package['libvirt'] -> File_line<| path == '/etc/default/libvirt-bin' |>
|
||||||
}
|
}
|
||||||
|
|
||||||
default: {
|
default: {
|
||||||
|
|||||||
@@ -22,6 +22,13 @@ require 'spec_helper'
|
|||||||
|
|
||||||
describe 'nova::migration::libvirt' do
|
describe 'nova::migration::libvirt' do
|
||||||
|
|
||||||
|
|
||||||
|
let :pre_condition do
|
||||||
|
'include nova
|
||||||
|
include nova::compute
|
||||||
|
include nova::compute::libvirt'
|
||||||
|
end
|
||||||
|
|
||||||
shared_examples_for 'nova migration with libvirt' do
|
shared_examples_for 'nova migration with libvirt' do
|
||||||
|
|
||||||
it 'configure libvirtd.conf' do
|
it 'configure libvirtd.conf' do
|
||||||
|
|||||||
Reference in New Issue
Block a user