From: VasishtaShastry Date: Mon, 18 Nov 2019 09:49:17 +0000 (+0530) Subject: Fixes failure of cephfs configuration using --limit X-Git-Tag: v4.0.6~30 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4edef59feb516ddb09ccef4863896ae5a131c850;p=ceph-ansible.git 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 (cherry picked from commit 72c43cc5d9052455f37414f7cd4fba1e37f99ef0) --- 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) }}