]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
switch-to-containers: set and unset osd flags
authorGuillaume Abrioux <gabrioux@redhat.com>
Fri, 3 Apr 2020 13:36:23 +0000 (15:36 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 6 Apr 2020 15:00:00 +0000 (17:00 +0200)
The workflow in this playbook should be the same than in rolling_update,
we should first set noout and nodeep-scrub flags before migrating the
first osd and unset osd flags after the last osd is migrated.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml

index 38134980c80595b2d3990f0a6c5d6d21c378edbe..b830f26a4eefeb7cdc6b1cbc1425cf05e73668e6 100644 (file)
         name: ceph-mgr
 
 
+- name: set osd flags
+  hosts: "{{ mon_group_name | default('mons') }}[0]"
+  become: True
+  tasks:
+    - import_role:
+        name: ceph-defaults
+    - import_role:
+        name: ceph-facts
+        tasks_from: container_binary.yml
+
+    - name: set osd flags
+      command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} osd set {{ item }}"
+      with_items:
+        - noout
+        - nodeep-scrub
+
+
 - name: switching from non-containerized to containerized ceph osd
 
   vars:
       when: (ceph_pgs.stdout | from_json).pgmap.num_pgs != 0
 
 
+- name: unset osd flags
+  hosts: "{{ mon_group_name | default('mons') }}[0]"
+  become: True
+  tasks:
+    - import_role:
+        name: ceph-defaults
+    - import_role:
+        name: ceph-facts
+        tasks_from: container_binary.yml
+
+    - name: set osd flags
+      command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} osd unset {{ item }}"
+      with_items:
+        - noout
+        - nodeep-scrub
+
 - name: switching from non-containerized to containerized ceph mds
 
   hosts: "{{ mds_group_name|default('mdss') }}"