From d363b0f741a1c2a4da8ff499f39f78d169e2aa11 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Thu, 5 Oct 2017 22:25:34 +0200 Subject: [PATCH] rbd: fix bug when trying to fetch key With jewel, `bootstrap_rbd_keyring` is not set because of this condition: ``` when: - ceph_release_num.{{ ceph_release }} >= ceph_release_num.luminous ``` Therefore, the task `try to fetch ceph config and keys` will fail. Signed-off-by: Guillaume Abrioux --- roles/ceph-rbd-mirror/tasks/docker/copy_configs.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/ceph-rbd-mirror/tasks/docker/copy_configs.yml b/roles/ceph-rbd-mirror/tasks/docker/copy_configs.yml index fabe5d6d6..581087db3 100644 --- a/roles/ceph-rbd-mirror/tasks/docker/copy_configs.yml +++ b/roles/ceph-rbd-mirror/tasks/docker/copy_configs.yml @@ -9,7 +9,7 @@ set_fact: ceph_config_keys: - /etc/ceph/{{ cluster }}.client.admin.keyring - - "{{ bootstrap_rbd_keyring | default([]) }}" + - "{{ bootstrap_rbd_keyring | default('') }}" - name: stat for ceph config and keys local_action: stat path={{ fetch_directory }}/{{ fsid }}/{{ item }} @@ -19,6 +19,7 @@ failed_when: false always_run: true register: statconfig + when: "item | length > 0" - name: try to fetch ceph config and keys copy: @@ -32,6 +33,7 @@ - "{{ ceph_config_keys }}" - "{{ statconfig.results }}" when: + - not item.1.get('skipped') - item.1.stat.exists == true - name: set selinux permissions -- 2.39.5