]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ephadm-adopt: Alertmanager placement count missing mergify/bp/stable-7.0/pr-7613 7614/head
authorTeoman ONAY <tonay@ibm.com>
Wed, 2 Oct 2024 14:43:39 +0000 (16:43 +0200)
committerTeoman ONAY <tonay@ibm.com>
Mon, 14 Oct 2024 13:03:50 +0000 (15:03 +0200)
Regression from #7576. Alertmanager placement count was missing
after migration to ceph_orch_apply module

Signed-off-by: Teoman ONAY <tonay@ibm.com>
(cherry picked from commit 31be49506118ece75371d0c86af794caee8bc051)

infrastructure-playbooks/cephadm-adopt.yml

index 859eacd1ce2d5074a8a3bacd309b625806521f0d..5b48952961d0bc5c6f8fdee48fc16e23542c4a15 100644 (file)
       environment:
         CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'
 
-    - name: with dashboard enabled
-      when: dashboard_enabled | bool
+    - name: With dashboard enabled
+      when: dashboard_enabled | bool and groups.get(monitoring_group_name, []) | length > 0
       block:
         - name: Update the placement of alertmanager hosts
           ceph_orch_apply:
               service_id: "{{ ansible_facts['hostname'] }}"
               placement:
                 label: "{{ monitoring_group_name }}"
+                count: "{{ groups.get(monitoring_group_name, []) | length }}"
               {% if grafana_server_addr is defined %}
               networks:
               - {{ grafana_server_addr }}
           environment:
             CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'
 
-<<<<<<< HEAD
-        - name: update the placement of prometheus hosts
-          command: "{{ cephadm_cmd }} shell -k /etc/ceph/{{ cluster }}.client.admin.keyring --fsid {{ fsid }} -- ceph orch apply prometheus --placement='{{ groups.get(monitoring_group_name, []) | length }} label:{{ monitoring_group_name }}'"
-=======
         - name: Update the placement of prometheus hosts
           ceph_orch_apply:
             fsid: "{{ fsid }}"
               spec:
                 port: {{ prometheus_port }}
               {% endif %}
->>>>>>> b41b7bf86 (cephadm-adopt: custom prometheus port lost after adoption)
           changed_when: false
           environment:
             CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'