Karpenter VolumeUsage calculation doesn't include volumes in "attaching" state #1852
Labels
kind/bug
Categorizes issue or PR as related to a bug.
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
Description
Observed Behavior:
Karpenter's VolumeUsage class doesn't accurately calculate the number of volumes attached to a node, leading to potential violations of the maximum volume limit per node on AWS. It only considers currently attached volumes and ignores volumes that are in the "attaching" state. This results in all pods in Init status reporting the FailedAttachVolume error.
https://github.com/kubernetes-sigs/karpenter/blob/main/pkg/scheduling/volumeusage.go#L187
Expected Behavior:
The VolumeUsage class should consider both attached and attaching volumes when calculating the total number of volumes on a node. This would ensure that Karpenter respects the maximum volume limit imposed by AWS and prevent pod scheduling failures
Reproduction Steps (Please include YAML):
Sample Workload for Reproducing
Versions:
Client Version: v1.31.2
Kustomize Version: v5.4.2
Server Version: v1.29.10-eks-7f9249a
The text was updated successfully, but these errors were encountered: