Skip to content

feat: add support for RGW in ci-multinode#2337

Draft
jackhodgkiss wants to merge 1 commit into
stackhpc/2025.1from
add-multinode-rgw-support
Draft

feat: add support for RGW in ci-multinode#2337
jackhodgkiss wants to merge 1 commit into
stackhpc/2025.1from
add-multinode-rgw-support

Conversation

@jackhodgkiss
Copy link
Copy Markdown
Contributor

Add support for RGW deployment in ci-multinode environments.

@github-actions github-actions Bot added the waiting-review PR is waiting for a review label Jun 1, 2026
@jackhodgkiss
Copy link
Copy Markdown
Contributor Author

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request configures Ceph RGW (Rados Gateway) for a CI multinode environment. It enables Ceph RGW in Kolla, defines RGW configuration commands in Cephadm, configures RGW hosts in Kolla globals, and sets up public network interfaces for storage nodes. Feedback has been provided to address a potential undefined variable error by using os_distribution instead of os_release for the CA bundle path, and to replace the fragile index-based groups.rgws lookup with direct hostname lookups for RGW hosts.

Comment on lines +78 to +87
ceph_rgw_hosts:
- host: storage-01
ip: "{{ lookup('vars', storage_net_name ~ '_ips')[groups.rgws.0] }}"
port: 8100
- host: storage-02
ip: "{{ lookup('vars', storage_net_name ~ '_ips')[groups.rgws.1] }}"
port: 8100
- host: storage-03
ip: "{{ lookup('vars', storage_net_name ~ '_ips')[groups.rgws.2] }}"
port: 8100
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Using groups.rgws is problematic for two reasons:

  1. The standard Kolla Ansible group name for Ceph RGW is rgw, not rgws, which would cause a template rendering failure.
  2. Relying on the list index of the group (e.g., groups.rgws.0) is fragile because it assumes a specific ordering of hosts in the inventory and that there are at least 3 hosts in that group.

Since the hostnames (storage-01, storage-02, storage-03) are already hardcoded here, it is much safer and more robust to look up their IPs directly by hostname from the <network>_ips dictionary.

ceph_rgw_hosts:
  - host: storage-01
    ip: "{{ lookup('vars', storage_net_name ~ '_ips')['storage-01'] }}"
    port: 8100
  - host: storage-02
    ip: "{{ lookup('vars', storage_net_name ~ '_ips')['storage-02'] }}"
    port: 8100
  - host: storage-03
    ip: "{{ lookup('vars', storage_net_name ~ '_ips')['storage-03'] }}"
    port: 8100

Comment on lines +115 to +120
ca_bundle_path: >-
{{
'/etc/ssl/certs/ca-certificates.crt'
if os_release == 'ubuntu'
else '/etc/pki/tls/certs/ca-bundle.crt'
}}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The variable os_release is not standard in this environment's configuration files. Other files (such as kolla.yml, storage.yml, and kolla/globals.yml) consistently use os_distribution to determine the OS flavor (e.g., 'ubuntu'). Using os_release here may result in an undefined variable error or incorrect evaluation.

ca_bundle_path: >-
  {{
    '/etc/ssl/certs/ca-certificates.crt'
    if os_distribution == 'ubuntu'
    else '/etc/pki/tls/certs/ca-bundle.crt'
  }}

Signed-off-by: Jack Hodgkiss <jack@stackhpc.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-review PR is waiting for a review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant