AKS icon indicating copy to clipboard operation
AKS copied to clipboard

[BUG] NVME nodes and Azure Container Storage does not work with Cluster Autoscaler

Open dbaur opened this issue 1 year ago • 5 comments

Describe the bug Cluster Autoscaler seems to be incompatible with Azure Container Storage and NVME disks. Instead of scaling the workload, cluster autoscaler will report that there is not enough free storage.

Having a short glimpse at the Azure implementation in cluster autoscaler (https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/azure/azure_template.go#L366-L371) it seems that the autoscaler is only considering the space of the OS Disk instead of the NVME disks.

When manually scaling the node pool, above configuration works fine.

To Reproduce Steps to reproduce the behavior:

  1. Add a node pool with NVME disks e.g. Standard_L16as_v3 and autoscaling enabled
  2. Add pods with ephemeral Azure Container Storage as described in this doc: https://learn.microsoft.com/en-us/azure/storage/container-storage/use-container-storage-with-local-disk
  3. Ensure that the requested ephemeral storage is above the size of the OSDisk (i.e. 300GB)
  4. Cluster Autoscaler will report "NotTriggerScaleUp" with "node(s) did not have enough free storage" (Pod arc-prod/cloud-docker-nvme-m-8bmjh-runner-bd8qp can't be scheduled on aks-prodvnme1-14683117-vmss, predicate checking error: can't schedule pod arc-prod/cloud-docker-nvme-m-8bmjh-runner-bd8qp: predicate "VolumeBinding" didn't pass (predicateReasons=[node(s) did not have enough free storage]; debugInfo=nodeName: "template-node-for-aks-prodvnme1-14683117-vmss-2587677808326040498"))

Expected behavior Cluster autoscaler correctly detects the available disk space on NVME nodes and correctly scales the cluster.

Environment (please complete the following information):

  • Kubernetes version v1.33.3

dbaur avatar Oct 31 '25 10:10 dbaur

Hi @dbaur! Can you let us know the version of Azure Container Storage you're using?

eh8 avatar Nov 10 '25 20:11 eh8

I installed it according to the docs for the 2.x.x version (via the aks extension). The acstor pods (which I assume belong to the container storage extension) are of version v2.0.0.

dbaur avatar Nov 11 '25 08:11 dbaur

@dbaur With above information, I don't see how scale up is triggered and how pod configuration is set. We need these details to continue investigation. Will you please mail to ContainerStorageFeedback [email protected] so we can discuss with details?

fhryo-msft avatar Nov 13 '25 22:11 fhryo-msft

I hope I can re-open this issue, as I believe I'm seeing it too, and a related issue (nicely confirmed and summarised by Anthropic's Sonnet 5)

First, here's some base config:

az aks nodepool add \
  --resource-group $RG \
  --cluster-name $CN \
  --name jobs \
  --node-vm-size Standard_L32as_v4 \
  --node-count 0 \
  --min-count 1 \
  --max-count 2 \
  --enable-cluster-autoscaler \
  --node-taints workload=jobs:NoSchedule \
  --labels workload=jobs \
  --mode User

the --min-count 1 fixes the initial reported issue of the AKS scheduler not being able to scale from 0 to 1 when the NVMe ephemeralDisk is configured.

however, there is a second follow-on issue; summarised here:

Confirmed — your hypothesis is correct, and I have direct evidence from the live cluster (no changes made).

The two separate signals in the pending pod's events tell the full story:

Warning  FailedScheduling   1 Insufficient cpu, 3 node(s) didn't match Pod's node affinity/selector...
Normal   NotTriggerScaleUp  pod didn't trigger scale-up: 1 node(s) did not have enough free storage, 1 node(s) had untolerated taint(s)

Insufficient cpu on the existing node — expected and correct. The one running node has 31.58 allocatable vCPUs; job 1 already reserves 16 (with a limit of 30), so there's no room left for a second 16-vCPU job request on the same node. This is fine — it's exactly what should trigger a scale-up to a 2nd node.

NotTriggerScaleUp: ... not enough free storage — this is the bug. Live storage capacity right now:

NAME SC CAPACITY NODE csisc-5cg76 local-csi 174060Mi aks-jobs-46154097-vmss000000``` ← only ~170Gi left (job 1 is using the other ~4300Gi) The cluster autoscaler is using the existing node's current, already-depleted reported capacity (~170Gi remaining) as its basis for deciding whether a new, second node would have enough storage for the pending 4300Gi request. But a genuinely new node would come up with its own dedicated, fresh ~4470Gi of NVMe — completely unrelated to how much of node 1's storage job 1 has consumed. The autoscaler doesn't understand that local NVMe capacity is per-node-exclusive; it's extrapolating node 1's current utilization onto a hypothetical node 2 and concluding (incorrectly) that scaling up wouldn't help.

What this means: this is a second, distinct manifestation of the same underlying Azure/AKS limitation (Azure/AKS#5403) we found earlier. Previously it blocked scaling from 0→1 nodes; now that a real (but busy) node exists, it's blocking 1→2 as well, specifically whenever the existing node is already fully utilized. In practice, this means the cluster autoscaler will likely never reliably scale this node pool beyond 1 concurrently-busy node for this storage class, regardless of maxCount/maxReplicaCount settings — this isn't something fixable purely through YAML tuning.

andrewf-origin avatar Aug 07 '26 11:08 andrewf-origin

I've sized the job so that it's a one-to-one fit with the Standard_L32as_v4 VM/pod with the expectation that AKS would auto-scale as each job on its own separate instance of Standard_L32as_v4.

That doesn't appear to be working - the second (and n) jobs in the queue sit at Pending until the first completes.

andrewf-origin avatar Aug 07 '26 11:08 andrewf-origin