From 72c43cc5d9052455f37414f7cd4fba1e37f99ef0 Mon Sep 17 00:00:00 2001 From: VasishtaShastry Date: Mon, 18 Nov 2019 15:19:17 +0530 Subject: [PATCH] Fixes failure of cephfs configuration using --limit Configuration of cephfs with an existing cluster using --limit used to fail at different tasks while running with site-docker.yml This commit addresses both of those tasks Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1773489 Signed-off-by: VasishtaShastry --- roles/ceph-mds/tasks/common.yml | 4 ++-- roles/ceph-mds/tasks/create_mds_filesystems.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/ceph-mds/tasks/common.yml b/roles/ceph-mds/tasks/common.yml index c81988b04..ddfc78f39 100644 --- a/roles/ceph-mds/tasks/common.yml +++ b/roles/ceph-mds/tasks/common.yml @@ -11,7 +11,7 @@ - /var/lib/ceph/mds/{{ cluster }}-{{ mds_name }} - name: get keys from monitors - command: "{{ hostvars[groups.get(mon_group_name)[0]]['container_exec_cmd'] | default('') }} ceph --cluster {{ cluster }} auth get {{ item.name }}" + command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} auth get {{ item.name }}" register: _mds_keys with_items: - { name: "client.bootstrap-mds", path: "/var/lib/ceph/bootstrap-mds/{{ cluster }}.keyring", copy_key: true } @@ -32,4 +32,4 @@ with_items: "{{ _mds_keys.results }}" when: - cephx | bool - - item.item.copy_key | bool \ No newline at end of file + - item.item.copy_key | bool diff --git a/roles/ceph-mds/tasks/create_mds_filesystems.yml b/roles/ceph-mds/tasks/create_mds_filesystems.yml index 1bfb4d81e..3e22a047e 100644 --- a/roles/ceph-mds/tasks/create_mds_filesystems.yml +++ b/roles/ceph-mds/tasks/create_mds_filesystems.yml @@ -23,7 +23,7 @@ block: - name: create filesystem pools command: > - {{ hostvars[groups[mon_group_name][0]]['container_exec_cmd'] | default('') }} ceph --cluster {{ cluster }} + {{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} osd pool create {{ item.name }} {{ item.pg_num | default(osd_pool_default_pg_num) }} {{ item.pgp_num | default(item.pg_num) | default(osd_pool_default_pg_num) }}