From ae014c9abd72da29601a979ad22588852e7e2aa6 Mon Sep 17 00:00:00 2001 From: John Eckersberg Date: Tue, 22 Apr 2014 15:16:04 -0400 Subject: [PATCH] Do not set special_service_provider on RHEL7. RHEL7 uses systemd and should set this to undef as Fedora does. Change-Id: Ic9a719dfff50bda85d428fba5d665d7b97d8959c --- manifests/params.pp | 7 +++++++ spec/classes/nova_compute_libvirt_spec.rb | 17 ++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/manifests/params.pp b/manifests/params.pp index 3f6aa57a4..323a74db1 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -44,6 +44,13 @@ class nova::params { 'Fedora': { $special_service_provider = undef } + 'RedHat': { + if ($::operatingsystemrelease < 7) { + $special_service_provider = 'init' + } else { + $special_service_provider = undef + } + } default: { $special_service_provider = 'init' } diff --git a/spec/classes/nova_compute_libvirt_spec.rb b/spec/classes/nova_compute_libvirt_spec.rb index 48897c8bd..8f4a6dc31 100644 --- a/spec/classes/nova_compute_libvirt_spec.rb +++ b/spec/classes/nova_compute_libvirt_spec.rb @@ -103,7 +103,8 @@ describe 'nova::compute::libvirt' do describe 'on rhel platforms' do let :facts do - { :operatingsystem => 'RedHat', :osfamily => 'RedHat' } + { :operatingsystem => 'RedHat', :osfamily => 'RedHat', + :operatingsystemrelease => 6.5 } end describe 'with default parameters' do @@ -130,6 +131,20 @@ describe 'nova::compute::libvirt' do :provider => 'init' ) } + describe 'on rhel 7' do + let :facts do + super().merge(:operatingsystemrelease => 7.0) + end + + it { should contain_service('libvirt').with( + :provider => nil + )} + + it { should contain_service('messagebus').with( + :provider => nil + )} + end + it { should contain_nova_config('DEFAULT/compute_driver').with_value('libvirt.LibvirtDriver')} it { should contain_nova_config('libvirt/virt_type').with_value('kvm')} it { should contain_nova_config('DEFAULT/vncserver_listen').with_value('127.0.0.1')}