Cluster-api-provider-azure: API version failure trying to delete VMSS

Created on 21 May 2020  路  9Comments  路  Source: kubernetes-sigs/cluster-api-provider-azure

/kind bug

What steps did you take and what happened:

Trying the experimental MachinePool support, once I enabled --feature-gates=MachinePool=true I ran into this error provisioning a --flavor=machinepool cluster with master:

[manager] E0520 22:39:51.871677 8 controller.go:258] controller-runtime/controller "msg"="Reconciler error" "error"="error deleting AzureCluster default/capz-accelnet-vmss: failed to delete machine pool: failed to delete VMSS capz-accelnet-vmss-mp-0 in resource group : compute.VirtualMachineScaleSetsClient#Delete: Failure sending request: StatusCode=400 -- Original Error: Code=\"InvalidApiVersionParameter\" Message=\"The api-version '2019-12-01' is invalid. The supported versions are '2020-01-01,2019-11-01,2019-10-01,2019-09-01,2019-08-01,2019-07-01,2019-06-01,2019-05-10,2019-05-01,2019-03-01,2018-11-01,2018-09-01,2018-08-01,2018-07-01,2018-06-01,2018-05-01,2018-02-01,2018-01-01,2017-12-01,2017-08-01,2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'.\""

If this error is accurate, then the service doesn't support at least DELETE for version 2019-12-01, despite it being in the SDK. The next-best match that's in SDK 0.42.x is 2019-07-01. This would mean converting some objects between Azure API versions, but I can give that a try if we think it's worthwhile.

What did you expect to happen:

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]

Environment:

  • cluster-api-provider-azure version: master, post-v0.44
  • Kubernetes version: (use kubectl version): 1.18.2
  • OS (e.g. from /etc/os-release):
kinbug prioritimportant-soon

All 9 comments

That's surprising b/c here's the docs:

image

I tried again in southcentralus and didn't see this error. I did get a successful VMSS/MachinePool.

I'll try to do more testing to ensure that it's actually region-specific. Could be a transitional bug as well; it may "just work" now.

Sadly, no: this error is consistent for DELETE, but not the other verbs. I'll try to track this down with the service team responsible.

/assign @mboersma

/priority important-soon

@mboersma for this one did you reach out to the compute team?

/assign

@mboersma I stubbled across what is going on with this error. I'm fixing up a PR right now.

@devigned you're my hero. I tried and failed to reproduce this error with an isolated azure-sdk-for-go example, so I assume it's somehow related to CAPZ (mis-)use of the API...looking forward to learning from your PR.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zawachte-msft picture zawachte-msft  路  3Comments

chewong picture chewong  路  3Comments

nader-ziada picture nader-ziada  路  8Comments

CecileRobertMichon picture CecileRobertMichon  路  5Comments

abhishek-jnpr picture abhishek-jnpr  路  8Comments