aboutsummaryrefslogtreecommitdiffstats
path: root/manifests
diff options
context:
space:
mode:
authorJan Provaznik <jprovazn@redhat.com>2017-08-10 17:38:57 +0200
committerJan Provaznik <jprovazn@redhat.com>2017-08-10 17:38:57 +0200
commit4b2533863244ff1c667354364557a1f9c554d2f9 (patch)
tree36391d3e9c4b46bdb772d6ce80480653bd7b54ae /manifests
parent233920ce677a990a8cb094c6c592a2a0fd08aaff (diff)
Do not include manila ceph key resource twice
When mds creates manila key [1], then manila manifest needs to check first if this resource already exists otherwise puppet fails. [1] I6308a317ffe0af244396aba5197c85e273e69f68 Change-Id: I3f18bbe476c4f43fa4e162cc66c5df443122cd0c
Diffstat (limited to 'manifests')
-rw-r--r--manifests/profile/pacemaker/manila.pp22
1 files changed, 12 insertions, 10 deletions
diff --git a/manifests/profile/pacemaker/manila.pp b/manifests/profile/pacemaker/manila.pp
index c22a033..25d389a 100644
--- a/manifests/profile/pacemaker/manila.pp
+++ b/manifests/profile/pacemaker/manila.pp
@@ -134,17 +134,19 @@ class tripleo::profile::pacemaker::manila (
cephfs_enable_snapshots => hiera('manila::backend::cephfsnative::cephfs_enable_snapshots'),
}
- ceph::key { "client.${cephfs_auth_id}" :
- secret => hiera('manila::backend::cephfsnative::ceph_client_key'),
- keyring_path => $keyring_path,
- # inject the new key into ceph cluster only if ceph is deployed by
- # tripleo (if external ceph is used it should be added manually)
- inject => $ceph_mds_enabled,
- user => 'manila',
- cap_mds => 'allow *',
- cap_mon => 'allow r, allow command \"auth del\", allow command \"auth caps\", \
+ if !defined(Resource['ceph::key', "client.${cephfs_auth_id}"]) {
+ ceph::key { "client.${cephfs_auth_id}" :
+ secret => hiera('manila::backend::cephfsnative::ceph_client_key'),
+ keyring_path => $keyring_path,
+ # inject the new key into ceph cluster only if ceph is deployed by
+ # tripleo (if external ceph is used it should be added manually)
+ inject => $ceph_mds_enabled,
+ user => 'manila',
+ cap_mds => 'allow *',
+ cap_mon => 'allow r, allow command \"auth del\", allow command \"auth caps\", \
allow command \"auth get\", allow command \"auth get-or-create\"',
- cap_osd => 'allow rw'
+ cap_osd => 'allow rw'
+ }
}
ceph_config {