Skip to content

Commit

Permalink
cephadm-adopt: Fixes binding network for alertmanager
Browse files Browse the repository at this point in the history
Alertmanager was bind to default * network instead of grafana_server_addr
as it was before. Now on if grafana_server_addr is defined, it will be
bind to that network.

Signed-off-by: Teoman ONAY <[email protected]>
(cherry picked from commit 0bf3398)

# Conflicts:
#	infrastructure-playbooks/cephadm-adopt.yml
  • Loading branch information
asm0deuz authored and mergify[bot] committed Aug 5, 2024
1 parent 1462f57 commit 83367f7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions infrastructure-playbooks/cephadm-adopt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1516,9 +1516,25 @@
- name: with dashboard enabled
when: dashboard_enabled | bool
block:
<<<<<<< HEAD
- name: update the placement of alertmanager hosts
command: "{{ cephadm_cmd }} shell -k /etc/ceph/{{ cluster }}.client.admin.keyring --fsid {{ fsid }} -- ceph orch apply alertmanager --placement='{{ groups.get(monitoring_group_name, []) | length }} label:{{ monitoring_group_name }}'"
changed_when: false
=======
- name: Update the placement of alertmanager hosts
ceph_orch_apply:
fsid: "{{ fsid }}"
spec: |
service_type: alertmanager
service_id: "{{ ansible_facts['hostname'] }}"
placement:
label: "{{ monitoring_group_name }}"
{% if grafana_server_addr is defined %}
networks:
- {{ grafana_server_addr }}
{% endif %}
delegate_to: "{{ groups[mon_group_name][0] }}"
>>>>>>> 0bf339877 (cephadm-adopt: Fixes binding network for alertmanager)
environment:
CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'

Expand Down

0 comments on commit 83367f7

Please sign in to comment.