]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
osd: ensure osd ids collected are well restarted
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 13 Jan 2020 15:31:00 +0000 (16:31 +0100)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Mon, 13 Jan 2020 19:31:03 +0000 (14:31 -0500)
This commit refact the condition in the loop of that task so all
potential osd ids found are well started.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1790212
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 58e6bfed2d1c9f6e86fd1a680f26539f539afcd0)

roles/ceph-osd/tasks/start_osds.yml

index 46e83d69109467673ab1da2595dffb45a54c46d3..3be380638d0d255367bdf808d43cca56d0d0c85d 100644 (file)
@@ -40,7 +40,7 @@
     enabled: yes
     masked: no
     daemon_reload: yes
-  with_items: "{{ ((ceph_osd_ids.stdout | from_json).keys() | list) if not containerized_deployment else osd_ids_non_container.stdout_lines }}"
+  with_items: "{{ ((ceph_osd_ids.stdout | default('{}') | from_json).keys() | list) + osd_ids_non_container.stdout_lines | default([]) }}"
 
 - name: ensure systemd service override directory exists
   file: