From f7d140b0e9303f50bbbf587b962e16b6ac6170f1 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Tue, 15 Apr 2014 14:24:21 +0200 Subject: [PATCH] hypervisor: disable NBD dependancy - Disable the kernel module load - Configure Nova to not use NBD driver injection, since we use Cloud-init now to inject keys. - Update unit tests --- manifests/compute/hypervisor.pp | 23 ++++++------------- spec/classes/cloud_compute_hypervisor_spec.rb | 5 ---- 2 files changed, 7 insertions(+), 21 deletions(-) diff --git a/manifests/compute/hypervisor.pp b/manifests/compute/hypervisor.pp index 3b8543f4..e6969fe6 100644 --- a/manifests/compute/hypervisor.pp +++ b/manifests/compute/hypervisor.pp @@ -44,15 +44,6 @@ class cloud::compute::hypervisor( include 'cloud::telemetry' include 'cloud::network' - exec { 'insert_module_nbd': - command => '/bin/echo "nbd" > /etc/modules', - unless => '/bin/grep "nbd" /etc/modules', - } - - exec { '/sbin/modprobe nbd': - unless => '/bin/grep -q "^nbd " "/proc/modules"' - } - file{ '/var/lib/nova/.ssh': ensure => directory, mode => '0700', @@ -130,13 +121,6 @@ Host * 'DEFAULT/rbd_secret_uuid': value => $nova_rbd_secret_uuid; } - # Extra config for nova-compute - nova_config { - 'DEFAULT/libvirt_inject_key': value => false; - 'DEFAULT/libvirt_inject_partition': value => '-2'; - 'DEFAULT/live_migration_flag': value => 'VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_PERSIST_DEST'; - } - File <<| tag == 'ceph_compute_secret_file' |>> Exec <<| tag == 'get_or_set_virsh_secret' |>> Exec <<| tag == 'set_secret_value_virsh' |>> @@ -175,6 +159,13 @@ Host * libvirt_disk_cachemodes => $libvirt_disk_cachemodes_real } + # Extra config for nova-compute + nova_config { + 'DEFAULT/libvirt_inject_key': value => false; + 'DEFAULT/libvirt_inject_partition': value => '-2'; + 'DEFAULT/live_migration_flag': value => 'VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_PERSIST_DEST'; + } + class { 'ceilometer::agent::compute': } } diff --git a/spec/classes/cloud_compute_hypervisor_spec.rb b/spec/classes/cloud_compute_hypervisor_spec.rb index 9dd94fce..47046e58 100644 --- a/spec/classes/cloud_compute_hypervisor_spec.rb +++ b/spec/classes/cloud_compute_hypervisor_spec.rb @@ -192,11 +192,6 @@ describe 'cloud::compute::hypervisor' do ) end - it 'insert and activate nbd module' do - should contain_exec('insert_module_nbd').with('command' => '/bin/echo "nbd" > /etc/modules', 'unless' => '/bin/grep "nbd" /etc/modules') - should contain_exec('/sbin/modprobe nbd').with('unless' => '/bin/grep -q "^nbd " "/proc/modules"') - end - it 'configure nova-compute' do should contain_class('nova::compute').with( :enabled => true,