-
Bug
-
Resolution: Done
-
Minor
-
4.15, 4.16.0
-
Low
-
No
-
Hypershift Sprint 249, Hypershift Sprint 250
-
2
-
False
-
Description of problem:
Trying to run without --node-upgrade-type param fails for "spec.management.upgradeType: Unsupported value: \"\": supported values: \"Replace\", \"InPlace\"" although in --help it is documented to have a default value of 'InPlace'
Version-Release number of selected component (if applicable):
[kni@ocp-edge119 ~]$ ~/hypershift_working/hypershift/bin/hcp -v hcp version openshift/hypershift: af9c0b3ce9c612ec738762a8df893c7598cbf157. Latest supported OCP: 4.15.0 [
How reproducible:
happens all the time
Steps to Reproduce:
1.on an hosted cluster setup run : [kni@ocp-edge119 ~]$ ~/hypershift_working/hypershift/bin/hcp create nodepool agent --cluster-name hosted-0 --name nodepool-of-extra1 --node-count 2 --node-upgrade-type Replace --help Creates basic functional NodePool resources for Agent platformUsage: hcp create nodepool agent [flags]Flags: -h, --help help for agentGlobal Flags: --cluster-name string The name of the HostedCluster nodes in this pool will join. (default "example") --name string The name of the NodePool. --namespace string The namespace in which to create the NodePool. (default "clusters") --node-count int32 The number of nodes to create in the NodePool. (default 2) --node-upgrade-type UpgradeType The NodePool upgrade strategy for how nodes should behave when upgraded. Supported options: Replace, InPlace (default ) --release-image string The release image for nodes; if this is empty, defaults to the same release image as the HostedCluster. --render Render output as YAML to stdout instead of applying. 2.try to run with default value of --node-upgrade-type: [kni@ocp-edge119 ~]$ ~/hypershift_working/hypershift/bin/hcp create nodepool agent --cluster-name hosted-0 --name nodepool-of-extra1 --node-count 2
Actual results:
[kni@ocp-edge119 ~]$ ~/hypershift_working/hypershift/bin/hcp create nodepool agent --cluster-name hosted-0 --name nodepool-of-extra1 --node-count 2 2024-02-06T19:57:03+02:00 ERROR Failed to create nodepool {"error": "NodePool.hypershift.openshift.io \"nodepool-of-extra1\" 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 "nodepool-of-extra1" is invalid: spec.management.upgradeType: Unsupported value: "": supported values: "Replace", "InPlace" NodePool.hypershift.openshift.io "nodepool-of-extra1" is invalid: spec.management.upgradeType: Unsupported value: "": supported values: "Replace", "InPlace"
Expected results:
should pass as if your adding the param : [kni@ocp-edge119 ~]$ ~/hypershift_working/hypershift/bin/hcp create nodepool agent --cluster-name hosted-0 --name nodepool-of-extra1 --node-count 2 --node-upgrade-type InPlace NodePool nodepool-of-extra1 created [kni@ocp-edge119 ~]$
Additional info:
A related issue is that we have a difference if the --help is used with other parameters or not : [kni@ocp-edge119 ~]$ ~/hypershift_working/hypershift/bin/hcp create nodepool agent --cluster-name hosted-0 --name nodepool-of-extra1 --node-count 2 --node-upgrade-type Replace --help > long.help.out [kni@ocp-edge119 ~]$ ~/hypershift_working/hypershift/bin/hcp create nodepool agent --help > short.help.out [kni@ocp-edge119 ~]$ diff long.help.out short.help.out 14c14 < --node-upgrade-type UpgradeType The NodePool upgrade strategy for how nodes should behave when upgraded. Supported options: Replace, InPlace (default ) --- > --node-upgrade-type UpgradeType The NodePool upgrade strategy for how nodes should behave when upgraded. Supported options: Replace, InPlace [kni@ocp-edge119 ~]$
- blocks
-
OCPBUGS-29508 hcp create nodepool agent '--node-upgrade-type' param is mandatory although in --help it has default value
- Closed
- is cloned by
-
OCPBUGS-29508 hcp create nodepool agent '--node-upgrade-type' param is mandatory although in --help it has default value
- Closed
- links to
-
RHEA-2024:0041 OpenShift Container Platform 4.16.z bug fix update