Skip to content

Commit

Permalink
Use Ceph monitoring (not RGW) network for Dashboard
Browse files Browse the repository at this point in the history
Use the existing `cifmw_cephadm_monitoring_network`
parameter to configure the Ceph dashboard instead of
the `cifmw_cephadm_rgw_network` parameter. This was
not detected earlier because the Ceph playbook set them
both to the Ceph public_network, but we recently added
a feature to run RGW on a separate network [1].
Also, add retries/delay to the dashboard HTTP check.

[1] openstack-k8s-operators#2301

Jira: https://issues.redhat.com/browse/OSPCIX-506

Signed-off-by: John Fulton <[email protected]>
  • Loading branch information
fultonj committed Sep 26, 2024
1 parent 2520f74 commit 2a06d3f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
2 changes: 2 additions & 0 deletions roles/cifmw_cephadm/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,5 @@ cifmw_cephadm_update_log_commands:
# Get last cephadm logs in case of failure
- type: "mod_cephadm"
cmd: "log last cephadm"
cifmw_cephadm_wait_for_dashboard_retries: 10
cifmw_cephadm_wait_for_dashboard_delay: 20
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@
ansible.builtin.command: |
{{ cifmw_cephadm_ceph_cli }} config set \
mgr mgr/dashboard/{{ current_mgr }}/server_addr \
{{ hostvars[item][all_addresses] | ansible.utils.ipaddr(cifmw_cephadm_rgw_network) | first }}
{{ hostvars[item][all_addresses] | ansible.utils.ipaddr(cifmw_cephadm_monitoring_network) | first }}
become: true
7 changes: 7 additions & 0 deletions roles/cifmw_cephadm/tasks/dashboard/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
dest: "/tmp/dash_response"
register: dashboard_response
failed_when: dashboard_response.failed == true
until: dashboard_response.failed == false
retries: "{{ cifmw_cephadm_wait_for_dashboard_retries }}"
delay: "{{ cifmw_cephadm_wait_for_dashboard_delay }}"


- name: Check http response code from dashboard service with login
ansible.builtin.get_url:
Expand All @@ -13,3 +17,6 @@
password: admin
register: dashboard_resp
failed_when: dashboard_resp.status_code != 200
until: dashboard_resp.status_code == 200
retries: "{{ cifmw_cephadm_wait_for_dashboard_retries }}"
delay: "{{ cifmw_cephadm_wait_for_dashboard_delay }}"
6 changes: 3 additions & 3 deletions roles/cifmw_cephadm/templates/ceph_monitoring_stack.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ placement:
- {{ _hosts[0] }}
count: 1
networks:
- {{ cifmw_cephadm_rgw_network }}
- {{ cifmw_cephadm_monitoring_network }}
---
service_type: prometheus
service_id: prometheus
Expand All @@ -21,7 +21,7 @@ placement:
- {{ _hosts[0] }}
count: 1
networks:
- {{ cifmw_cephadm_rgw_network }}
- {{ cifmw_cephadm_monitoring_network }}
---
service_type: alertmanager
service_id: alertmanager
Expand All @@ -31,4 +31,4 @@ placement:
- {{ _hosts[0] }}
count: 1
networks:
- {{ cifmw_cephadm_rgw_network }}
- {{ cifmw_cephadm_monitoring_network }}

0 comments on commit 2a06d3f

Please sign in to comment.