]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
update: use flags noout and nodeep-scrub only
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 18 Nov 2019 16:59:56 +0000 (17:59 +0100)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Wed, 20 Nov 2019 14:22:19 +0000 (09:22 -0500)
1. set noout and nodeep-scrub flags,
2. upgrade each OSD node, one by one, wait for active+clean pgs
3. after all osd nodes are upgraded, unset flags

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
Co-authored-by: Rachana Patel <racpatel@redhat.com>
infrastructure-playbooks/rolling_update.yml

index 7bb4540a17f41b1f35a10aa6719681ea523a5979..e7abec455f8b9f69351460e81445193d043aa9dc 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
+
+    - name: set osd flags
+      command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} osd set {{ item }}"
+      with_items:
+        - noout
+        - nodeep-scrub
+
 - name: upgrade ceph osds cluster
   vars:
     health_osd_check_retries: 40
         container_exec_cmd_update_osd: "{{ container_binary }} exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }}"
       when: containerized_deployment | bool
 
-    - name: set osd flags
-      command: "{{ container_exec_cmd_update_osd | default('') }} ceph --cluster {{ cluster }} osd set {{ item }}"
-      with_items:
-        - noout
-        - norebalance
-        - norecover
-        - nobackfill
-      delegate_to: "{{ groups[mon_group_name][0] }}"
-
     - name: stop ceph osd
       systemd:
         name: ceph-osd@{{ item }}
         - ceph_release in ["nautilus", "octopus"]
         - not containerized_deployment | bool
 
-    - name: unset osd flags
-      command: "{{ container_exec_cmd_update_osd | default('') }} ceph osd unset {{ item }} --cluster {{ cluster }}"
-      with_items:
-        - noout
-        - norebalance
-        - norecover
-        - nobackfill
-      delegate_to: "{{ groups[mon_group_name][0] }}"
-
     - name: get num_pgs - non container
       command: "{{ container_exec_cmd_update_osd|default('') }} ceph --cluster {{ cluster }} -s --format json"
       register: ceph_pgs
         container_exec_cmd_update_osd: "{{ container_binary }} exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }}"
       when: containerized_deployment | bool
 
+    - name: unset osd flags
+      command: "{{ container_exec_cmd_update_osd | default('') }} ceph osd unset {{ item }} --cluster {{ cluster }}"
+      with_items:
+        - noout
+        - nodeep-scrub
+
     - name: get osd versions
       command: "{{ container_exec_cmd_update_osd|default('') }} ceph --cluster {{ cluster }} versions"
       register: ceph_versions