-
Bug
-
Resolution: Done
-
Undefined
-
None
-
4.15
-
None
-
Low
-
No
-
False
-
Description of problem:
trying to run without a mandatory parameter (--node-upgrade-type), and the err msg includes other parameter (--name) as if its also invalid.
Version-Release number of selected component (if applicable):
[kni@ocp-edge119 ~]$ ~/hypershift_working/hypershift/bin/hcp -v hcp version openshift/hypershift: eeea8fe85184c40579edfa913ffe1e6eb3050ffc. Latest supported OCP: 4.15.0 [kni@ocp-edge119 ~]$ oc version Client Version: 4.14.0-0.nightly-2023-07-27-104118 Kustomize Version: v5.0.1 Server Version: 4.15.0-0.nightly-2024-01-31-032716 Kubernetes Version: v1.28.6+0fb4726
How reproducible:
happens all the time
Steps to Reproduce:
1.on a deployed hub cluster try to deploye a hosted cluster with agent provider without adding the mandatory parameter --node-upgrade-type : [kni@ocp-edge119 ~]$ ~/hypershift_working/hypershift/bin/hcp create nodepool agent --cluster-name hosted-0 --name a-valid-nodepool-name --node-count 2
Actual results:
[kni@ocp-edge119 ~]$ ~/hypershift_working/hypershift/bin/hcp create nodepool agent --cluster-name hosted-0 --name a-valid-nodepool-name --node-count 2 2024-02-01T15:40:44+02:00 ERROR Failed to create nodepool {"error": "NodePool.hypershift.openshift.io \"a-valid-nodepool-name\" is invalid: spec.management.upgradeType: Unsupported value: \"\": supported values: \"Replace\", \"InPlace\""} github.com/openshift/hypershift/cmd/nodepool/core.(*CreateNodePoolOptions).CreateRunFunc.func1 /home/kni/hypershift_working/hypershift/cmd/nodepool/core/create.go:39 github.com/spf13/cobra.(*Command).execute /home/kni/hypershift_working/hypershift/vendor/github.com/spf13/cobra/command.go:983 github.com/spf13/cobra.(*Command).ExecuteC /home/kni/hypershift_working/hypershift/vendor/github.com/spf13/cobra/command.go:1115 github.com/spf13/cobra.(*Command).Execute /home/kni/hypershift_working/hypershift/vendor/github.com/spf13/cobra/command.go:1039 github.com/spf13/cobra.(*Command).ExecuteContext /home/kni/hypershift_working/hypershift/vendor/github.com/spf13/cobra/command.go:1032 main.main /home/kni/hypershift_working/hypershift/product-cli/main.go:60 runtime.main /home/kni/hypershift_working/go/src/runtime/proc.go:250 Error: NodePool.hypershift.openshift.io "a-valid-nodepool-name" is invalid: spec.management.upgradeType: Unsupported value: "": supported values: "Replace", "InPlace" NodePool.hypershift.openshift.io "a-valid-nodepool-name" is invalid: spec.management.upgradeType: Unsupported value: "": supported values: "Replace", "InPlace" [kni@ocp-edge119 ~]$
Expected results:
[kni@ocp-edge119 ~]$ ~/hypershift_working/hypershift/bin/hcp create nodepool agent --cluster-name hosted-0 --name a-valid-nodepool-name --node-count 2 2024-02-01T15:40:44+02:00 ERROR Failed to create nodepool {"error": "NodePool.hypershift.openshift.io \"a-valid-nodepool-name\" is invalid: spec.management.upgradeType: Unsupported value: \"\": supported values: \"Replace\", \"InPlace\""} github.com/openshift/hypershift/cmd/nodepool/core.(*CreateNodePoolOptions).CreateRunFunc.func1 /home/kni/hypershift_working/hypershift/cmd/nodepool/core/create.go:39 github.com/spf13/cobra.(*Command).execute /home/kni/hypershift_working/hypershift/vendor/github.com/spf13/cobra/command.go:983 github.com/spf13/cobra.(*Command).ExecuteC /home/kni/hypershift_working/hypershift/vendor/github.com/spf13/cobra/command.go:1115 github.com/spf13/cobra.(*Command).Execute /home/kni/hypershift_working/hypershift/vendor/github.com/spf13/cobra/command.go:1039 github.com/spf13/cobra.(*Command).ExecuteContext /home/kni/hypershift_working/hypershift/vendor/github.com/spf13/cobra/command.go:1032 main.main /home/kni/hypershift_working/hypershift/product-cli/main.go:60 runtime.main /home/kni/hypershift_working/go/src/runtime/proc.go:250 Error: NodePool.hypershift.openshift.io: spec.management.upgradeType: Unsupported value: "": supported values: "Replace", "InPlace" NodePool.hypershift.openshift.io: spec.management.upgradeType: Unsupported value: "": supported values: "Replace", "InPlace" [kni@ocp-edge119 ~]$
Additional info: