]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-osd: don't start the OSD services twice
authorDimitri Savineau <dsavinea@redhat.com>
Wed, 14 Oct 2020 00:43:53 +0000 (20:43 -0400)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 14 Oct 2020 08:30:39 +0000 (10:30 +0200)
Using the + operation on two lists doesn't filter out the duplicate
keys.
Currently each OSDs is started (via systemd) twice.
Instead we could use the union filter.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
roles/ceph-osd/tasks/start_osds.yml

index 64f13241cc44de4c996655aba54dbaab64626cef..1e1f7d5767922df1f8cf77c8449d107885fa975e 100644 (file)
@@ -30,7 +30,7 @@
     enabled: yes
     masked: no
     daemon_reload: yes
-  with_items: "{{ ((ceph_osd_ids.stdout | default('{}') | from_json).keys() | list) + osd_ids_non_container.stdout_lines | default([]) }}"
+  with_items: "{{ ((ceph_osd_ids.stdout | default('{}') | from_json).keys() | list) | union(osd_ids_non_container.stdout_lines) | default([]) }}"
 
 - name: ensure systemd service override directory exists
   file: