diff --git a/.fixtures.yml b/.fixtures.yml index 987bccd5..8ac319f3 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -11,7 +11,7 @@ fixtures: ref: 'e381349c1b838301dd730aa3cd146ecacc75aa7c' 'nova': repo: 'git://github.com/enovance/puppet-nova.git' - ref: 'ae171f93ed8dc60e6597ec03a7cfd7c7b70e65ed' + ref: '93a0c27ac9f4a4eeec761250838aae2e321eb1b1' 'glance': repo: 'git://github.com/enovance/puppet-glance.git' ref: '78042d76c0854e16a55aaf05c03696d4d422e3c5' diff --git a/Puppetfile b/Puppetfile index 96e0f05f..840b6efe 100644 --- a/Puppetfile +++ b/Puppetfile @@ -44,7 +44,7 @@ mod 'neutron', :ref => 'cefbdc897d70fd1c1fc44e372f05336674efd940' mod 'nova', :git => 'git://github.com/enovance/puppet-nova.git', - :ref => 'ae171f93ed8dc60e6597ec03a7cfd7c7b70e65ed' + :ref => '93a0c27ac9f4a4eeec761250838aae2e321eb1b1' mod 'swift', :git => 'git://github.com/enovance/puppet-swift.git', :ref => '3ea00440361ff2452561d2cce808d938e39cce56' diff --git a/manifests/compute/hypervisor.pp b/manifests/compute/hypervisor.pp index 590fdc7e..f5c06314 100644 --- a/manifests/compute/hypervisor.pp +++ b/manifests/compute/hypervisor.pp @@ -86,9 +86,10 @@ class cloud::compute::hypervisor( $ks_spice_public_host = false, # DEPRECATED $has_ceph = false -) { +) inherits cloud::params { include 'cloud::compute' + include 'cloud::params' include 'cloud::telemetry' include 'cloud::network' include 'cloud::network::vswitch' @@ -325,7 +326,8 @@ Host * # Needed to support migration but we still use Spice: vncserver_listen => '0.0.0.0', migration_support => true, - libvirt_disk_cachemodes => $libvirt_disk_cachemodes_real + libvirt_disk_cachemodes => $libvirt_disk_cachemodes_real, + libvirt_service_name => $::cloud::params::libvirt_service_name, } # Extra config for nova-compute diff --git a/manifests/params.pp b/manifests/params.pp index a6f957b0..81e25a76 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -42,12 +42,21 @@ class cloud::params { $start_haproxy_service = '"/usr/bin/systemctl start haproxy"' $stop_haproxy_service = '"/usr/bin/systemctl stop haproxy"' $horizon_auth_url = 'dashboard' + $libvirt_service_name = 'libvirtd' } # RedHat 'Debian': { # Specific to Debian / Ubuntu $start_haproxy_service = '"/etc/init.d/haproxy start"' $stop_haproxy_service = '"/etc/init.d/haproxy stop"' $horizon_auth_url = 'horizon' + case $::operatingsystem { + 'Ubuntu': { + $libvirt_service_name = 'libvirt-bin' + } + default: { + $libvirt_service_name = 'libvirtd' + } + } } # Debian default: { fail("Unsupported osfamily (${::osfamily})") diff --git a/spec/classes/cloud_compute_hypervisor_spec.rb b/spec/classes/cloud_compute_hypervisor_spec.rb index 678c89cd..43c55f51 100644 --- a/spec/classes/cloud_compute_hypervisor_spec.rb +++ b/spec/classes/cloud_compute_hypervisor_spec.rb @@ -540,6 +540,7 @@ describe 'cloud::compute::hypervisor' do end it_configures 'openstack compute hypervisor' + it { should contain_file_line('/etc/default/libvirtd libvirtd opts').with(:line => 'libvirtd_opts="-d -l"') } end context 'on RedHat platforms' do @@ -553,6 +554,7 @@ describe 'cloud::compute::hypervisor' do end it_configures 'openstack compute hypervisor' + it { should contain_file_line('/etc/sysconfig/libvirtd libvirtd args').with(:line => 'LIBVIRTD_ARGS="--listen"') } end end