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
OCPBUGS-32425: Test for the presence of "provisioned" server #8289
OCPBUGS-32425: Test for the presence of "provisioned" server #8289
Conversation
@derekhiggins: This pull request references Jira Issue OCPBUGS-32425, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. 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 openshift-eng/jira-lifecycle-plugin repository. |
@@ -15,9 +15,10 @@ while [ "$(oc get bmh -n openshift-machine-api -o name | wc -l)" -lt 1 ]; do | |||
sleep 20 | |||
done | |||
|
|||
while [ "$(oc get bmh -n openshift-machine-api -l installer.openshift.io/role=control-plane -o json | jq '.items[].status.provisioning.state' | grep -v provisioned -c)" -gt 0 ]; do | |||
N=$(oc get bmh -n openshift-machine-api -l installer.openshift.io/role=control-plane -o json | jq '.items[].status.provisioning.state' | wc -l) |
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.
Probably don't need all those pipes if all we want to do is grab the number of control plane hosts
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.
ack, I've removed the jq
2a15f6e
to
933957b
Compare
/retest-required |
/test e2e-metal-ipi-ovn-ipv6 |
933957b
to
95ad864
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: honza 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 |
/test e2e-metal-ipi-ovn-ipv6 |
1 similar comment
/test e2e-metal-ipi-ovn-ipv6 |
/jira refresh |
@derekhiggins: This pull request references Jira Issue OCPBUGS-32425, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Jira (jhajyahy@redhat.com), skipping review request. 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 openshift-eng/jira-lifecycle-plugin repository. |
sleep 20 | ||
done | ||
echo "Waiting for $N masters to become provisioned" | ||
while [ "$(oc get bmh -n openshift-machine-api -l installer.openshift.io/role=control-plane -o json | jq '.items[].status.provisioning.state' | grep provisioned -c)" -ne "$N" ]; do |
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.
I'm worried about a potential race where we catch Kubernetes with only 2 masters (3rd one just not created yet) and then keep waiting for exactly 2. Maybe change to -ge
?
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.
Good point, (I guess you mean -lt ? )
I'll also move the sleep above so that it waits a little before trying to set the number
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, sorry, got the logic reversed in my head.
19a24fc
to
567a132
Compare
@@ -10,14 +10,16 @@ until oc get baremetalhosts -n openshift-machine-api; do | |||
sleep 20 | |||
done | |||
|
|||
while [ "$(oc get bmh -n openshift-machine-api -o name | wc -l)" -lt 1 ]; do | |||
N="0" | |||
while [ "$N" -eq "0" ] ; do | |||
echo "Waiting for bmh" |
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.
nit: bonus for a more descriptive message here
rather the the absense of lines with "provisioned". If the oc command fails the test will still evaluate to False. Also mask failures from the second "oc get bmh" command so they wont cause the script to exit.
567a132
to
0b1867d
Compare
/lgtm |
e87c42a
into
openshift:master
@derekhiggins: Jira Issue OCPBUGS-32425: All pull requests linked via external trackers have merged: Jira Issue OCPBUGS-32425 has been moved to the MODIFIED state. 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 openshift-eng/jira-lifecycle-plugin repository. |
Fix included in accepted release 4.16.0-0.nightly-2024-04-26-145258 |
rather the the absense of lines with "provisioned". If the oc command fails the test will still evaluate to False.
Also mask failures from the second "oc get bmh" command so they wont cause the script to exit.