-
Notifications
You must be signed in to change notification settings - Fork 712
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
wrong error message when using kubeadm with unknown phase sub commands #3093
Comments
There are no sig labels on this issue. Please add an appropriate label by using one of the following commands:
Please see the group list for a listing of the SIGs, working groups, and committees available. 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-sigs/prow repository. |
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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-sigs/prow repository. |
@neolit123 Wanted to know if this is relevant enough to be fixed in the kubeadm side, or has more to do with how the flags are parsed. |
/transfer kubeadm |
i don't know if that is an easy fix. |
This seems to a general issue with many subcommands.
|
/retitle wrong error message when using kubeadm with unknown phase sub commands |
kubadm join phase
did some investigation and this seems to be standard cobra behavior. flags are processed before sub-commands and arguments of a parent command. to illustrate:
the unknown flag --bar is processed first and if the invalid flag is removed the unknown command is then detected. i think it's fine for us to acknowledge this issue, but i don't think we need to make any fixes for it in kubeadm or cobra. |
something that we should probably fix is the following:
i.e. the unknown command returns exit code 0. i will send a PR for that. |
What happened?
When executing the below
kubeadm join
commandit gives the
unknown flag
error even though its a subcommand error.What did you expect to happen?
Executing
./kubeadm join phase control-plane-join update-status --config=/run/kubeadm/kubeadm-join-config.yaml
should also give theunknown command
errorHow can we reproduce it (as minimally and precisely as possible)?
make WHAT=cmd/kubeadm
_output/bin/kubeadm join phase control-plain-join update-status --config=/run/kubeadm/kubeadm-join-config.yaml
Anything else we need to know?
update-status
was removed in kubernetes/kubernetes#124373Kubernetes version
Cloud provider
OS version
Install tools
Container runtime (CRI) and version (if applicable)
Related plugins (CNI, CSI, ...) and versions (if applicable)
The text was updated successfully, but these errors were encountered: