diff --git a/manifests/compute/libvirt.pp b/manifests/compute/libvirt.pp index c2c5413d0..0c12ace0b 100644 --- a/manifests/compute/libvirt.pp +++ b/manifests/compute/libvirt.pp @@ -69,6 +69,7 @@ class nova::compute::libvirt ( service { 'libvirt' : ensure => running, + enable => true, name => $::nova::params::libvirt_service_name, provider => $::nova::params::special_service_provider, require => Package['libvirt'], diff --git a/spec/classes/nova_compute_libvirt_spec.rb b/spec/classes/nova_compute_libvirt_spec.rb index 83be52392..681ecd734 100644 --- a/spec/classes/nova_compute_libvirt_spec.rb +++ b/spec/classes/nova_compute_libvirt_spec.rb @@ -26,6 +26,7 @@ describe 'nova::compute::libvirt' do it { should contain_service('libvirt').with( :name => 'libvirt-bin', + :enable => true, :ensure => 'running', :provider => 'upstart', :require => 'Package[libvirt]', @@ -61,7 +62,7 @@ describe 'nova::compute::libvirt' do context 'with vncserver_listen set to 0.0.0.0' do let :params do - { :vncserver_listen => '0.0.0.0', + { :vncserver_listen => '0.0.0.0', :migration_support => true } end @@ -71,7 +72,7 @@ describe 'nova::compute::libvirt' do context 'with vncserver_listen not set to 0.0.0.0' do let :params do - { :vncserver_listen => '127.0.0.1', + { :vncserver_listen => '127.0.0.1', :migration_support => true } end @@ -98,6 +99,7 @@ describe 'nova::compute::libvirt' do it { should contain_service('libvirt').with( :name => 'libvirtd', + :enable => true, :ensure => 'running', :provider => 'init', :require => 'Package[libvirt]', @@ -117,8 +119,8 @@ describe 'nova::compute::libvirt' do describe 'with params' do let :params do - { :libvirt_virt_type => 'qemu', - :vncserver_listen => '0.0.0.0' + { :libvirt_virt_type => 'qemu', + :vncserver_listen => '0.0.0.0' } end @@ -139,7 +141,7 @@ describe 'nova::compute::libvirt' do context 'with vncserver_listen set to 0.0.0.0' do let :params do - { :vncserver_listen => '0.0.0.0', + { :vncserver_listen => '0.0.0.0', :migration_support => true } end @@ -149,7 +151,7 @@ describe 'nova::compute::libvirt' do context 'with vncserver_listen not set to 0.0.0.0' do let :params do - { :vncserver_listen => '127.0.0.1', + { :vncserver_listen => '127.0.0.1', :migration_support => true } end @@ -172,6 +174,7 @@ describe 'nova::compute::libvirt' do it { should contain_service('libvirt').with( :name => 'libvirtd', + :enable => true, :ensure => 'running', :provider => nil, :require => 'Package[libvirt]',