Skip to content

Commit 2979f47

Browse files
authored
Merge pull request #2057 from jsafrane/upstream-fix-hyperdisk-limits
Fix hyperdisk attach limits
2 parents c08bad5 + 0895747 commit 2979f47

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

Diff for: pkg/common/constants.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ var Gen4MachineHyperdiskAttachLimitMap = []struct {
6767
max int64
6868
value int64
6969
}{
70-
{max: 4, value: 16},
71-
{max: 8, value: 24},
72-
{max: 16, value: 32},
73-
{max: 32, value: 48},
74-
{max: 64, value: 64},
75-
{max: 1024, value: 128},
70+
{max: 4, value: 15},
71+
{max: 8, value: 23},
72+
{max: 16, value: 31},
73+
{max: 32, value: 49},
74+
{max: 64, value: 63},
75+
{max: 1024, value: 127},
7676
}

Diff for: pkg/gce-pd-csi-driver/node.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ const (
9999
volumeLimitSmall int64 = 15
100100
volumeLimitBig int64 = 127
101101
// doc https://cloud.google.com/compute/docs/memory-optimized-machines#x4_disks
102-
x4HyperdiskLimit int64 = 40
102+
x4HyperdiskLimit int64 = 39
103103
// doc https://cloud.google.com/compute/docs/accelerator-optimized-machines#a4-disks
104-
a4HyperdiskLimit int64 = 128
104+
a4HyperdiskLimit int64 = 127
105105
defaultLinuxFsType = "ext4"
106106
defaultWindowsFsType = "ntfs"
107107
fsTypeExt3 = "ext3"

Diff for: pkg/gce-pd-csi-driver/node_test.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -271,27 +271,27 @@ func TestNodeGetVolumeLimits(t *testing.T) {
271271
{
272272
name: "c4-standard-192",
273273
machineType: "c4-standard-192",
274-
expVolumeLimit: 128,
274+
expVolumeLimit: 127,
275275
},
276276
{
277277
name: "c4-standard-48",
278278
machineType: "c4-standard-48",
279-
expVolumeLimit: 64,
279+
expVolumeLimit: 63,
280280
},
281281
{
282282
name: "c4a-standard-4",
283283
machineType: "c4a-standard-4",
284-
expVolumeLimit: 16,
284+
expVolumeLimit: 15,
285285
},
286286
{
287287
name: "n4-standard-16",
288288
machineType: "n4-standard-16",
289-
expVolumeLimit: 32,
289+
expVolumeLimit: 31,
290290
},
291291
{
292292
name: "n4-highcpu-4",
293293
machineType: "n4-highcpu-4",
294-
expVolumeLimit: 16,
294+
expVolumeLimit: 15,
295295
},
296296
{
297297
name: "invalid gen4 machine type",

0 commit comments

Comments
 (0)