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

When Deployment is editing replicas and strategy simultaneously, it may get stuck and not continue to execute #125568

Open
gukc007 opened this issue Jun 18, 2024 · 3 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/apps Categorizes an issue or PR as relevant to SIG Apps.

Comments

@gukc007
Copy link

gukc007 commented Jun 18, 2024

What happened?

When Deployment is editing replicas and strategy simultaneously, it may get stuck and not continue to execute

What did you expect to happen?

deployment continue upgrade or scaled

How can we reproduce it (as minimally and precisely as possible)?

  1. created a deployment with a rolling upgrade and set a large number of replicas, such as 100.
  2. After creating 100 pods, use a slow rolling upgrade like RollingUpdateStrategy: 1 max unavailable, 1 max surge
    to make two active replicasets appear at the same time.
  3. While in the process of rolling upgrade (2 replicaSet), simultaneously edit the upgrade strategy of the deployment to recreate, and modify the number of replicas to 101. (kubectl apply -f xxx.yaml)
  4. At this time, the deployment will be in a stuck state, and it will not be upgraded or scaled no matter how it is modified.

Anything else we need to know?

Deployment will get stuck because of these few lines of code.

https://github.com/kubernetes/kubernetes/blob/64355780d9d945a1135a004829ab9dcc38c3911d/pkg/controller/deployment/deployment_controller.go#L665C2-L671C3

Kubernetes version

v1.23.3

Cloud provider

OS version

Install tools

Container runtime (CRI) and version (if applicable)

Related plugins (CNI, CSI, ...) and versions (if applicable)

@gukc007 gukc007 added the kind/bug Categorizes issue or PR as related to a bug. label Jun 18, 2024
@k8s-ci-robot k8s-ci-robot added needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 18, 2024
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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.

@gukc007
Copy link
Author

gukc007 commented Jun 18, 2024

I don't know if this is a bug or a feature.

@mengjiao-liu
Copy link
Member

/sig apps

@k8s-ci-robot k8s-ci-robot added sig/apps Categorizes an issue or PR as relevant to SIG Apps. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/apps Categorizes an issue or PR as relevant to SIG Apps.
Projects
Status: Needs Triage
Development

No branches or pull requests

3 participants