From 9a44bacecc0ad8130489dce9b115f857058b6b16 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Thu, 10 Apr 2014 23:35:49 +0200 Subject: [PATCH] hypervisor: use stdlib for cinder ceph key To avoid resource dupplication errors in Puppet, we use here stdlib and ensure_resource, to allow us to declare on the same node a Cinder volume server with RBD driver and a compute using Ceph also. Bug #402 --- manifests/compute/hypervisor.pp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/manifests/compute/hypervisor.pp b/manifests/compute/hypervisor.pp index 1c72a160..74dfe8f8 100644 --- a/manifests/compute/hypervisor.pp +++ b/manifests/compute/hypervisor.pp @@ -142,12 +142,13 @@ Host * Exec <<| tag == 'set_secret_value_virsh' |>> Ceph::Key <<| title == $cinder_rbd_user |>> - file { "/etc/ceph/ceph.client.${cinder_rbd_user}.keyring": + + ensure_resource('file', "/etc/ceph/ceph.client.${cinder_rbd_user}.keyring", { owner => 'nova', group => 'nova', mode => '0400', - require => Ceph::Key[$cinder_rbd_user] - } + require => "Ceph::Key[${cinder_rbd_user}]", + }) Concat::Fragment <<| title == 'ceph-client-os' |>> } else { $libvirt_disk_cachemodes_real = []