]> git.apps.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)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Wed, 14 Oct 2020 13:57:52 +0000 (09:57 -0400)
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>
(cherry picked from commit 4eaa65c36256189b352c88c1058e888550adbd0f)

roles/ceph-osd/tasks/start_osds.yml

index 37a44db959b39fbd2f46c043003b63e9d89272dc..b0466a4d2a9240e730321cbb9101d73cf01fb7a7 100644 (file)
@@ -40,7 +40,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: