Skip to content

Commit

Permalink
Fixed creation of GCNV SMB volumes
Browse files Browse the repository at this point in the history
  • Loading branch information
clintonk authored Nov 19, 2024
1 parent 24ce5c6 commit bd86db8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/fiji/models/handlers/pause_n_times_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
4 changes: 3 additions & 1 deletion storage_drivers/gcp/gcnvapi/gcnv.go
Original file line number Diff line number Diff line change
Expand Up @@ -559,14 +559,16 @@ 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,
SnapshotDirectory: request.SnapshotDirectory,
SecurityStyle: GCNVSecurityStyleFromVolumeSecurityStyle(request.SecurityStyle),
}

if request.ExportPolicy != nil {
newVol.ExportPolicy = exportPolicyExport(request.ExportPolicy)
}
if request.SnapshotReserve != nil {
newVol.SnapReserve = float64(*request.SnapshotReserve)
}
Expand Down

0 comments on commit bd86db8

Please sign in to comment.