]> 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, 29 Jun 2020 13:25:01 +0000 (15:25 +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>
(cherry picked from commit 2cfaa056e020615bb99eb9db1520a977e5ac3ef4)

infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml

index c96c2d08b5535e4c35ec6691783938279a817237..25b64ae291aa64896deb42b764005c2cdcee9f1a 100644 (file)
     - ceph-mgr
 
 
+- name: set osd flags
+  hosts: "{{ mon_group_name | default('mons') }}[0]"
+  become: True
+  roles:
+    - ceph-defaults
+  post_tasks:
+    - name: set osd flags
+      command: "docker exec ceph-mon-{{ ansible_hostname }} ceph --cluster {{ cluster }} osd set {{ item }}"
+      with_items:
+        - noout
+        - nodeep-scrub
+
+
 - name: switching from non-containerized to containerized ceph osd
 
   vars:
         - (ceph_pgs.stdout | from_json).pgmap.num_pgs != 0
 
 
+- name: unset osd flags
+  hosts: "{{ mon_group_name | default('mons') }}[0]"
+  become: True
+  roles:
+    - ceph-defaults
+  post_tasks:
+    - name: set osd flags
+      command: "docker exec ceph-mon-{{ ansible_hostname }} ceph --cluster {{ cluster }} osd unset {{ item }}"
+      with_items:
+        - noout
+        - nodeep-scrub
+
 - name: switching from non-containerized to containerized ceph mds
 
   hosts: