Skip to content

Adapt the operator to recent OLS release#79

Merged
openshift-merge-bot[bot] merged 3 commits into
openstack-lightspeed:mainfrom
lpiwowar:lpiwowar/fix-kuttl-tests
Feb 4, 2026
Merged

Adapt the operator to recent OLS release#79
openshift-merge-bot[bot] merged 3 commits into
openstack-lightspeed:mainfrom
lpiwowar:lpiwowar/fix-kuttl-tests

Conversation

@lpiwowar

@lpiwowar lpiwowar commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

The recent 1.0.9 release of the OLS operator requires the following changes on our side in order for us to be still compatible:

1. Use overallStatus field from OLSConfig

Simplify IsOLSConfigReady by checking the new overallStatus field instead of iterating over individual conditions. This field is set to Ready when the OLS deployment completes successfully [1].

[1] https://github.com/openshift/lightspeed-operator/pull/1190/changes#diff-77e6d7fe1846c7ad02af9efceb28f7be71b1335993f6d36664418fb4c3bec33bR65

2. Fix RemoveOLSConfig to wait for actual deletion

After calling Delete(), the function now verifies that the OLSConfig is actually deleted by checking if GetOLSConfig returns NotFound.

This prevents a race condition where RemoveOLSConfig would return true while the resource was still in Terminating state (due to the lightspeed-operator's finalizer), causing the controller to proceed with uninstalling the OLS operator before it could remove its own finalizer.

This commit introduced the finalizer on the OLS side [1].

[1] openshift/lightspeed-operator@5571e58

3. Update KUTTL assertion to check overallStatus

Replace the Reconciled condition check with overallStatus: Ready in the OpenStackLightspeed instance assertion. This aligns the test with the updated status section (recent OLS operator release).

Replace the Reconciled condition check with overallStatus: Ready
in the OpenStackLightspeed instance assertion. This aligns the
test with the updated status section (recent OLS operator release).
Simplify IsOLSConfigReady by checking the new overallStatus field
instead of iterating over individual conditions. This field is set
to Ready when the OLS deployment completes successfully.
@openshift-ci

openshift-ci Bot commented Feb 3, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci Bot added the approved label Feb 3, 2026
@lpiwowar

lpiwowar commented Feb 3, 2026

Copy link
Copy Markdown
Contributor Author

/test all

@lpiwowar

lpiwowar commented Feb 3, 2026

Copy link
Copy Markdown
Contributor Author

/test openstack-lightspeed-kuttl-4-18

After calling Delete(), the function now verifies that the OLSConfig
is actually deleted by checking if GetOLSConfig returns NotFound.

This prevents a race condition where RemoveOLSConfig would return
true while the resource was still in Terminating state (due to
the lightspeed-operator's finalizer), causing the controller to
proceed with uninstalling the OLS operator before it could remove
its own finalizer.

This commit introduced the finalizer on the OLS side [1].

[1] openshift/lightspeed-operator@5571e58
@lpiwowar

lpiwowar commented Feb 4, 2026

Copy link
Copy Markdown
Contributor Author

/retest-required

@lpiwowar lpiwowar marked this pull request as ready for review February 4, 2026 13:40
@openshift-ci openshift-ci Bot requested review from Akrog and umago February 4, 2026 13:40
@lpiwowar lpiwowar changed the title Use overallStatus field from OLSConfig Adapt the operator to recent OLS release Feb 4, 2026

@umago umago left a comment

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.

Looks good! I like that it's much simpler now, just looking at the overallStatus field to know when OLSConfig is ready.

@openshift-ci openshift-ci Bot added the lgtm label Feb 4, 2026
@openshift-ci

openshift-ci Bot commented Feb 4, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lpiwowar, umago

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

@openshift-merge-bot openshift-merge-bot Bot merged commit 18c5044 into openstack-lightspeed:main Feb 4, 2026
7 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