Skip to content

Commit

Permalink
vsphere: skip archived plans when counting inflight vms
Browse files Browse the repository at this point in the history
It could be that we have VMs for which the migration is marked as
started and not marked as completed in archived plans. From now on, we
will not take such VMs into account when counting the inflight VMs.

Signed-off-by: Arik Hadas <[email protected]>
  • Loading branch information
ahadas committed Jun 10, 2024
1 parent eaecc53 commit 5c9cc29
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/controller/plan/scheduler/vsphere/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ func (r *Scheduler) buildInFlight() (err error) {
continue
}

// skip archived plans
if p.Spec.Archived {
continue
}

// skip plans that aren't being executed
snapshot := p.Status.Migration.ActiveSnapshot()
if !snapshot.HasCondition("Executing") {
Expand Down

0 comments on commit 5c9cc29

Please sign in to comment.