Skip to content

Commit

Permalink
cephadm-adopt: custom prometheus port lost after adoption
Browse files Browse the repository at this point in the history
If a custom Prometheus port was used before adoption, it was not
taken into account and default 9095 was set instead. Now custom
port is re-applied.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2242346

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

# Conflicts:
#	infrastructure-playbooks/cephadm-adopt.yml
  • Loading branch information
asm0deuz authored and mergify[bot] committed Oct 14, 2024
1 parent 21026ac commit 5e7ceff
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 @@ -1542,8 +1542,24 @@
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: |
service_name: prometheus
service_id: "{{ ansible_facts['hostname'] }}"
placement:
label: {{ monitoring_group_name }}
count: {{ groups.get(monitoring_group_name, []) | length }}
{% if prometheus_port is defined and prometheus_port != 9095 %}
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 }}'
Expand Down

0 comments on commit 5e7ceff

Please sign in to comment.