From bd86db85975729baadd57b2e56ae92762c21efd8 Mon Sep 17 00:00:00 2001 From: Clinton Knight Date: Tue, 19 Nov 2024 10:21:59 -0500 Subject: [PATCH] Fixed creation of GCNV SMB volumes --- internal/fiji/models/handlers/pause_n_times_test.go | 2 +- storage_drivers/gcp/gcnvapi/gcnv.go | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/fiji/models/handlers/pause_n_times_test.go b/internal/fiji/models/handlers/pause_n_times_test.go index 9f3b491ba..8e8abf62b 100644 --- a/internal/fiji/models/handlers/pause_n_times_test.go +++ b/internal/fiji/models/handlers/pause_n_times_test.go @@ -80,6 +80,6 @@ func TestPauseNTimesHandler_Handle(t *testing.T) { _ = handler.Handle() stop := time.Since(start) // Add a padding to handle variability between runs. - maximumPauseTime += 5000 * time.Microsecond + maximumPauseTime += 50 * time.Millisecond assert.GreaterOrEqual(t, maximumPauseTime, stop) } diff --git a/storage_drivers/gcp/gcnvapi/gcnv.go b/storage_drivers/gcp/gcnvapi/gcnv.go index cd073d743..fa5ff8405 100644 --- a/storage_drivers/gcp/gcnvapi/gcnv.go +++ b/storage_drivers/gcp/gcnvapi/gcnv.go @@ -559,7 +559,6 @@ func (c Client) CreateVolume(ctx context.Context, request *VolumeCreateRequest) ShareName: request.CreationToken, StoragePool: request.CapacityPool, CapacityGib: request.SizeBytes / 1073741824, - ExportPolicy: exportPolicyExport(request.ExportPolicy), Protocols: protocols, UnixPermissions: request.UnixPermissions, Labels: request.Labels, @@ -567,6 +566,9 @@ func (c Client) CreateVolume(ctx context.Context, request *VolumeCreateRequest) SecurityStyle: GCNVSecurityStyleFromVolumeSecurityStyle(request.SecurityStyle), } + if request.ExportPolicy != nil { + newVol.ExportPolicy = exportPolicyExport(request.ExportPolicy) + } if request.SnapshotReserve != nil { newVol.SnapReserve = float64(*request.SnapshotReserve) }