Skip to content

Commit

Permalink
disk remove MaxVolumesPerNodeLimit
Browse files Browse the repository at this point in the history
We have instance types that allows >64 disks. For example, OpenAPI DescribeInstanceTypes(MinimumDiskQuantity=66) returns 25 result.
  • Loading branch information
huww98 committed Nov 27, 2024
1 parent ce5c780 commit addabca
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/disk/nodeserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ const (
KMSKeyID = "alibabacloud.com/kms-key-id"
// DefaultMaxVolumesPerNode define default max ebs one node
DefaultMaxVolumesPerNode = 15
// MaxVolumesPerNodeLimit define limit max ebs one node
MaxVolumesPerNodeLimit = 64
// NOUUID is xfs fs mount opts
NOUUID = "nouuid"
// NodeMultiZoneEnable Enable node multi-zone mode
Expand Down Expand Up @@ -165,8 +163,8 @@ func parseVolumeCountEnv() (int, error) {
if err != nil {
return 0, fmt.Errorf("MAX_VOLUMES_PERNODE must be int, but get: %s", volumeNum)
}
if num < 0 || num > MaxVolumesPerNodeLimit {
return 0, fmt.Errorf("MAX_VOLUMES_PERNODE must between 0-%d, but get: %s", MaxVolumesPerNodeLimit, volumeNum)
if num < 0 {
return 0, fmt.Errorf("MAX_VOLUMES_PERNODE must be greater than 0, but got: %s", volumeNum)
}
klog.Infof("MAX_VOLUMES_PERNODE is set to (from env): %d", num)
return num, nil
Expand Down

0 comments on commit addabca

Please sign in to comment.