]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
infrastructure: consume ceph_fs module
authorDimitri Savineau <dsavinea@redhat.com>
Fri, 23 Oct 2020 15:46:30 +0000 (11:46 -0400)
committerGuillaume Abrioux <gabrioux@redhat.com>
Tue, 3 Nov 2020 13:32:25 +0000 (14:32 +0100)
bd611a7 introduced the new ceph_fs module but missed some tasks in
rolling_update and shrink-mds playbooks.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 16afe90806ea24503302bf6cf85b75b744def275)

infrastructure-playbooks/rolling_update.yml
infrastructure-playbooks/shrink-mds.yml

index c338c13cf9511bc963037f31049a656b6b6b5bcd..7cf81808fc1c9553f870fe1711d702782af017e6 100644 (file)
                 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"
index 6f5cdc733085dd3ad3acc68c7a86b663aee3b747..104f43b854bb850170719322d834357bdf9cdb65 100644 (file)
               (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: