Skip to content

Commit

Permalink
Merge pull request #2063 from jcaamano/dm-20240209
Browse files Browse the repository at this point in the history
OCPBUGS-27853: [DownstreamMerge] 9 Feb 2024
  • Loading branch information
openshift-merge-bot[bot] committed Feb 9, 2024
2 parents c74dcd4 + 3a092e0 commit 780c5a2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Expand Up @@ -286,6 +286,7 @@ jobs:
- name: Free up disk space
run: |
sudo rm -rf /usr/local/lib/android/sdk
sudo apt-get update
sudo eatmydata apt-get purge --auto-remove -y \
azure-cli aspnetcore-* dotnet-* ghc-* firefox \
Expand Down Expand Up @@ -434,6 +435,7 @@ jobs:

- name: Free up disk space
run: |
sudo rm -rf /usr/local/lib/android/sdk
sudo apt-get update
sudo eatmydata apt-get purge --auto-remove -y \
azure-cli aspnetcore-* dotnet-* ghc-* firefox \
Expand Down
16 changes: 15 additions & 1 deletion go-controller/pkg/ovn/base_network_controller.go
Expand Up @@ -796,6 +796,11 @@ func (bnc *BaseNetworkController) nodeZoneClusterChanged(oldNode, newNode *kapi.
}

func (bnc *BaseNetworkController) findMigratablePodIPsForSubnets(subnets []*net.IPNet) ([]*net.IPNet, error) {
// live migration is not supported in combination with secondary networks
if bnc.IsSecondary() {
return nil, nil
}

ipSet := sets.New[string]()
ipList := []*net.IPNet{}
liveMigratablePods, err := kubevirt.FindLiveMigratablePods(bnc.watchFactory)
Expand All @@ -816,7 +821,16 @@ func (bnc *BaseNetworkController) findMigratablePodIPsForSubnets(subnets []*net.
}
podAnnotation, err := util.UnmarshalPodAnnotation(liveMigratablePod.Annotations, bnc.GetNetworkName())
if err != nil {
return nil, err
// even though it can be normal to not have an annotation now, live
// migration is a sensible process that might be used when draining
// nodes on upgrades, so log a warning in every case to have the
// information available
klog.Warningf("Could not get pod annotation of pod %s/%s for network %s: %v",
liveMigratablePod.Namespace,
liveMigratablePod.Name,
bnc.GetNetworkName(),
err)
continue
}
for _, podIP := range podAnnotation.IPs {
if util.IsContainedInAnyCIDR(podIP, subnets...) {
Expand Down

0 comments on commit 780c5a2

Please sign in to comment.