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
Exit with error if <version number or publication> is not the final parameter. #37723
Exit with error if <version number or publication> is not the final parameter. #37723
Conversation
@saad-ali this will need to be cherry-picked to 1.5 |
@@ -33,7 +33,7 @@ source "${KUBE_ROOT}/cluster/kube-util.sh" | |||
function usage() { | |||
echo "!!! EXPERIMENTAL !!!" | |||
echo "" | |||
echo "${0} [-M|-N|-P] -l -o | <version number or publication>" | |||
echo "${0} [-M|-N|-P|-o] -l | <version number or publication>" |
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.
shouldn't it be something like
[-M|-N|-P] [-o] [-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.
actually
[-M|-N|-P|-l] [-o]
?
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.
Changed to [-M|-N|-P] [-o] -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.
I agree with @davidopp. If I were to be pedantic it should be [-M|-N|-P] [-o] (-l | <version number)
;)
62a098e
to
b9384f3
Compare
Ack. Will cherry pick once merged. |
Jenkins unit/integration failed for commit 62a098e. Full PR test history. The magic incantation to run this job again is |
LGTM I'm not sure the usage statement is exactly right but I'm not sure how you say "one of this set is required"... |
Jenkins GKE smoke e2e failed for commit 62a098e. Full PR test history. The magic incantation to run this job again is |
Jenkins GCE Node e2e failed for commit 62a098e. Full PR test history. The magic incantation to run this job again is |
Jenkins Kubemark GCE e2e failed for commit 62a098e. Full PR test history. The magic incantation to run this job again is |
Jenkins CRI GCE Node e2e failed for commit 62a098e. Full PR test history. The magic incantation to run this job again is |
Jenkins verification failed for commit 62a098e. Full PR test history. The magic incantation to run this job again is |
Jenkins GCE etcd3 e2e failed for commit 62a098e. Full PR test history. The magic incantation to run this job again is |
Jenkins GCE e2e failed for commit 62a098e. Full PR test history. The magic incantation to run this job again is |
Jenkins GCI GCE e2e failed for commit b9384f3. Full PR test history. The magic incantation to run this job again is |
This appears to be a typical 1.5 PR. Removing the priority/p0 label. Please justify all priority use. |
Justification: Node upgrade does not work if user follows the usage that is currently given. ref/ #37715 |
Oh sorry, I thought you were asking why it was a 1.5 cherrypick, but you were asking about priority label. I agree about priority label. |
-o has an effect if you omit both -N and -M, because in that case it upgrades both master and node. Excellent that we can use (). This makes me happy. |
b9384f3
to
918b762
Compare
Updated the PR. |
"also, can you update the usage for -l to print that it is only supported for upgrading the master and not nodes?" |
…arameter getopts stops parsing flags after a non-flag, non-arg-to-a-flag parameter. This commit adds an error message if any parameters are passed after the first non-flag, non-arg-to-a-flag parameter in the arg list.
918b762
to
ee0686b
Compare
Done |
LGTM |
Jenkins GCI GKE smoke e2e failed for commit ee0686b. Full PR test history. The magic incantation to run this job again is |
Jenkins kops AWS e2e failed for commit ee0686b. Full PR test history. The magic incantation to run this job again is |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue |
Since the downgrade instructions use upgrade.sh from the 1.4 branch, I think we should cherry pick this into both 1.5 and 1.4. @mtaufen can you create the cherry pick PRs? |
#37834-#37723-#37668-#37721-#37381-#37944-#37997-#37939-#37990-upstream-release-1.5 Automatic merge from submit-queue Automated cherry pick of #35272 #37834 #37723 #37668 #37721 #37381 #37944 #37997 #37939 #37990 upstream release 1.5 Batch cherry pick PRs #35272 #37834 #37723 #37668 #37721 #37381 #37944 #37997 #37939 #37990 from master to release-1.5 branch. PRs #37997 had merge conflicts that needed to be resolved (due to large PRs that merged to master but not 1.5, see this for details) CC PR Authors: @yarntime @ixdy @mtaufen @ymqytw @derekwaynecarr @jszczepkowski @Kargakis @foxish @jingxu97
@roberthbailey I just saw your message while digging through my pile of notifications. Will do. |
…3-upstream-release-1.4 Automated cherry pick of #37723
getopts stops parsing flags after a non-flag, non-arg-to-a-flag parameter.
This commit adds an error message if any parameters are passed after the
first non-flag, non-arg-to-a-flag parameter in the arg list.
This change is