From a6edcc73d6619f597d72a3f1a394808d2000b36f Mon Sep 17 00:00:00 2001 From: Sebastien Badia Date: Wed, 8 Jan 2014 14:04:14 +0100 Subject: [PATCH] storage: fix ceph compute secrets execs --- manifests/storage/compute.pp | 4 ++-- manifests/storage/rbd/pools.pp | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/manifests/storage/compute.pp b/manifests/storage/compute.pp index 8b33bacf..e1080266 100644 --- a/manifests/storage/compute.pp +++ b/manifests/storage/compute.pp @@ -20,8 +20,8 @@ class privatecloud::storage::compute( if $has_ceph { File <<| tag == 'ceph_compute_secret_file' |>> - Exec <<| tag == 'get-or-set virsh secret' |>> - Exec <<| tag == 'set-secret-value virsh' |>> + Exec <<| tag == 'get_or_set_virsh_secret' |>> + Exec <<| tag == 'set_secret_value_virsh' |>> } diff --git a/manifests/storage/rbd/pools.pp b/manifests/storage/rbd/pools.pp index d01d331f..4216d518 100644 --- a/manifests/storage/rbd/pools.pp +++ b/manifests/storage/rbd/pools.pp @@ -75,19 +75,19 @@ osd 'allow class-read object_prefix rbd_children, allow rwx pool=${glance_pool}, tag => 'ceph_compute_secret_file', } - @@exec { 'get-or-set virsh secret': + @@exec { 'get_or_set_virsh_secret': command => 'virsh secret-define --file /etc/ceph/secret.xml', unless => "virsh secret-list | tail -n +3 | cut -f1 -d' ' | grep -sq ${ceph_fsid}", tag => 'ceph_compute_get_secret', - require => [ Package['libvirt-bin'], File['/etc/ceph/secret.xml'] ], + require => [Package['libvirt-bin'],File['/etc/ceph/secret.xml']], + notify => Exec['set_secret_value_virsh'], } - @@exec { 'set-secret-value virsh': - command => "virsh secret-set-value --secret ${ceph_fsid} --base64 ${::ceph_keyring_glance}", - tag => 'ceph_compute_set_secret', - require => [ Exec['get-or-set virsh secret'] ], + @@exec { 'set_secret_value_virsh': + command => "virsh secret-set-value --secret ${ceph_fsid} --base64 ${::ceph_keyring_glance}", + tag => 'ceph_compute_set_secret', + refreshonly => true, } - } - -} + } # if setup pools +} # class