Ensure the CephX Manila keyring permissions are only set when needed
Do not try to set the ACLs on the Manila CephX keyring if the
CephFS backend is not enabled; in that case the keyring does not
exist.
Change-Id: I2f0018c66bd071f9e2e0dfafb0339a5b891ed71a
Closes-Bug: 1770444
(cherry picked from commit ce734ea1e2
)
This commit is contained in:
parent
6938b5d1f2
commit
1052ff5dfe
@ -23,7 +23,12 @@
|
||||
# for more details.
|
||||
# Defaults to hiera('step')
|
||||
#
|
||||
# [*backend_cephfs_enabled*]
|
||||
# (Optional) Whether or not the cephfs backend is enabled
|
||||
# Defaults to hiera('manila_backend_cephfs_enabled', false)
|
||||
#
|
||||
class tripleo::profile::base::manila::share (
|
||||
$backend_cephfs_enabled = hiera('manila_backend_cephfs_enabled', false),
|
||||
$step = hiera('step'),
|
||||
) {
|
||||
include ::tripleo::profile::base::manila
|
||||
@ -31,6 +36,7 @@ class tripleo::profile::base::manila::share (
|
||||
if $step >= 4 {
|
||||
include ::manila::share
|
||||
|
||||
if $backend_cephfs_enabled {
|
||||
$cephfs_auth_id = hiera('manila::backend::cephfsnative::cephfs_auth_id')
|
||||
$keyring_path = "/etc/ceph/ceph.client.${cephfs_auth_id}.keyring"
|
||||
ceph_config {
|
||||
@ -46,4 +52,5 @@ class tripleo::profile::base::manila::share (
|
||||
}
|
||||
Ceph::Key<| title == "client.${cephfs_auth_id}" |> -> Exec["exec-setfacl-${cephfs_auth_id}-manila"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user