Skip to content

Commit

Permalink
feat(v2/salvage): identify engine instance created to salvage
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 Nov 1, 2024
1 parent 7c26a4d commit 2576ccf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pkg/client/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ type EngineCreateRequest struct {
InitiatorAddress string
TargetAddress string
UpgradeRequired bool
SalvageRequested bool
}

type ReplicaCreateRequest struct {
Expand Down Expand Up @@ -147,6 +148,7 @@ func (c *InstanceServiceClient) InstanceCreate(req *InstanceCreateRequest) (*api
Size: req.Size,
ReplicaAddressMap: req.Engine.ReplicaAddressMap,
Frontend: req.Engine.Frontend,
SalvageRequested: req.Engine.SalvageRequested,
}
case types.InstanceTypeReplica:
spdkInstanceSpec = &rpc.SpdkInstanceSpec{
Expand Down
2 changes: 1 addition & 1 deletion pkg/instance/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (ops V2DataEngineInstanceOps) InstanceCreate(req *rpc.InstanceCreateRequest
switch req.Spec.Type {
case types.InstanceTypeEngine:
engine, err := c.EngineCreate(req.Spec.Name, req.Spec.VolumeName, req.Spec.SpdkInstanceSpec.Frontend, req.Spec.SpdkInstanceSpec.Size, req.Spec.SpdkInstanceSpec.ReplicaAddressMap,
req.Spec.PortCount, req.Spec.InitiatorAddress, req.Spec.TargetAddress, req.Spec.UpgradeRequired)
req.Spec.PortCount, req.Spec.InitiatorAddress, req.Spec.TargetAddress, req.Spec.UpgradeRequired, req.Spec.SpdkInstanceSpec.SalvageRequested)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 2576ccf

Please sign in to comment.