Skip to content

Conversation

@stuggi
Copy link
Contributor

@stuggi stuggi commented Oct 9, 2025

Add route admission status checking to ensure that OpenStackControlPlane expose conditions (e.g., OpenStackControlPlaneExposeBarbicanReady) properly reflect errors from the underlying OpenShift Route objects.

Previously, the expose conditions would be set based only on whether the route could be created, but would not reflect subsequent admission failures by the OpenShift router (e.g., hostname conflicts, invalid configurations). This could leave the condition in a misleading state where it appeared successful while the route was actually not admitted.

Changes:

  • Add checkRouteAdmissionStatus() helper function to inspect route status.ingress[0].conditions for the "Admitted" condition
  • Update ensureRoute() to check route admission status after creation and update the condition accordingly
  • Add OpenStackControlPlaneExposeServiceReadyRouteAdmissionErrorMessage constant for clear error reporting
  • Set expose conditions to True only when routes are successfully admitted
  • Set expose conditions to False with detailed error messages when route admission fails

This ensures that conditions like OpenStackControlPlaneExposeBarbicanReady, OpenStackControlPlaneExposeKeystoneAPIReady, etc. accurately reflect the actual state of the routes, making debugging easier for operators.

The implementation handles edge cases gracefully:

  • Routes without ingress status yet (during initial creation)
  • Routes without admission conditions yet (still being processed)
  • Routes with failed admission (error is surfaced in the condition)
  • Routes successfully admitted (condition set to True)

Note: RouteAdmitted (type "Admitted") is currently the only officially defined condition type in the OpenShift Route API (github.com/openshift/api). The implementation loops through all conditions to be future-proof for when additional condition types are added, but today it will only find the "Admitted" condition.

Jira: https://issues.redhat.com/browse/OSPRH-8984

AssistedBy: cloude-4-sonnet

@openshift-ci openshift-ci bot requested review from fultonj and olliewalsh October 9, 2025 09:13
@openshift-ci openshift-ci bot added the approved label Oct 9, 2025
@stuggi stuggi removed the request for review from fultonj October 9, 2025 09:23
@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/77b0a89dbbed4f338dee884efaf6ddfe

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 17m 59s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 16m 12s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 15m 39s
adoption-standalone-to-crc-ceph-provider NODE_FAILURE Node request 099-0008050892 failed in 0s
✔️ openstack-operator-tempest-multinode SUCCESS in 1h 39m 09s

@stuggi
Copy link
Contributor Author

stuggi commented Oct 9, 2025

/test functional

@stuggi
Copy link
Contributor Author

stuggi commented Oct 10, 2025

/retest

@stuggi stuggi requested a review from abays October 10, 2025 13:21
Copy link
Contributor

@abays abays left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 10, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abays, stuggi

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

The pull request process is described here

Details 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

@stuggi
Copy link
Contributor Author

stuggi commented Oct 13, 2025

/retest

…itions

Add route admission status checking to ensure that OpenStackControlPlane
expose conditions (e.g., OpenStackControlPlaneExposeBarbicanReady) properly
reflect errors from the underlying OpenShift Route objects.

Previously, the expose conditions would be set based only on whether the
route could be created, but would not reflect subsequent admission failures
by the OpenShift router (e.g., hostname conflicts, invalid configurations).
This could leave the condition in a misleading state where it appeared
successful while the route was actually not admitted.

Changes:
- Add checkRouteAdmissionStatus() helper function to inspect route
  status.ingress[0].conditions for the "Admitted" condition
- Update ensureRoute() to check route admission status after creation
  and update the condition accordingly
- Add OpenStackControlPlaneExposeServiceReadyRouteAdmissionErrorMessage
  constant for clear error reporting
- Set expose conditions to True only when routes are successfully admitted
- Set expose conditions to False with detailed error messages when route
  admission fails

This ensures that conditions like OpenStackControlPlaneExposeBarbicanReady,
OpenStackControlPlaneExposeKeystoneAPIReady, etc. accurately reflect the
actual state of the routes, making debugging easier for operators.

The implementation handles edge cases gracefully:
- Routes without ingress status yet (during initial creation)
- Routes without admission conditions yet (still being processed)
- Routes with failed admission (error is surfaced in the condition)
- Routes successfully admitted (condition set to True)

Note: RouteAdmitted (type "Admitted") is currently the only officially
defined condition type in the OpenShift Route API (github.com/openshift/api).
The implementation loops through all conditions to be future-proof for when
additional condition types are added, but today it will only find the
"Admitted" condition.

Jira: https://issues.redhat.com/browse/OSPRH-8984

AssistedBy: cloude-4-sonnet
Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 23, 2025

New changes are detected. LGTM label has been removed.

@abays abays added the lgtm label Oct 24, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit 494cb11 into openstack-k8s-operators:main Oct 24, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants