Skip to content

Commit

Permalink
feat(v2/auto-salvage): retrieve headSvcLvol.UUID when not in cache
Browse files Browse the repository at this point in the history
longhorn/longhorn-8430

Signed-off-by: Chin-Ya Huang <[email protected]>
  • Loading branch information
c3y1huang committed Oct 27, 2024
1 parent a7e9506 commit 78975ca
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/spdk/replica.go
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,11 @@ func (r *Replica) Create(spdkClient *spdkclient.Client, portCount int32, superio
}
headSvcLvol := r.ActiveChain[r.ChainLength-1]

if headSvcLvol.UUID == "" && r.State == types.InstanceStateStopped {
r.log.Debugf("Updating replica %s state from %v to %v because headSvcLvol.UUID is empty", r.Name, r.State, types.InstanceStatePending)
r.State = types.InstanceStatePending
}

// Create bdev lvol if the replica is the new one
if r.State == types.InstanceStatePending {
var lvsList []spdktypes.LvstoreInfo
Expand Down

0 comments on commit 78975ca

Please sign in to comment.