From: Dimitri Savineau Date: Fri, 23 Oct 2020 15:46:30 +0000 (-0400) Subject: infrastructure: consume ceph_fs module X-Git-Tag: v5.0.3~32 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=d2114efa4df8c7d788f3daf3824361eeb6d37eb5;p=ceph-ansible.git infrastructure: consume ceph_fs module bd611a7 introduced the new ceph_fs module but missed some tasks in rolling_update and shrink-mds playbooks. Signed-off-by: Dimitri Savineau (cherry picked from commit 16afe90806ea24503302bf6cf85b75b744def275) --- diff --git a/infrastructure-playbooks/rolling_update.yml b/infrastructure-playbooks/rolling_update.yml index c338c13cf..7cf81808f 100644 --- a/infrastructure-playbooks/rolling_update.yml +++ b/infrastructure-playbooks/rolling_update.yml @@ -480,12 +480,17 @@ CEPH_CONTAINER_BINARY: "{{ container_binary }}" - name: wait until only rank 0 is up - command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} fs get {{ cephfs }} -f json" - changed_when: false + ceph_fs: + name: "{{ cephfs }}" + cluster: "{{ cluster }}" + state: info register: wait_rank_zero retries: 720 delay: 5 until: (wait_rank_zero.stdout | from_json).mdsmap.in | length == 1 and (wait_rank_zero.stdout | from_json).mdsmap.in[0] == 0 + environment: + CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}" + CEPH_CONTAINER_BINARY: "{{ container_binary }}" - name: get name of remaining active mds command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} fs dump -f json" diff --git a/infrastructure-playbooks/shrink-mds.yml b/infrastructure-playbooks/shrink-mds.yml index 6f5cdc733..104f43b85 100644 --- a/infrastructure-playbooks/shrink-mds.yml +++ b/infrastructure-playbooks/shrink-mds.yml @@ -142,10 +142,16 @@ (mds_to_kill in standby_mdss | default([])) - name: delete the filesystem when killing last mds - command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} fs rm --yes-i-really-mean-it {{ cephfs }}" + ceph_fs: + name: "{{ cephfs }}" + cluster: "{{ cluster }}" + state: absent when: - (ceph_status.stdout | from_json)['fsmap']['up'] | int == 0 - (ceph_status.stdout | from_json)['fsmap']['up:standby'] | int == 0 + environment: + CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}" + CEPH_CONTAINER_BINARY: "{{ container_binary }}" - name: purge mds store file: