-
Bug
-
Resolution: Done
-
Normal
-
4.14
-
No
-
Hypershift Sprint 251
-
1
-
False
-
Description of problem:
on a nodepool with Autoscaling Enabled, "oc scale nodepool" command is disabling Autoscaling, but leavs an invalis configuration with Autoscaling info that should have been cleared.
Version-Release number of selected component (if applicable):
(.venv) [kni@ocp-edge77 ocp-edge-auto_cluster]$ oc version Client Version: 4.14.14 Kustomize Version: v5.0.1 Server Version: 4.14.14 Kubernetes Version: v1.27.10+28ed2d7 (.venv) [kni@ocp-edge77 ocp-edge-auto_cluster]$
How reproducible:
happens all the time
Steps to Reproduce:
1. deploy a hub cluster with 3 master nodes, and 0 workers, on it, a hostedcluster with 6 nodes(I've used this job to deploy: https://auto-jenkins-csb-kniqe.apps.ocp-c1.prod.psi.redhat.com/job/CI/job/job-runner/2431/) 2. (.venv) [kni@ocp-edge77 ocp-edge-auto_cluster]$ oc -n clusters patch nodepool hosted-0 --type=json -p '[{"op": "remove", "path": "/spec/replicas"},{"op":"add", "path": "/spec/autoScaling", "value": { "max": 6, "min": 6 }}]' nodepool.hypershift.openshift.io/hosted-0 patched (.venv) [kni@ocp-edge77 ocp-edge-auto_cluster]$ oc get nodepool -A NAMESPACE NAME CLUSTER DESIRED NODES CURRENT NODES AUTOSCALING AUTOREPAIR VERSION UPDATINGVERSION UPDATINGCONFIG MESSAGE clusters hosted-0 hosted-0 6 True False 4.14.14 3. scale to 2 nodes in the nodepool: (.venv) [kni@ocp-edge77 ocp-edge-auto_cluster]$ oc scale nodepool/hosted-0 --namespace clusters --kubeconfig ~/clusterconfigs/auth/hub-kubeconfig --replicas=2 nodepool.hypershift.openshift.io/hosted-0 scaled (.venv) [kni@ocp-edge77 ocp-edge-auto_cluster]$ oc get nodepool -A NAMESPACE NAME CLUSTER DESIRED NODES CURRENT NODES AUTOSCALING AUTOREPAIR VERSION UPDATINGVERSION UPDATINGCONFIG MESSAGE clusters hosted-0 hosted-0 2 6 False False 4.14.14 4. and after scaledown ends : (.venv) [kni@ocp-edge77 ocp-edge-auto_cluster]$ oc get nodepool -A NAMESPACE NAME CLUSTER DESIRED NODES CURRENT NODES AUTOSCALING AUTOREPAIR VERSION UPDATINGVERSION UPDATINGCONFIG MESSAGE clusters hosted-0 hosted-0 2 6 False False 4.14.14
Actual results:
(.venv) [kni@ocp-edge77 ocp-edge-auto_cluster]$ oc describe nodepool hosted-0 --namespace clusters --kubeconfig ~/clusterconfigs/auth/hub-kubeconfig Name: hosted-0 Namespace: clusters Labels: <none> Annotations: hypershift.openshift.io/nodePoolCurrentConfig: de17bd57 hypershift.openshift.io/nodePoolCurrentConfigVersion: 84116781 hypershift.openshift.io/nodePoolPlatformMachineTemplate: hosted-0-52df983b API Version: hypershift.openshift.io/v1beta1 Kind: NodePool Metadata: Creation Timestamp: 2024-03-13T22:39:57Z Finalizers: hypershift.openshift.io/finalizer Generation: 4 Owner References: API Version: hypershift.openshift.io/v1beta1 Kind: HostedCluster Name: hosted-0 UID: ec16c5a2-b8dc-4c54-abe8-297020df4442 Resource Version: 818918 UID: 671bdaf2-c8f9-4431-9493-476e9fe44d76 Spec: Arch: amd64 Auto Scaling: Max: 6 Min: 6 Cluster Name: hosted-0 Management: Auto Repair: false Replace: Rolling Update: Max Surge: 1 Max Unavailable: 0 Strategy: RollingUpdate Upgrade Type: InPlace Node Drain Timeout: 30s Platform: Agent: Type: Agent Release: Image: quay.io/openshift-release-dev/ocp-release:4.14.14-x86_64 Replicas: 2
Expected results:
No spec.autoscaling data, only spec.Replicas:2, as were before Enabling Autoscaling. Spec: Auto Scaling: Max: 6 Min: 6
Additional info:
- is related to
-
OCPBUGS-31875 Disabling nodepool autoscaling by setting an explicit scale on kubevirt provider hosted cluster, is not blocked as for agent provider
- New
- links to