From 193a6e33e9ed8649d86306b1115409d848825b96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Sun, 16 Feb 2014 00:52:43 +0100 Subject: [PATCH] Enable RBD caching with VMs booted into Ceph We definitely want to use RBD caching for VMs that sit on top of RBD. This helps a lot reducing latencies. Closes enhancement: #249 --- manifests/compute/hypervisor.pp | 1 + spec/classes/cloud_compute_hypervisor_spec.rb | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/manifests/compute/hypervisor.pp b/manifests/compute/hypervisor.pp index b4f5002c..69db9d2f 100644 --- a/manifests/compute/hypervisor.pp +++ b/manifests/compute/hypervisor.pp @@ -127,6 +127,7 @@ Host * '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'; 'DEFAULT/default_availability_zone': value => $availability_zone; + 'DEFAULT/disk_cachemodes': value => 'network=writeback'; } File <<| tag == 'ceph_compute_secret_file' |>> diff --git a/spec/classes/cloud_compute_hypervisor_spec.rb b/spec/classes/cloud_compute_hypervisor_spec.rb index 24846d0c..710b3c1e 100644 --- a/spec/classes/cloud_compute_hypervisor_spec.rb +++ b/spec/classes/cloud_compute_hypervisor_spec.rb @@ -191,11 +191,12 @@ describe 'cloud::compute::hypervisor' do should contain_nova_config('DEFAULT/rbd_secret_uuid').with('value' => 'secrete') end - it 'configure nova-conpute with extra parameters' do + it 'configure nova-compute with extra parameters' do should contain_nova_config('DEFAULT/default_availability_zone').with('value' => 'MyZone') should contain_nova_config('DEFAULT/libvirt_inject_key').with('value' => false) should contain_nova_config('DEFAULT/libvirt_inject_partition').with('value' => '-2') should contain_nova_config('DEFAULT/live_migration_flag').with('value' => 'VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_PERSIST_DEST') + should contain_nova_config('DEFAULT/disk_cachemodes').with('value' => 'network=writeback') end context 'without RBD backend' do