-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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 validate-cluster.sh #47773
fix validate-cluster.sh #47773
Conversation
cluster/validate-cluster.sh
Outdated
@@ -170,7 +170,7 @@ while true; do | |||
done | |||
|
|||
echo "Validate output:" | |||
kubectl_retry get cs | |||
return_value=$(kubectl_retry get cs) |
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.
This is wrong. return_value
is used in exit
call, which expects integer, plus you shouldn't overwrite what's currently stored in return_value
.
IIUC your main goal is to to prevent errexit
to kill the script when get cs
fails. If that's the case you should write:
echo $(kubectl_retry get cs || true)
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.
Yes. Thanks.
8524954
to
986164e
Compare
/release-note-none |
/lgtm |
/lgtm |
/assign @mikedanese |
/approve |
/retest |
Can we run validation_cluster.sh with the new change against the existing k8s cluster to verify the change? upgrade.sh is flaky. Without any change, the new run of
|
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: caesarxuchao, dchen1107, krousey, krzyzacy, mikedanese Associated issue: 47379 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
@caesarxuchao and I did validation this change against a non-exist cluster. It works as expected. Thanks! |
/test pull-kubernetes-federation-e2e-gce |
Automatic merge from submit-queue |
attempt to fix #47379.
Without this fix, the validate-cluster.sh never retries if
kubectl-retry get cs
fails.cc @dchen1107