diff --git a/pkg/proxy/volume.go b/pkg/proxy/volume.go index 217535ec1..815a8b6c9 100644 --- a/pkg/proxy/volume.go +++ b/pkg/proxy/volume.go @@ -126,8 +126,18 @@ func (ops V1DataEngineProxyOps) VolumeExpand(ctx context.Context, req *rpc.Engin } func (ops V2DataEngineProxyOps) VolumeExpand(ctx context.Context, req *rpc.EngineVolumeExpandRequest) (resp *emptypb.Empty, err error) { - // TODO: Implement this - return nil, grpcstatus.Errorf(grpccodes.Unimplemented, "not implemented") + c, err := getSPDKClientFromEngineAddress(req.ProxyEngineRequest.Address) + if err != nil { + return nil, grpcstatus.Errorf(grpccodes.Internal, errors.Wrapf(err, "failed to get SPDK client from engine address %v", req.ProxyEngineRequest.Address).Error()) + } + defer c.Close() + + err = c.EngineVolumeResize(req.ProxyEngineRequest.EngineName, uint64(req.Expand.Size)) + if err != nil { + return nil, grpcstatus.Errorf(grpccodes.Internal, errors.Wrapf(err, "failed to get engine %v", req.ProxyEngineRequest.EngineName).Error()) + } + + return &emptypb.Empty{}, nil } func (p *Proxy) VolumeFrontendStart(ctx context.Context, req *rpc.EngineVolumeFrontendStartRequest) (resp *emptypb.Empty, err error) { diff --git a/vendor/github.com/longhorn/longhorn-spdk-engine/proto/spdkrpc/spdk.pb.go b/vendor/github.com/longhorn/longhorn-spdk-engine/proto/spdkrpc/spdk.pb.go index 6a490eabd..091c36858 100644 --- a/vendor/github.com/longhorn/longhorn-spdk-engine/proto/spdkrpc/spdk.pb.go +++ b/vendor/github.com/longhorn/longhorn-spdk-engine/proto/spdkrpc/spdk.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v4.25.3 +// protoc v4.24.3 // source: github.com/longhorn/longhorn-spdk-engine/proto/spdkrpc/spdk.proto package spdkrpc