Skip to content

Commit 06eadbb

Browse files
authored
Luks resize fix
Fix luks volume resize
1 parent 395ba19 commit 06eadbb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

frontend/csi/node_server.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import (
1717

1818
"github.com/cenkalti/backoff/v4"
1919
"github.com/container-storage-interface/spec/lib/go/csi"
20+
"github.com/spf13/afero"
2021
"go.uber.org/multierr"
2122
"google.golang.org/grpc/codes"
2223
"google.golang.org/grpc/status"
@@ -524,7 +525,7 @@ func (p *Plugin) nodeExpandVolume(
524525
return status.Error(codes.InvalidArgument, "cannot expand LUKS encrypted volume; empty passphrase provided")
525526
}
526527

527-
luksDevice := luks.NewLUKSDevice("", filepath.Base(devicePath), p.command)
528+
luksDevice := luks.NewDetailed("", filepath.Base(devicePath), p.command, p.devices, afero.NewOsFs())
528529
if err := luksDevice.Resize(ctx, passphrase); err != nil {
529530
if errors.IsIncorrectLUKSPassphraseError(err) {
530531
return status.Error(codes.InvalidArgument, err.Error())

0 commit comments

Comments
 (0)