From 9b2d55c0075879f1b0f71147548e7ce11729453c Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Fri, 3 Apr 2020 15:36:23 +0200 Subject: [PATCH] switch-to-containers: set and unset osd flags 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 (cherry picked from commit 2cfaa056e020615bb99eb9db1520a977e5ac3ef4) --- ...inerized-to-containerized-ceph-daemons.yml | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml b/infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml index 38134980c..b830f26a4 100644 --- a/infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml +++ b/infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml @@ -192,6 +192,23 @@ 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: @@ -309,6 +326,22 @@ 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') }}" -- 2.39.5