Skip to content

Commit

Permalink
Add logs indicating when global migration limits are hit
Browse files Browse the repository at this point in the history
Signed-off-by: David Vossel <[email protected]>
  • Loading branch information
davidvossel committed Dec 14, 2021
1 parent 5c8d3ea commit 01b6e69
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/virt-controller/watch/migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,7 @@ func (c *MigrationController) handleTargetPodCreation(key string, migration *vir

// XXX: Make this configurable, think about limit per node, bandwidth per migration, and so on.
if len(runningMigrations) >= int(*c.clusterConfig.GetMigrationConfiguration().ParallelMigrationsPerCluster) {
log.Log.Object(migration).Infof("Waiting to schedule target pod for vmi [%s/%s] migration because total running parallel migration count [%d] is currently at the global cluster limit.", vmi.Namespace, vmi.Name, len(runningMigrations))
// Let's wait until some migrations are done
c.Queue.AddAfter(key, time.Second*5)
return nil
Expand All @@ -760,6 +761,7 @@ func (c *MigrationController) handleTargetPodCreation(key string, migration *vir
if outboundMigrations >= int(*c.clusterConfig.GetMigrationConfiguration().ParallelOutboundMigrationsPerNode) {
// Let's ensure that we only have two outbound migrations per node
// XXX: Make this configurable, thinkg about inbound migration limit, bandwidh per migration, and so on.
log.Log.Object(migration).Infof("Waiting to schedule target pod for vmi [%s/%s] migration because total running parallel outbound migrations on target node [%d] has hit outbound migrations per node limit.", vmi.Namespace, vmi.Name, outboundMigrations)
c.Queue.AddAfter(key, time.Second*5)
return nil
}
Expand Down

0 comments on commit 01b6e69

Please sign in to comment.