Skip to content

Commit

Permalink
Skip LUN task progress
Browse files Browse the repository at this point in the history
LUNs disks are a special case. They do not have a task when migrating
and we do not need to update their progress. The disk are pre-made and
just being attached. Therefore, we need to skip them.

Signed-off-by: Liran Rotenberg <[email protected]>
  • Loading branch information
liranr23 authored and ahadas committed Jul 31, 2023
1 parent 1d93dce commit 9d7e4a4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/controller/plan/migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -1323,6 +1323,10 @@ func (r *Migration) updateCopyProgress(vm *plan.VMStatus, step *plan.Step) (err
return
}
for _, pvc := range pvcs {
if _, ok := pvc.Annotations["lun"]; ok {
// skip LUNs
continue
}
var task *plan.Task
name := r.builder.ResolvePersistentVolumeClaimIdentifier(&pvc)
found := false
Expand Down Expand Up @@ -1585,6 +1589,10 @@ func (r *Migration) updatePopulatorCopyProgress(vm *plan.VMStatus, step *plan.St
}

for _, pvc := range pvcs {
if _, ok := pvc.Annotations["lun"]; ok {
// skip LUNs
continue
}
var task *plan.Task
var taskName string
taskName, err = r.builder.GetPopulatorTaskName(&pvc)
Expand Down

0 comments on commit 9d7e4a4

Please sign in to comment.