Skip to content

Commit

Permalink
Verify RGW VIP is properly configured in keystone
Browse files Browse the repository at this point in the history
We had an issue related to the rgw_vip configuration. This patch removes
the cidr usage from the fact and passes it to the rgw ingress template.
  • Loading branch information
fultonj authored and fmount committed Oct 1, 2024
1 parent b5d5a01 commit 81363dd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion playbooks/ceph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@
tasks_from: rgw
vars:
# cifmw_cephadm_vip is computed or passed as an override via -e @extra.yml
cifmw_cephadm_rgw_vip: "{{ cifmw_cephadm_vip }}/{{ cidr }}"
cifmw_cephadm_rgw_vip: "{{ cifmw_cephadm_vip }}"

- name: Configure Monitoring Stack
when: cifmw_ceph_daemons_layout.dashboard_enabled | default(false) | bool
Expand Down
4 changes: 2 additions & 2 deletions roles/cifmw_cephadm/tasks/configure_object.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@
script: |-
oc -n {{ cifmw_cephadm_ns }} rsh openstackclient openstack role add --user {{ all_uuids.results.0.stdout }} --project {{ project_service_uuid.stdout }} {{ all_uuids.results.2.stdout }}
oc -n {{ cifmw_cephadm_ns }} rsh openstackclient openstack role add --user {{ all_uuids.results.0.stdout }} --project {{ project_service_uuid.stdout }} {{ all_uuids.results.3.stdout }}
oc -n {{ cifmw_cephadm_ns }} rsh openstackclient openstack endpoint create --region regionOne {{ all_uuids.results.1.stdout }} public {{ cifmw_cephadm_urischeme }}://{{ cifmw_external_dns_vip_ext.values() | first if cifmw_external_dns_vip_ext is defined else cifmw_cephadm_vip }}:8080/swift/v1/AUTH_%\(tenant_id\)s
oc -n {{ cifmw_cephadm_ns }} rsh openstackclient openstack endpoint create --region regionOne {{ all_uuids.results.1.stdout }} internal {{ cifmw_cephadm_urischeme }}://{{ cifmw_external_dns_vip_int.values() | first if cifmw_external_dns_vip_int is defined else cifmw_cephadm_vip }}:8080/swift/v1/AUTH_%\(tenant_id\)s
oc -n {{ cifmw_cephadm_ns }} rsh openstackclient openstack endpoint create --region regionOne {{ all_uuids.results.1.stdout }} public {{ cifmw_cephadm_urischeme }}://{{ cifmw_external_dns_vip_ext.values() | first if cifmw_external_dns_vip_ext is defined else cifmw_cephadm_rgw_vip | ansible.utils.ipaddr('address') }}:8080/swift/v1/AUTH_%\(tenant_id\)s
oc -n {{ cifmw_cephadm_ns }} rsh openstackclient openstack endpoint create --region regionOne {{ all_uuids.results.1.stdout }} internal {{ cifmw_cephadm_urischeme }}://{{ cifmw_external_dns_vip_int.values() | first if cifmw_external_dns_vip_int is defined else cifmw_cephadm_rgw_vip | ansible.utils.ipaddr('address') }}:8080/swift/v1/AUTH_%\(tenant_id\)s
oc -n {{ cifmw_cephadm_ns }} rsh openstackclient openstack role add --project {{ all_uuids.results.4.stdout }} --user {{ all_uuids.results.5.stdout }} {{ all_uuids.results.6.stdout }}
delegate_to: localhost
when:
Expand Down
4 changes: 2 additions & 2 deletions roles/cifmw_cephadm/tasks/rgw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
- name: Define cifmw_external_dns_vip_ext
ansible.builtin.set_fact:
cifmw_external_dns_vip_ext: "{{ cifmw_external_dns_vip_ext | default({}) |
combine({ (cifmw_cephadm_vip): 'rgw-external.ceph.local' }) }}"
combine({ (cifmw_cephadm_rgw_vip | ansible.utils.ipaddr('address')): 'rgw-external.ceph.local' }) }}"

- name: Define cifmw_external_dns_vip_int
ansible.builtin.set_fact:
cifmw_external_dns_vip_int: "{{ cifmw_external_dns_vip_ext | default({}) |
combine({ (cifmw_cephadm_vip): 'rgw-internal.ceph.local' }) }}"
combine({ (cifmw_cephadm_rgw_vip | ansible.utils.ipaddr('address')): 'rgw-internal.ceph.local' }) }}"

- name: Create DNS domain and certificate
ansible.builtin.include_role:
Expand Down
2 changes: 1 addition & 1 deletion roles/cifmw_cephadm/templates/ceph_rgw.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
monitor_port: 8999
virtual_interface_networks:
- {{ cifmw_cephadm_rgw_network }}
virtual_ip: {{ cifmw_cephadm_vip }}
virtual_ip: {{ cifmw_cephadm_rgw_vip }}/{{ cidr }}
{% if rgw_frontend_cert is defined %}
ssl_cert: |
{{ rgw_frontend_cert | indent( width=6 ) }}
Expand Down

0 comments on commit 81363dd

Please sign in to comment.