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:
parent
d4a8c904b7
commit
6c6e6be7e6
|
@ -4,6 +4,8 @@
|
|||
#
|
||||
class nova::migration::libvirt {
|
||||
|
||||
Package['libvirt'] -> File_line<| path == '/etc/libvirt/libvirtd.conf' |>
|
||||
|
||||
case $::osfamily {
|
||||
'RedHat': {
|
||||
file_line { '/etc/libvirt/libvirtd.conf listen_tls':
|
||||
|
@ -32,6 +34,8 @@ class nova::migration::libvirt {
|
|||
line => 'LIBVIRTD_ARGS="--listen"',
|
||||
match => 'LIBVIRTD_ARGS=',
|
||||
}
|
||||
|
||||
Package['libvirt'] -> File_line<| path == '/etc/sysconfig/libvirtd' |>
|
||||
}
|
||||
|
||||
'Debian': {
|
||||
|
@ -62,6 +66,7 @@ class nova::migration::libvirt {
|
|||
match => 'libvirtd_opts=',
|
||||
}
|
||||
|
||||
Package['libvirt'] -> File_line<| path == '/etc/default/libvirt-bin' |>
|
||||
}
|
||||
|
||||
default: {
|
||||
|
|
|
@ -22,6 +22,13 @@ require 'spec_helper'
|
|||
|
||||
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
|
||||
|
||||
it 'configure libvirtd.conf' do
|
||||
|
|
Loading…
Reference in New Issue