AKS icon indicating copy to clipboard operation
AKS copied to clipboard

Azure AKS Upgrade fails due to VMSS network-acceleration change

Open Aaron-ML opened this issue 6 years ago • 13 comments


AKS edit to capture below issue/summary:

An issue was found with AKS upgrades on clusters with nodes which support accelerated networking, but have it disabled. Upon upgrade, AKS creation of buffer nodes created to complete the upgrade process did not respect the disabled accelerated networking configuration. This caused upgrade failures due to mixing nodes with accelerated networking. The issue has been identified and mitigations are being applied for open support requests. A fix has been prepared for release. AKS will share more information when the fix is global.


What happened:

Started the upgrade through azure CLI using the following:

az aks upgrade --kubernetes-version 1.15.7 --name cluster1 --resource-group rg-cluster1--subscription K8s-Cluster

It runs for around 5 minutes, a few kube-proxys get restarted and then it reports successful. Although the nodes still report 1.14.8. If you check the VMSS it'll show failed state with the following error.

Cannot add a virtual machine (/subscriptions/<retracted URI>|virtualMachines|11) with accelerated-networking-enabled network interface(s) on an existing availability set (/subscriptions/<retracted URI>/providers/Microsoft.Compute/virtualMachineScaleSets/<aks-scale-setname>-vmss) with VM(s) without accelerated-networking-enabled network interfaces.

For some reason during the upgrade the VMSS gets network-acceleration turned on, even though it's disabled. Causing the new node it tries to deploy to fail.

We have 2 other clusters that have done the same upgrade and have not had this behavior.

What you expected to happen: The upgrade to succeed

How to reproduce it (as minimally and precisely as possible): Start upgrade from 1.14.8 to 1.15.7 on a VMSS enabled cluster with network acceleration off in west-europe region.

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version): v1.14.8
  • Size of cluster (how many worker nodes are in the cluster?) 5 Standard_DS3_v2
  • General description of workloads in the cluster (e.g. HTTP microservices, Java app, Ruby on Rails, machine learning, etc.) Java/HTTP Microservices

Aaron-ML avatar Jan 21 '20 22:01 Aaron-ML

Support ticket submitted: 120012124005728

Aaron-ML avatar Jan 21 '20 22:01 Aaron-ML

This has now happened in two regions: WestEurope and WestUS

Aaron-ML avatar Jan 23 '20 20:01 Aaron-ML

Thanks for sharing the SR, confirming on-call is looking into this and latest will be reported on your SR. Once that issue is confirmed clear we will close this related issue.

jluk avatar Jan 27 '20 17:01 jluk

@jluk I'd love to have this issue tracked somewhere, it can be in the SR or anywhere. This is the second time we've upgraded our production clusters and ran into a show-stopping issue.

Aaron-ML avatar Jan 27 '20 18:01 Aaron-ML

Absolutely - we can use this public issue for broad awareness to make sure everyone has the latest info, your SR will also receive the latest information so we can do both. Your SR should also deliver an explanation specific to your cluster with the detailed fixes.

Does the below capture your scenario concerns? If so, I'll update the original comment and title to reflect this for readability.

An issue was found with AKS upgrades on clusters with nodes which support accelerated networking, but have it disabled. Upon upgrade, AKS creation of buffer nodes created to complete the upgrade process did not respect the disabled accelerated networking configuration. This caused upgrade failures due to mixing nodes with accelerated networking. The issue has been identified and mitigations are being applied for open support requests. A fix has been prepared for release. AKS will share more information when the fix is global.

You can manually mitigate this issue by following the updated steps below

There are 2 options here to get the VMSS back to the healthy state.

Option 1: (Without downtime):

Create a new agent pool and move work load to the new agent pool
Delete the broken VMSS directly from MC_ resource group
Send a PUT request, AKS will recreate the VMSS
Move the workload back to the original pool
Delete the temporarily created agent pool from step 1

Option 2: (with downtime):

Delete the broken VMSS directly from MC_ resource group
Send a PUT, AKS will recreate the VMSS
There is no need for manual intervention after the above steps.

We can close this issue when globally released.

jluk avatar Jan 28 '20 01:01 jluk

@jluk Any timeline for this fix? Just noticed this again and it's making upgrades very painful

Aaron-ML avatar Apr 01 '20 20:04 Aaron-ML

AKS now defaults newly created VMSS pools with AN turned on if the SKU supports it, so that was the proper resolution and should be active now. I forgot to revisit this issue and close it.

If you have an old cluster still exhibiting this behavior though, you'll need to take the mitigation steps to get the VMSS and AKS goal state models synced to have AN on. This requires a full deallocation of all the nodes in the scale set. If you need help with this we can pursue another SR for it if you don't have one already.

Does this help / address your issue?

jluk avatar Apr 03 '20 01:04 jluk

@jluk That works, albeit painful for existing clusters. Just to clarify, you're saying once these old nodes get deallocated and reallocated they will no longer have this issue, If so do the older instructions you posted above still apply?

I only ask because I've been disabling accelerated networking on those clusters to get them to deallocate and upgrade successfully.

Moving forward should we expect breaking changes in upgrade functionality that require manual intervention? We were hoping this would be mitigated on the backend rather than having to down our clusters by hand causing unwanted downtime. Just want to make sure our expectations are inline.

Aaron-ML avatar Apr 03 '20 01:04 Aaron-ML

@Aaron-ML There are 2 options here to get the VMSS back to the healthy state.

Option 1: (Without downtime):

  1. Create a new agent pool and move work load to the new agent pool
  2. Delete the broken VMSS directly from MC_ resource group
  3. Send a PUT request, AKS will recreate the VMSS
  4. Move the workload back to the original pool
  5. Delete the temporarily created agent pool from step 1

Option 2: (with downtime):

  1. Delete the broken VMSS directly from MC_ resource group
  2. Send a PUT, AKS will recreate the VMSS

There is no need for manual intervention after the above steps.

gtxistxgao avatar Apr 03 '20 18:04 gtxistxgao

Thank you @gtxistxgao for the clear steps.

@Aaron-ML please let us know if the mitigation above works for you and if new clusters/pools are resolved.

I will close this if good from your end after those steps, given new clusters shouldn't hit this issue and the mitigation steps should resolve those stuck in unhealthy due to a mixed AN state.

jluk avatar Apr 03 '20 21:04 jluk

With Kubenet, it will not work "instantly":

@Aaron-ML There are 2 options here to get the VMSS back to the healthy state.

Option 1: (Without downtime):

  1. Create a new agent pool and move work load to the new agent pool
  2. Delete the broken VMSS directly from MC_ resource group
  3. Send a PUT request, AKS will recreate the VMSS
  4. Move the workload back to the original pool
  5. Delete the temporarily created agent pool from step 1

Option 2: (with downtime):

  1. Delete the broken VMSS directly from MC_ resource group
  2. Send a PUT, AKS will recreate the VMSS

There is no need for manual intervention after the above steps.

With Kubenet, the Route table entries will not be corrected/changed, so in our case we needed to scale-in (to 1) after step 3 of Option 1 and scale-out again for the Route Table entries to be corrected/changed.

NitroAMD avatar Apr 16 '20 10:04 NitroAMD

This issue has been automatically marked as stale because it has not had activity in 90 days. It will be closed if no further activity occurs. Thank you!

stale[bot] avatar Jul 20 '20 18:07 stale[bot]

This issue will now be closed because it hasn't had any activity for 15 days after stale. Aaron-ML feel free to comment again on the next 7 days to reopen or open a new issue after that time if you still have a question/issue or suggestion.

ghost avatar Aug 04 '20 19:08 ghost