Skip to content

Commit 05ad516

Browse files
bogdandoopenshift-merge-bot[bot]
authored andcommitted
[cifmw_cephadm] fix Swift by Ceph RGW on SNO setup
On SNO with a single EDPM compute (single-host CephHCI), the Ceph ingress service (haproxy/keepalived) is not deployed because the ceph_rgw.yml.j2 spec template only creates it for multi-host clusters. Parameterize RGW port to correct the Keystone Swift endpoint for SNO. Change the VIP detection logic so that if cifmw_cephadm_rgw_vip is pre-set (e.g. to the host's storage IP for SNO cases) - it's preserved. Otherwise it falls back to cifmw_cephadm_vip (the ingress VIP) as before. Users will be able to chose from VIP:8080 vs host_ip:8082 accordingly. Signed-off-by: Bohdan Dobrelia <bdobreli@redhat.com>
1 parent 30df6b8 commit 05ad516

5 files changed

Lines changed: 21 additions & 10 deletions

File tree

docs/dictionary/en-custom.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ fips
237237
firewalld
238238
flbxutz
239239
fmw
240+
frontend
240241
fqdn
241242
freefonts
242243
frmo

roles/cifmw_cephadm/README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,18 @@ that they do not need to be changed for a typical EDPM deployment.
8787
`cifmw_cephadm_bootstrap_conf` file, which represents the initial Ceph
8888
configuration file passed at bootstrap time.
8989

90-
* `cifmw_cephadm_rgw_vip`: the ingress daemon deployed along with `radosgw`
91-
requires a `VIP` that will be owned by `keepalived`. This IP address will
92-
be used as entry point to reach the `radosgw backends` through `haproxy`.
90+
* `cifmw_cephadm_rgw_vip`: an entry point to reach the
91+
`radosgw` service. On multi-node deployments with ingress (haproxy +
92+
keepalived) it holds the value for VIP owned by keepalived that
93+
fronts the RGW backends via haproxy on port 8080. On SNO deployments where
94+
ingress is not deployed, set this to the host's storage network IP so
95+
the Swift endpoint points directly at the RGW daemon (port 8082).
96+
If not set, it defaults to `cifmw_cephadm_vip` (the ingress VIP).
97+
98+
* `cifmw_cephadm_rgw_port`: the port used in Swift/object-store Keystone
99+
endpoints. Defaults to `8080` (the ingress/haproxy frontend port). For
100+
single-node deployments without ingress, set to `8082` (the RGW daemon's
101+
native `rgw_frontend_port`) so clients reach RGW directly.
93102

94103
* `cifmw_cephadm_nfs_vip`: the ingress daemon deployed along with the `nfs`
95104
cluster requires a `VIP` that will be owned by `keepalived`. This IP

roles/cifmw_cephadm/defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ cifmw_cephadm_wait_install_retries: 8
154154
cifmw_cephadm_wait_install_delay: 15
155155
cifmw_cephadm_rgw_ingress_service_name: "ingress.rgw.default"
156156
cifmw_cephadm_rgw_ingress_service_id: "rgw.default"
157+
cifmw_cephadm_rgw_port: 8080
157158
# set ssl_backward compatibily to False if ceph version is equal or greater
158159
# than Tentacle
159160
cifmw_rgw_ssl_backward_compatibility: true

roles/cifmw_cephadm/tasks/configure_object.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,16 +126,16 @@
126126
--url {{ cifmw_cephadm_urischeme }}://{{ (
127127
cifmw_external_dns_vip_ext.values() | first
128128
if cifmw_external_dns_vip_ext is defined
129-
else cifmw_cephadm_rgw_vip | ansible.utils.ipaddr('address')
130-
) }}:8080/swift/v1/AUTH_%\(tenant_id\)s \
129+
else _cephadm_rgw_vip | ansible.utils.ipaddr('address')
130+
) }}:{{ cifmw_cephadm_rgw_port }}/swift/v1/AUTH_%\(tenant_id\)s \
131131
{{ uuid_swift_public_ep.stdout }}
132132
oc -n {{ cifmw_cephadm_ns }} rsh openstackclient \
133133
openstack endpoint set \
134134
--url {{ cifmw_cephadm_urischeme }}://{{ (
135135
cifmw_external_dns_vip_int.values() | first
136136
if cifmw_external_dns_vip_int is defined
137-
else cifmw_cephadm_rgw_vip | ansible.utils.ipaddr('address')
138-
) }}:8080/swift/v1/AUTH_%\(tenant_id\)s \
137+
else _cephadm_rgw_vip | ansible.utils.ipaddr('address')
138+
) }}:{{ cifmw_cephadm_rgw_port }}/swift/v1/AUTH_%\(tenant_id\)s \
139139
{{ uuid_swift_internal_ep.stdout }}
140140
141141
- name: Configure object store to use rgw
@@ -146,8 +146,8 @@
146146
script: |-
147147
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 }}
148148
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 }}
149-
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
150-
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
149+
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 _cephadm_rgw_vip | ansible.utils.ipaddr('address') }}:{{ cifmw_cephadm_rgw_port }}/swift/v1/AUTH_%\(tenant_id\)s
150+
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 _cephadm_rgw_vip | ansible.utils.ipaddr('address') }}:{{ cifmw_cephadm_rgw_port }}/swift/v1/AUTH_%\(tenant_id\)s
151151
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 }}
152152
delegate_to: localhost
153153
when:

roles/cifmw_cephadm/tasks/post.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
- cifmw_ceph_daemons_layout.rgw_enabled | default(true) | bool
5353
ansible.builtin.include_tasks: configure_object.yml
5454
vars:
55-
cifmw_cephadm_rgw_vip: "{{ cifmw_cephadm_vip }}"
55+
_cephadm_rgw_vip: "{{ cifmw_cephadm_rgw_vip | default(cifmw_cephadm_vip) }}"
5656

5757
- name: Create RGW S3 openstack user
5858
when:

0 commit comments

Comments
 (0)