Skip to content

Commit 1a6f3da

Browse files
committed
Keep ovn ipsec enabled during the upgrade
It's noticed that ipsec option is ovn is disabled when ipsec daemonset is not running due to known reasons, but it's disabling ipsec in ovn which causes ovs-monitor-ipsec to refresh exisiting ipsec connections unnecessarily as it is not able to find remote_name from tunnel. so this commit enables ovn ipsec option as long as API is set with Full mode. Signed-off-by: Periyasamy Palanisamy <pepalani@redhat.com>
1 parent 5d2e982 commit 1a6f3da

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

pkg/network/ovn_kubernetes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ func shouldRenderIPsec(conf *operv1.OVNKubernetesConfig, bootstrapResult *bootst
671671
// We render OVN IPsec if East-West IPsec is enabled or it's upgrade is in progress.
672672
// If NS IPsec is enabled as well, we need to wait to IPsec MachineConfig
673673
// to be active if it's not an upgrade and not a hypershift hosted cluster.
674-
renderIPsecOVN = (renderIPsecHostDaemonSet || renderIPsecContainerizedDaemonSet) && mode == operv1.IPsecModeFull
674+
renderIPsecOVN = mode == operv1.IPsecModeFull
675675

676676
// While OVN ipsec is being upgraded and IPsec MachineConfigs deployment is in progress
677677
// (or) IPsec config in OVN is being disabled, then ipsec deployment is not updated.

pkg/network/ovn_kubernetes_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3322,13 +3322,13 @@ func TestRenderOVNKubernetesEnableIPsecWithUserInstalledIPsecMachineConfigs(t *t
33223322
if renderedIPsec != nil {
33233323
t.Errorf("ovn-ipsec-host DaemonSet must not exist, but it's available")
33243324
}
3325-
// Ensure ovnkube-node DaemonSet exists without ipsec-enabled annotation.
3325+
// Ensure ovnkube-node DaemonSet exists with ipsec-enabled annotation.
33263326
renderedNode := findInObjs("apps", "DaemonSet", "ovnkube-node", "openshift-ovn-kubernetes", objs)
33273327
if renderedNode == nil {
33283328
t.Errorf("ovnkube-node DaemonSet must exist, but it's not available")
33293329
}
3330-
if _, ok := renderedNode.GetAnnotations()[names.IPsecEnableAnnotation]; ok {
3331-
t.Errorf("ovn-ipsec DaemonSet should not have ipsec-enabled annotation, but it does %v", renderedNode)
3330+
if _, ok := renderedNode.GetAnnotations()[names.IPsecEnableAnnotation]; !ok {
3331+
t.Errorf("ovnkube-node DaemonSet should have ipsec-enabled annotation, but it does not %v", renderedNode)
33323332
}
33333333

33343334
// Step 2: Check renderOVNKubernetes behavior after user defined machine configs rollout is complete.
@@ -3361,7 +3361,7 @@ func TestRenderOVNKubernetesEnableIPsecWithUserInstalledIPsecMachineConfigs(t *t
33613361
t.Errorf("ovnkube-node DaemonSet must exist, but it's not available")
33623362
}
33633363
if _, ok := renderedNode.GetAnnotations()[names.IPsecEnableAnnotation]; !ok {
3364-
t.Errorf("ovn-ipsec DaemonSet should have ipsec-enabled annotation, but it doesn't %v", renderedNode)
3364+
t.Errorf("ovnkube-node DaemonSet should have ipsec-enabled annotation, but it doesn't %v", renderedNode)
33653365
}
33663366
}
33673367

0 commit comments

Comments
 (0)