-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix previously unset "Ready" conditions #311
Conversation
Skipping CI for Draft Pull Request. |
/test all |
/retest |
1c1f74b
to
9e7ee9f
Compare
/hold @fmount since you did the initial work on conditions in #290 and #291 I want to check with you about this. Do you think this is the right approach for setting those conditions to ready? I saw your discussion with @gibizer in https://github.com/openstack-k8s-operators/octavia-operator/pull/291/files#r1557376428 about mirroring, and I am not sure I understand how it is supposed to work. That said, this patch does not seem to be complete yet. In my install_yamls environment I still see some of the conditions for Octavia unset:
I will need to investigate that further. |
@weinimo FYI "Deployment" and "Exposing service" conditions are only used when uploading an amphora image. |
I did a few investigation on the current code and I think the problem is not related to the ExposeServiceReady Both are part of the same function, DeploymentReady As per the current code, this condition is useless: a deployment is created and deleted within the same function (unless I'm overlooking something relevant), but in general, we already have a + depl := deployment.NewDeployment(
+ octavia.ImageUploadDeployment(instance, serviceLabels),
+ time.Duration(5)*time.Second,
+ )
+ ctrlResult, err = depl.CreateOrPatch(ctx, helper)
+ if err != nil {
+ instance.Status.Conditions.Set(condition.FalseCondition(
+ octaviav1.OctaviaAmphoraImagesReadyCondition,
+ condition.ErrorReason,
+ condition.SeverityWarning,
+ octaviav1.OctaviaAmphoraImagesReadyErrorMessage,
+ err.Error()))
+ return ctrlResult, err
+ } else if (ctrlResult != ctrl.Result{}) {
+ instance.Status.Conditions.Set(condition.FalseCondition(
+ octaviav1.OctaviaAmphoraImagesReadyCondition,
+ condition.ErrorReason,
+ condition.SeverityWarning,
+ octaviav1.OctaviaAmphoraImagesReadyErrorMessage,
+ err.Error()))
+ return ctrlResult, nil
+ } If everything goes well, when this function returns everything is marked True and mirrored to the main condition.
We can dig more into the above, but [1] should cover what we need to unblock the conditions related issues. |
... of types: RabbitMqTransportURLReady OctaviaHealthManagerReady OctaviaHousekeepingReady OctaviaWorkerReady Jira: OSPRH-6678
9e7ee9f
to
3b1bf96
Compare
/hold cancel Thanks a lot for your analysis and explanation @fmount. It makes sense to me. I tested your proposed change (combined with the Rabbit MQ transport URL conditions fix) and it seems to resolve all conditions issues. Yay. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fmount, weinimo The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
... of types:
Jira: OSPRH-6678