diff --git a/hack/generate-gpu-count-table.sh b/hack/generate-gpu-count-table.sh index a401f3b472..ada3762131 100755 --- a/hack/generate-gpu-count-table.sh +++ b/hack/generate-gpu-count-table.sh @@ -35,4 +35,4 @@ function get_all_gpus() { done } -get_all_gpus | sort | uniq | grep -vE "(g5.48xlarge)" +get_all_gpus | sort | uniq | grep -v "g5.48xlarge" diff --git a/hack/generate-instance-store-table.sh b/hack/generate-instance-store-table.sh index ce5497395f..471085e7e5 100755 --- a/hack/generate-instance-store-table.sh +++ b/hack/generate-instance-store-table.sh @@ -37,4 +37,4 @@ function get_all_instance_stores() { done } -get_all_instance_stores | sort | uniq | grep -vE "(g5.48xlarge)" +get_all_instance_stores | sort | uniq | grep -v "g5.48xlarge" diff --git a/pkg/cloud/volume_limits.go b/pkg/cloud/volume_limits.go index 2eb9c7c3cd..78adde15fb 100644 --- a/pkg/cloud/volume_limits.go +++ b/pkg/cloud/volume_limits.go @@ -558,8 +558,8 @@ var gpuInstanceGpus = map[string]int{ } // / Note this table is not a reflection of how many accelerators an instance has but of how many slots their combined acclerators take up -// / VT instance type accelerators take two slots each with the excpetion of the vt1.24xlarge which takes 0 slots for it's acclerators -// / inf1 instance types are purposley not added to this table as they are in the maxVolumeLimits table +// / VT instance type accelerators take two slots each with the exception of the vt1.24xlarge which takes 0 slots for its acclerators +// / inf1 instance types are purposely not added to this table as they are in the maxVolumeLimits table var acceleratorSlotsTaken = map[string]int{ "vt1.3xlarge": 2, "vt1.6xlarge": 4, diff --git a/pkg/driver/node.go b/pkg/driver/node.go index 384fc8737e..69c65aa605 100644 --- a/pkg/driver/node.go +++ b/pkg/driver/node.go @@ -781,8 +781,8 @@ func (d *NodeService) getVolumesLimit() int64 { } dedicatedLimit := cloud.GetDedicatedLimitForInstanceType(instanceType) - maxEBSAttachments, hasMaxvolumeLimit := cloud.GetEBSLimitForInstanceType(instanceType) - if hasMaxvolumeLimit { + maxEBSAttachments, hasMaxVolumeLimit := cloud.GetEBSLimitForInstanceType(instanceType) + if hasMaxVolumeLimit { availableAttachments = min(maxEBSAttachments, availableAttachments) } // For special dedicated limit instance types, the limit is only for EBS volumes @@ -792,8 +792,8 @@ func (d *NodeService) getVolumesLimit() int64 { } else if isNitro { enis := d.metadata.GetNumAttachedENIs() reservedSlots := cloud.GetReservedSlotsForInstanceType(instanceType) - if hasMaxvolumeLimit { - availableAttachments = availableAttachments - reservedSlots + if hasMaxVolumeLimit { + availableAttachments = availableAttachments - (enis - 1) - reservedSlots } else { availableAttachments = availableAttachments - enis - reservedSlots }