Skip to content

Commit

Permalink
Luks resize fix
Browse files Browse the repository at this point in the history
Fix luks volume resize
  • Loading branch information
jharrod authored Jan 3, 2025
1 parent 395ba19 commit 06eadbb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/csi/node_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (

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

luksDevice := luks.NewLUKSDevice("", filepath.Base(devicePath), p.command)
luksDevice := luks.NewDetailed("", filepath.Base(devicePath), p.command, p.devices, afero.NewOsFs())
if err := luksDevice.Resize(ctx, passphrase); err != nil {
if errors.IsIncorrectLUKSPassphraseError(err) {
return status.Error(codes.InvalidArgument, err.Error())
Expand Down

0 comments on commit 06eadbb

Please sign in to comment.