You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[ansible-operator] Status false when type/reason = Successful #18
I develop an Ansible operator and let it manage its status (and I prefer that way - it will probably manage it better by itself).
However our testers recently complained about the following result:
They would like to see "True" instead of "False" in the status field which would be more coherent with the actual results. (They use some script to check all statuses, my operator being just one amongst many, and wait for True I guess.)
Hi @PYLochou Would you please provide the the full status for your custom resource you observed the above behavior on? From the operator-sdk code, it seems while reconcile is ongoing, the Running condition would be set to true while the Successful condition would be set to false.
I may need to see all the conditions in the status block to be able to aptly determine if we are looking at a bug.
Interesting find. So, it seems in the previous reconcile loop, the Failure condition was set to true and failure reason captured. However, on subsequent reconcile, the Failure condition is set to false and the Running condition was set to true.
I think, it is logical argument to leave the Failure condition as previously set since it is accurate as of time of recording. However, when marking the reconcile to be complete / successfully deployed, then the previous error could be reset.
Yes, I agree ("it is logical argument to leave the Failure condition as previously set since it is accurate as of time of recording") and remove it when the deployment gets successful. No False status should be set anytime on this one IMHO.
Roger that. I will table this in the next meeting and see if there is consensus to make the change. I may explore creating a PR for this in the interim.
I develop an Ansible operator and let it manage its status (and I prefer that way - it will probably manage it better by itself).
However our testers recently complained about the following result:
They would like to see "True" instead of "False" in the status field which would be more coherent with the actual results. (They use some script to check all statuses, my operator being just one amongst many, and wait for True I guess.)
What did you see instead? Under which circumstances?
We actually see status: False and don't understand why.
Environment
Operator type:
/language ansible
Kubernetes cluster type:
OpenShift
$ operator-sdk version
operator-sdk version: "v1.31.0"
$ kubectl version
Client Version: v1.28.1
Additional context
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
Activity
OchiengEd commentedon Sep 20, 2023
Hi @PYLochou Would you please provide the the full status for your custom resource you observed the above behavior on? From the operator-sdk code, it seems while reconcile is ongoing, the
Runningcondition would be set to true while theSuccessfulcondition would be set to false.I may need to see all the conditions in the status block to be able to aptly determine if we are looking at a bug.
PYLochou commentedon Sep 20, 2023
Thank you for the explaination, Edmund. You're right, at this moment there was a reconciliation running:
I'll transmit your explaination to our testers, thank you!
PYLochou commentedon Sep 20, 2023
Another closely-related issue, if I may...?
On another run (with buggy input in the CR, hence the errors), they got the following conditions:
and this time, for the type Failure, they are waiting for status True (which may seem logical), is it again because the reconciliation is running?
OchiengEd commentedon Sep 20, 2023
Interesting find. So, it seems in the previous reconcile loop, the
Failurecondition was set to true and failure reason captured. However, on subsequent reconcile, theFailurecondition is set to false and theRunningcondition was set to true.I think, it is logical argument to leave the
Failurecondition as previously set since it is accurate as of time of recording. However, when marking the reconcile to be complete / successfully deployed, then the previous error could be reset.PYLochou commentedon Sep 21, 2023
Yes, I agree ("it is logical argument to leave the Failure condition as previously set since it is accurate as of time of recording") and remove it when the deployment gets successful. No False status should be set anytime on this one IMHO.
OchiengEd commentedon Sep 21, 2023
Roger that. I will table this in the next meeting and see if there is consensus to make the change. I may explore creating a PR for this in the interim.
OchiengEd commentedon Sep 29, 2023
The PR to solve this issue has been moved to the ansible-operator-plugins repository #14
openshift-ci commentedon Oct 5, 2023
@PYLochou: The label(s)
language/ansiblecannot be applied, because the repository doesn't have them.Details
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
everettraven commentedon Dec 18, 2023
@OchiengEd this was resolved by #35 right?