Skip to content

Commit

Permalink
feat(v2/salvage): get snapshots from runtime replicas
Browse files Browse the repository at this point in the history
longhorn/longhorn-8430

Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
  • Loading branch information
c3y1huang committed Sep 27, 2024
1 parent 5890742 commit 479e276
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/instance/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ func (ops V2DataEngineInstanceOps) InstanceGet(req *rpc.InstanceGetRequest) (*rp

switch req.Type {
case types.InstanceTypeEngine:
engine, err := c.EngineGet(req.Name)
engine, err := c.EngineGet(req.Name, false)
if err != nil {
return nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/proxy/replica.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (ops V2DataEngineProxyOps) ReplicaList(ctx context.Context, req *rpc.ProxyE
}
defer c.Close()

recv, err := c.EngineGet(req.EngineName)
recv, err := c.EngineGet(req.EngineName, false)
if err != nil {
return nil, grpcstatus.Error(grpccodes.Internal, errors.Wrapf(err, "failed to get engine %v", req.EngineName).Error())
}
Expand Down Expand Up @@ -228,7 +228,7 @@ func (ops V2DataEngineProxyOps) ReplicaRebuildingStatus(ctx context.Context, req
}
defer engineCli.Close()

e, err := engineCli.EngineGet(req.EngineName)
e, err := engineCli.EngineGet(req.EngineName, false)
if err != nil {
return nil, grpcstatus.Errorf(grpccodes.Internal, "failed to get engine %v: %v", req.EngineName, err)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/proxy/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func (ops V2DataEngineProxyOps) SnapshotList(ctx context.Context, req *rpc.Proxy
}
defer c.Close()

engine, err := c.EngineGet(req.EngineName)
engine, err := c.EngineGet(req.EngineName, true)
if err != nil {
return nil, errors.Wrapf(err, "failed to get engine %v", req.EngineName)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/proxy/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (ops V2DataEngineProxyOps) VolumeGet(ctx context.Context, req *rpc.ProxyEng
}
defer c.Close()

recv, err := c.EngineGet(req.EngineName)
recv, err := c.EngineGet(req.EngineName, false)
if err != nil {
return nil, grpcstatus.Errorf(grpccodes.Internal, "failed to get engine %v: %v", req.EngineName, err)
}
Expand Down

0 comments on commit 479e276

Please sign in to comment.