Skip to content

Commit

Permalink
Live migration: report network overlap via live_migration_blocked metric
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Kennelly <[email protected]>
  • Loading branch information
martinkennelly authored and pliurh committed Oct 29, 2024
1 parent 2a5220a commit 923242b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/network/cluster_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ const (
unsupportedHCPCluster = "UnsupportedHyperShiftCluster"
unsupportedSDNNetworkIsolationMode = "UnsupportedSDNNetworkIsolationMode"
unsupportedMACVlanInterface = "UnsupportedMACVLANInterface"
networkOverlap = "NetworkOverlap"
)

var metricLiveMigrationBlocked = metrics.NewGaugeVec(&metrics.GaugeOpts{
Expand Down Expand Up @@ -266,6 +267,7 @@ func ValidateLiveMigration(clusterConfig *configv1.Network, infraRes *bootstrap.
}

if err := validateOVNKubernetesCIDROverlap(clusterConfig, operConfig); err != nil {
metricLiveMigrationBlocked.With(prometheus.Labels{metricLiveMigrationBlockedLabelKey: networkOverlap}).Set(1)
return err
}

Expand Down

0 comments on commit 923242b

Please sign in to comment.