-
Notifications
You must be signed in to change notification settings - Fork 81
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] wait for the RHOAI/ODH operator CSV to be in state condition Su… #1177
Conversation
Robot Results
|
…cceeded The installation of ODH often failed due to the fact that we tried to apply the DSC on the cluster even before such CRD resource is known to the cluster (that means that operator itself hasn't been installed completely yet). This change should wait for the installation to be prepared for the DSC application. Timeout is set to 2 minutes.
|
Wait Until Csv Is Ready | ||
[Documentation] Waits some time for given CSV to be in Succeeded status condition | ||
[Arguments] ${csv_name} | ||
Log Waiting for the '${csv_name}' operator CSV in 'Succeeded' status condition console=yes | ||
Wait Until Keyword Succeeds 6 times 20 seconds | ||
... Csv Is Ready ${csv_name} | ||
Log Operator '${csv_name}' CSV is in 'Succeeded' status condition now, let's continue console=yes | ||
|
||
Csv Is Ready | ||
[Documentation] Check whether given CSV to be in Succeeded status condition | ||
[Arguments] ${csv_name} | ||
${rc} ${output} = Run And Return Rc And Output | ||
... oc get csv --namespace openshift-operators --output=json | jq --raw-output --exit-status '.items[] | select(.metadata.name | test("${csv_name}")).status.conditions[] | select(.phase == "Succeeded").phase' # robocop: disable:line-too-long | ||
Should Be Equal As Integers ${rc} 0 | ||
Should Be Equal As Strings Succeeded ${output} |
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.
we have kw which check the subscription and looks for AllCatalogSourcesHealthy
condition. Isn't it equivalent?
Wait Until Operator Subscription Last Condition Is
... type=CatalogSourcesUnhealthy status=False
... reason=AllCatalogSourcesHealthy subcription_name=${SUBSCRIPTION_NAME}
... namespace=${NAMESPACE}
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.
Yeah, TBH, I'm not really sure what is the proper way here. I saw that the subscription marks CatalogSourcesUnhealthy = false
earlier than the CSV sets Succeeded = InstallSucceeded
with message install strategy completed with no errors
. Thus, I though that better way how to check for this is actually checking CSV status. But maybe I'm wrong here, please point me to some source of truth 🤷
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.
hmm I imagine it's a matter of microseconds/seconds? anyways, okay.
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.
Well, the difference is definitely at least seconds. In case of ODH, it looks like the installation take a bit more time than for RHOAI for some reason, where we didn't hit this issue 🤷
I don't plan to use the other keyword here or this one on other places unless we face an issues, I guess 🙂
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
…cceeded
The installation of ODH often failed due to the fact that we tried to apply the DSC on the cluster even before such CRD resource is known to the cluster (that means that operator itself hasn't been installed completely yet). This change should wait for the installation to be prepared for the DSC application. Timeout is set to 2 minutes.
CI:
odh/job/autotrigger-smoke/11
for ODH ✅CI:
rhoai/job/autotrigger-smoke/11
for RHOAI ✅