Skip to content

Conversation

@katarimanojk
Copy link
Contributor

@katarimanojk katarimanojk commented Nov 4, 2025

This commit adds support for configuring Swift object storage to use
Ceph RGW after adoption is complete. The configuration requires the
adopted OpenShift environment to be running with Keystone
services available.

Changes:

  • Add configure_swift_rgw.yaml playbook with three phases:

    1. Extract Swift password and Keystone endpoint from OpenShift
    2. Configure Ceph RGW with Keystone integration settings
    3. Configure Swift endpoints to use RGW backend
  • Add test-configure-object Makefile target to invoke the playbook

  • Playbook uses variables extracted at runtime from the live OpenShift
    environment (ceph_keystone_ep, ceph_keystone_swift_pwd, and
    ceph_rgw_virtual_ips_list) which are passed to the ceph_migrate role

@katarimanojk katarimanojk marked this pull request as draft November 4, 2025 06:21
@openshift-ci
Copy link

openshift-ci bot commented Nov 4, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign holser for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@softwarefactory-project-zuul
Copy link

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.

@katarimanojk katarimanojk force-pushed the uni04deltaipv6_job_configure_rgw branch from 93e6fb1 to 126c7a1 Compare November 6, 2025 15:22
@softwarefactory-project-zuul
Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/e0ed26b1173e467388f255330793e52d

✔️ noop SUCCESS in 0s
✔️ adoption-standalone-to-crc-ceph SUCCESS in 2h 59m 48s
adoption-standalone-to-crc-no-ceph RETRY_LIMIT in 41m 03s

@katarimanojk katarimanojk force-pushed the uni04deltaipv6_job_configure_rgw branch from 551faac to 8796750 Compare November 11, 2025 09:36
@katarimanojk katarimanojk self-assigned this Nov 11, 2025
@katarimanojk katarimanojk marked this pull request as ready for review November 11, 2025 10:18
@katarimanojk
Copy link
Contributor Author

katarimanojk commented Nov 11, 2025

Testing internally.

This log shows that configure_swift_rgw playbook is executed and configured the swift endpoints correctly.

@katarimanojk katarimanojk requested a review from fmount November 11, 2025 10:22
@katarimanojk katarimanojk force-pushed the uni04deltaipv6_job_configure_rgw branch 2 times, most recently from 1e49fb1 to 83fb0e3 Compare November 14, 2025 06:28
@katarimanojk
Copy link
Contributor Author

katarimanojk commented Nov 14, 2025

Tested again on top of the updated code.
This log shows that configure_swift_rgw playbook is executed and configured the swift endpoints correctly. I could manually create/list swift containers which used ceph rgw backend.

@katarimanojk katarimanojk requested review from a team and fmount November 14, 2025 06:31

- name: Set variables for Ceph RGW configuration
ansible.builtin.set_fact:
ceph_keystone_ep: "{{ keystone_url }}"
Copy link
Contributor

Choose a reason for hiding this comment

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

I have a question here. You set ceph_keystone_ep: "{{ keystone_url }}" based on the output of the previous task, which clearly addresses the best case scenario.
What happens when keystone_svc_lb_ip.stdout | length > 0 let the above being skipped? In that case keystone_url won't be set and you will fail on L27.
In addition, as per my reading of this code, we make a double facts assignment, which is not efficient:

  1. keystone_url: "{{ keystone_protocol | default('http') }}://{{ keystone_svc_lb_ip.stdout | ansible.utils.ipwrap }}:5000"
  2. ceph_keystone_ep: "{{ keystone_url }}"

What if we only set the fact once, and skip it, or fail in case keystone_svc_lb_ip.stdout | length <= 0 ?
Same thing might be applied to swift_password_result.stdout. Because I don't see extra checks I'm wondering if we should avoid setting facts multiple times and instead have a fail if the input is not good.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@fmount good catch, i agree there is a scope for improvement here, i will fix it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

This commit adds support for configuring Swift object storage to use
Ceph RGW after adoption is complete. The configuration requires the
adopted OpenShift environment to be running with Keystone
services available.

Changes:
- Add configure_swift_rgw.yaml playbook with three phases:
  1. Extract Swift password and Keystone endpoint from OpenShift
  2. Configure Ceph RGW with Keystone integration settings
  3. Configure Swift endpoints to use RGW backend

- Add test-configure-object Makefile target to invoke the playbook

- Playbook uses variables extracted at runtime from the live OpenShift
  environment (ceph_keystone_ep, ceph_keystone_swift_pwd, and
  ceph_rgw_virtual_ips_list) which are passed to the ceph_migrate role
@katarimanojk katarimanojk force-pushed the uni04deltaipv6_job_configure_rgw branch from 83fb0e3 to 2826c5f Compare November 14, 2025 12:03
@katarimanojk katarimanojk requested a review from fmount November 14, 2025 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants