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

Scaling down a MachineDeployment with Machines with the same delete priority may result in too many machines being deleted #6299

Closed
thedadams opened this issue Mar 11, 2022 · 2 comments · Fixed by #6300
Assignees
Labels
area/machine Issues or PRs related to machine lifecycle management kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@thedadams
Copy link
Contributor

thedadams commented Mar 11, 2022

What steps did you take and what happened:

  • Deploy a cluster and set the DeletePolicy for all MachineDeployments to Oldest or Newest.
  • Scale any MachineDeployment up by >= 2.
  • As new machines are provisioning, scale down the MachineDeployment by 1.
    Since all of the currently provisioning machines have the same delete priority as any machine with a non-zero deletion timestamp, this can result in multiple machines (all of the currently provisioning machines) to be deleted.

What did you expect to happen:
Exactly one machine should be deleted when scaling down a MachineDeployment by 1.

Environment:

  • Cluster-api version: 1.0.2
  • Kubernetes version: (use kubectl version): Tested with 1.21.9, 1.21.10, 1.22.3
  • OS (e.g. from /etc/os-release): Any

/kind bug
[One or more /area label. See https://github.com/kubernetes-sigs/cluster-api/labels?q=area for the list of labels]
/area machine

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. area/machine Issues or PRs related to machine lifecycle management labels Mar 11, 2022
@thedadams
Copy link
Contributor Author

/assign thedadams

@fabriziopandini
Copy link
Member

/milestone v1.2
Nice catch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/machine Issues or PRs related to machine lifecycle management kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants