Skip to content

Commit

Permalink
feat(v2/auto-salvage): remove blocking for v2 volumes
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 19, 2024
1 parent fb637d9 commit 82f0307
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions controller/volume_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1333,11 +1333,8 @@ func (c *VolumeController) ReconcileVolumeState(v *longhorn.Volume, es map[strin
// At this moment, Longhorn goes into the IF statement below this IF statement and salvage all replicas.
if autoSalvage && !v.Status.IsStandby && !v.Status.RestoreRequired {
// Since all replica failed and autoSalvage is enable, mark engine controller salvage requested
// TODO: SalvageRequested is meanningless for v2 volume
if types.IsDataEngineV1(v.Spec.DataEngine) {
e.Spec.SalvageRequested = true
log.Infof("All replicas are failed, set engine salvageRequested to %v", e.Spec.SalvageRequested)
}
e.Spec.SalvageRequested = true
log.Infof("All replicas are failed, set engine salvageRequested to %v", e.Spec.SalvageRequested)
}
// make sure the volume is detached before automatically salvage replicas
if autoSalvage && v.Status.State == longhorn.VolumeStateDetached && !v.Status.IsStandby && !v.Status.RestoreRequired {
Expand Down

0 comments on commit 82f0307

Please sign in to comment.