Skip to content
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

UI change of replicas not possible #4828

Closed
gaktive opened this issue Dec 30, 2021 · 3 comments
Closed

UI change of replicas not possible #4828

gaktive opened this issue Dec 30, 2021 · 3 comments
Assignees
Milestone

Comments

@gaktive
Copy link
Member

gaktive commented Dec 30, 2021

Internal reference: SURE-2952
Impact: low but has been reported since 2021 April

This was resolved in Ember already as of 2.5.8 but we need to confirm if this is happening in Vue as part of 2.6.x

In the Rancher Cluster Explorer UI change of replicas not possible.

On change of replica after pressing the save button the following error message shows up :

_Deployment.apps "test" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string "workload.user.cattle.io/workloadselector":"apps.deployment-default-test"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable_

 
Repro steps:

  • Create a deployment
  • Change in Cluster Explorer UI the Replica set number.
  • Cluster Explorer UI -> select deployments click on "Edit Config" -> Replicas  (change number) -> Press Save

An error message similar to this one is shown:

_Deployment.apps "test" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string {"workload.user.cattle.io/workloadselector":"apps.deployment-default-test"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable_

Actual behavior: No change of replica in Cluster Explorer UI possible

Expected behavior: Change of replica should be possible also in Cluster Explorer UI.

Additional notes:
The same procedure in the old Cluster Manager UI works fine.
Also on Rancher 2.5.8-rc12 the change of replicas in Cluster Explorer UI works fine. Looks to be fixed in Rancher v2.5.8.

There was an existing report of the issue tracked in rancher/rancher#31235. I was also able to reproduce the behavior in Rancher v2.5.7.

@cnotv
Copy link
Contributor

cnotv commented Feb 11, 2022

The issue cannot be reproduced following the steps.

replica.mp4

@sgapanovich
Copy link

ISSUE IS NOT PRESENT IN 2.6.4 head


Test Environment:

Rancher version: v2.6-head e55a04c
Rancher cluster type: HA
Docker version: 20.10

Downstream cluster type: RKE2 Digital Ocean node driver cluster
Downstream K8s version: v1.21.9+rke2r1


Testing:

  1. Create a deployment with 1 replica
  2. Open the deployment to edit
  3. Edit replicas to 0 --> Deployment scaled down successfully
  4. Open the deployment to edit
  5. Edit replicas to any number --> Deployment scaled up successfully

up down

expected PUT request is sent by UI to https://rancher_url/k8s/clusters/cluster_id/v1/apps.deployments/default/deployment_name with correct number of replicas passed in spec.replicas when replicas are updated and a user clicks "Save"

@gaktive is there anything else you think we should check?

@gaktive
Copy link
Member Author

gaktive commented Feb 23, 2022

@sgapanovich nope, you've covered what I expected. Go ahead and close this, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants