From 784cd97002621ac31813265af357ec91702c0d9e Mon Sep 17 00:00:00 2001 From: zzhao Date: Tue, 17 Dec 2024 20:49:57 -0600 Subject: [PATCH 1/2] update masq cidr --- .../cucushift-sdn-live-migration-ovn-commands.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci-operator/step-registry/cucushift/sdn-live-migration-ovn/cucushift-sdn-live-migration-ovn-commands.sh b/ci-operator/step-registry/cucushift/sdn-live-migration-ovn/cucushift-sdn-live-migration-ovn-commands.sh index 9e46a873bfef..1348d8b97cc8 100644 --- a/ci-operator/step-registry/cucushift/sdn-live-migration-ovn/cucushift-sdn-live-migration-ovn-commands.sh +++ b/ci-operator/step-registry/cucushift/sdn-live-migration-ovn/cucushift-sdn-live-migration-ovn-commands.sh @@ -34,6 +34,7 @@ EOT # Patch new setting for internalJoinSubnet and internalTransitSwitchSubnet oc patch network.operator.openshift.io cluster --type='merge' -p='{"spec":{"defaultNetwork":{"ovnKubernetesConfig":{"ipv4":{"internalJoinSubnet": "100.65.0.0/16"}}}}}' oc patch network.operator.openshift.io cluster --type='merge' -p='{"spec":{"defaultNetwork":{"ovnKubernetesConfig":{"ipv4":{"internalTransitSwitchSubnet": "100.85.0.0/16"}}}}}' +oc patch networks.operator.openshift.io cluster --type='merge' -p='{"spec":{"defaultNetwork":{"ovnKubernetesConfig":{"gatewayConfig":{"ipv4":{"internalMasqueradeSubnet": "100.254.0.0/17"}}}}}}' # Patch the network configuration for live migration oc patch Network.config.openshift.io cluster --type='merge' --patch '{"metadata":{"annotations":{"network.openshift.io/network-type-migration":""}},"spec":{"networkType":"OVNKubernetes"}}' @@ -57,6 +58,7 @@ until oc get network -o yaml | grep NetworkTypeMigrationCompleted > /dev/null && \ for NODE in \$(oc get nodes -o custom-columns=NAME:.metadata.name --no-headers); do oc get node \$NODE -o yaml | grep "k8s.ovn.org/node-transit-switch-port-ifaddr:" | grep "100.85"; done > /dev/null && \ for NODE in \$(oc get nodes -o custom-columns=NAME:.metadata.name --no-headers); do oc get node \$NODE -o yaml | grep "k8s.ovn.org/node-gateway-router-lrp-ifaddr:" | grep "100.65"; done > /dev/null && \ + for NODE in \$(oc get nodes -o custom-columns=NAME:.metadata.name --no-headers); do oc get node \$NODE -o yaml | grep "k8s.ovn.org/node-masquerade-subnet:" | grep "100.254"; done > /dev/null && \ oc get network.config/cluster -o jsonpath='{.status.networkType}' | grep OVNKubernetes > /dev/null; do echo "Live migration is still in progress" From 5b78d7f4f8f379645dd309b11f05dd1c9d5f95a8 Mon Sep 17 00:00:00 2001 From: zzhao Date: Wed, 18 Dec 2024 00:48:22 -0600 Subject: [PATCH 2/2] checking from ovnkube pod --- .../cucushift-sdn-live-migration-ovn-commands.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-operator/step-registry/cucushift/sdn-live-migration-ovn/cucushift-sdn-live-migration-ovn-commands.sh b/ci-operator/step-registry/cucushift/sdn-live-migration-ovn/cucushift-sdn-live-migration-ovn-commands.sh index 1348d8b97cc8..a543733e5b59 100644 --- a/ci-operator/step-registry/cucushift/sdn-live-migration-ovn/cucushift-sdn-live-migration-ovn-commands.sh +++ b/ci-operator/step-registry/cucushift/sdn-live-migration-ovn/cucushift-sdn-live-migration-ovn-commands.sh @@ -58,7 +58,7 @@ until oc get network -o yaml | grep NetworkTypeMigrationCompleted > /dev/null && \ for NODE in \$(oc get nodes -o custom-columns=NAME:.metadata.name --no-headers); do oc get node \$NODE -o yaml | grep "k8s.ovn.org/node-transit-switch-port-ifaddr:" | grep "100.85"; done > /dev/null && \ for NODE in \$(oc get nodes -o custom-columns=NAME:.metadata.name --no-headers); do oc get node \$NODE -o yaml | grep "k8s.ovn.org/node-gateway-router-lrp-ifaddr:" | grep "100.65"; done > /dev/null && \ - for NODE in \$(oc get nodes -o custom-columns=NAME:.metadata.name --no-headers); do oc get node \$NODE -o yaml | grep "k8s.ovn.org/node-masquerade-subnet:" | grep "100.254"; done > /dev/null && \ + for ovnpod in \$(oc get pod -n openshift-ovn-kubernetes --no-headers -l app=ovnkube-node -o custom-columns=NAME:.metadata.name); do oc exec -n openshift-ovn-kubernetes \$ovnpod ip a s br-ex | grep "100.254"; done > /dev/null && \ oc get network.config/cluster -o jsonpath='{.status.networkType}' | grep OVNKubernetes > /dev/null; do echo "Live migration is still in progress"