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

Machine deployment scale fails after v1alpha3 -> v1alpha4,v1beta1 upgrade #1770

Closed
shysank opened this issue Oct 11, 2021 · 4 comments
Closed
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@shysank
Copy link
Contributor

shysank commented Oct 11, 2021

/kind bug

What steps did you take and what happened:

  1. create v1alpha3 cluster with v1alpha3 providers
  2. upgrade providers to v1beta1
  3. scale md to 2
  4. capi reconciliation fails with validation error in AzureMachineTemplate

What did you expect to happen:
machine deployment should scale to 2

Anything else you would like to add:
This is because we added new default webhooks in azure machine template which were not there in v1alpha3. When capi tries to update owner references for infrastructure reference (azuremachinetemplate), it applies the default webhooks, specifically, it sets osdisk.CachingType = None, but the default webhooks are not applied for the old spec. So, validateUpdate fails because we check for immutability.

Environment:

  • cluster-api-provider-azure version:
  • Kubernetes version: (use kubectl version):
  • OS (e.g. from /etc/os-release):
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 11, 2021
@shysank
Copy link
Contributor Author

shysank commented Oct 11, 2021

/priority important-soon

@k8s-ci-robot k8s-ci-robot added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Oct 11, 2021
@shysank
Copy link
Contributor Author

shysank commented Oct 11, 2021

I verified this by printing old and new specs in validation webhooks:

OLD SPEC = {<nil> Standard_D2s_v3 <nil> <nil> None []  {Linux 0xc000f2180c 0xc000fa4048 <nil> } [] c3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBREFRQUJBQUFCQVFDWVlEYzhHTVQ5RVJXT3NLbXZSVXp0WkZUMEJJY0xpU3JyU2tNTHdGYVJ1WG9kWGwxc2RpRDNubmpKK25iOUlNMEpUQlRnOXUvUDN6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[] false false <nil> <nil> <nil> }

@CecileRobertMichon
Copy link
Contributor

Thanks for catching this @shysank. Looking forward to having CI tests for this.

@shysank
Copy link
Contributor Author

shysank commented Jan 7, 2022

Closing this as this is fixed in #1771 and #1824

@shysank shysank closed this as completed Jan 7, 2022
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. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

No branches or pull requests

3 participants