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

[Edge case] Stale deployment.kubernetes.io/desired-replicas annotation block rollout #815

Closed
himanshu-kun opened this issue May 22, 2023 · 1 comment · Fixed by #821
Closed
Labels
area/robustness Robustness, reliability, resilience related kind/bug Bug priority/3 Priority (lower number equals higher priority) status/closed Issue is closed (either delivered or triaged)

Comments

@himanshu-kun
Copy link
Contributor

How to categorize this issue?

/area robustness
/kind bug
/priority 3

What happened:

A case was seen where there was a single machineSet under the machineDeployment with deployment.kubernetes.io/desired-replicas not up-to-date with machinedeloyment.spec.replicas , but machineSet.spec.Replicas ==machineDeployment.spec.replicas

This led to scaling being detected for this machineDeployment in every reconcile but scale not actually happening.

Later when the consumer triggered a rollout (machineDeployment started referring new machineClass) , the rollout never starts as rollout logic is called after scaling logic

What you expected to happen:

  • deployment.kubernetes.io/desired-replicas to re-sync
  • rollout not to get blocked

How to reproduce it (as minimally and precisely as possible):

I am not sure how this situation was reached. Ideally , on any machineSet update , all the machineSets are updated, which should update deployment.kubernetes.io/desired-replicas also.

But these set of events could lead to this situation:
image

Anything else we need to know?:

Environment:
mcm 0.49.0

  • Kubernetes version (use kubectl version):
  • Cloud provider or hardware configuration:
  • Others:
@gardener-robot gardener-robot added area/robustness Robustness, reliability, resilience related priority/3 Priority (lower number equals higher priority) labels May 22, 2023
@himanshu-kun himanshu-kun changed the title [Edge case] Stale Desired replicas annotation block rollout [Edge case] Stale deployment.kubernetes.io/desired-replicas annotation block rollout May 25, 2023
@himanshu-kun
Copy link
Contributor Author

Post grooming discussion

  • desired-replicas-anno should be placed on machineDeployment and not on machineSet , as it increases number of KAPI calls and possibilities of edge cases , Need to look at k/k code on why they decided to do this?

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/robustness Robustness, reliability, resilience related kind/bug Bug priority/3 Priority (lower number equals higher priority) status/closed Issue is closed (either delivered or triaged)
Projects
None yet
2 participants