Skip to content

SDN-5330: Keep rendering OVN IPsec when its daemonset not available - #2628

Merged
openshift-merge-bot[bot] merged 2 commits into
openshift:masterfrom
pperiyasamy:fix-ovn-ipsec-disable-on-upgrade
Feb 6, 2025
Merged

SDN-5330: Keep rendering OVN IPsec when its daemonset not available#2628
openshift-merge-bot[bot] merged 2 commits into
openshift:masterfrom
pperiyasamy:fix-ovn-ipsec-disable-on-upgrade

Conversation

@pperiyasamy

@pperiyasamy pperiyasamy commented Jan 27, 2025

Copy link
Copy Markdown
Member

The commit 4e57dcd is not complete because OVNIPsecStatus is still not set when none of the IPsec daemonset exists on the cluster at the time of machine config pools are updating
(or) node is rebooted. Hence fixing it by OVNIPsecStatus is always set to reflect ipsec deployment state of the cluster
and update the render pipeline to render ovn ipsec for the above mentioned scenarios.

It renders ovn ipsec even before ipsec daemonsets are deployed when IPsec is freshly enabled on the cluster. That's ok because It will be effective only when the ovs-monitor-ipsec script is started and that's going to be done only when the ipsec pod is running. so we are safe to ignore it now.

When IPsec is disabled from API, ovn ipsec is disabled followed by stop rendering ipsec machine config and ipsec daemonset. While ipsec machine configs are removed which would make ovnkube-node daemonset into progressing state and OVNIPsecActive condition becomes true again. Hence this pr considers machine config
status as well so that the rendering pipeline will not render IPsec machine configs again.

It also removes dead code related to IPsec 4.13 upgrade which is no longer valid for upgrade scenarios beyond >= 4.15. This change is intended to be backported until 4.15 so still keeping legacy upgrade scenarios.

@openshift-ci
openshift-ci Bot requested review from dougbtv and jcaamano January 27, 2025 17:19
@pperiyasamy pperiyasamy changed the title Keep rendering OVN IPsec when its daemonset not available SDN-5330: Keep rendering OVN IPsec when its daemonset not available Jan 27, 2025
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 27, 2025
@openshift-ci-robot

openshift-ci-robot commented Jan 27, 2025

Copy link
Copy Markdown
Contributor

@pperiyasamy: This pull request references SDN-5330 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

Details

In response to this:

The commit 4e57dcd is not effective because OVNIPsecStatus is still not set when none of the IPsec daemonset exists on
the cluster. So fixing it now and adding a unit test for it.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@pperiyasamy

Copy link
Copy Markdown
Member Author

/retest

@pperiyasamy

Copy link
Copy Markdown
Member Author

/label acknowledge-critical-fixes-only

@openshift-ci openshift-ci Bot added the acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. label Jan 28, 2025
@pperiyasamy

Copy link
Copy Markdown
Member Author

/assign @jcaamano @trozet

@openshift-ci-robot

openshift-ci-robot commented Jan 28, 2025

Copy link
Copy Markdown
Contributor

@pperiyasamy: This pull request references SDN-5330 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

Details

In response to this:

The commit 4e57dcd is not complete because OVNIPsecStatus is still not set when none of the IPsec daemonset exists on the cluster. So fixing it properly now and adding a unit test for it.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot

openshift-ci-robot commented Jan 28, 2025

Copy link
Copy Markdown
Contributor

@pperiyasamy: This pull request references SDN-5330 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

Details

In response to this:

The commit 4e57dcd is not complete because OVNIPsecStatus is still not set when none of the IPsec daemonset exists on the cluster. So this PR always creates IPsecUpdateStatus object for every reconcile loop irrespective of IPsec daemonsets, populates current state (LegacyIPsecUpgrade and OVNIPsecActive), it's then used in the IPsec state machine for rendering OVN IPsec.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@pperiyasamy

Copy link
Copy Markdown
Member Author

/assign @anuragthehatter

@pperiyasamy

Copy link
Copy Markdown
Member Author

/hold

this breaks ipsec disable, needs fixing

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 28, 2025
@pperiyasamy
pperiyasamy force-pushed the fix-ovn-ipsec-disable-on-upgrade branch from 9be629c to 38fb790 Compare January 28, 2025 18:05
@pperiyasamy

Copy link
Copy Markdown
Member Author

/hold cancel

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 28, 2025
@pperiyasamy

Copy link
Copy Markdown
Member Author

/testwith openshift/cluster-network-operator/master/e2e-aws-ovn-ipsec-upgrade #2606

@pperiyasamy

Copy link
Copy Markdown
Member Author

/test e2e-aws-ovn-ipsec-upgrade
/test e2e-aws-ovn-ipsec-serial

@pperiyasamy

Copy link
Copy Markdown
Member Author

/retest

Comment thread pkg/network/ovn_kubernetes.go Outdated
This removes stale 4.13 IPsec upgrade handling code which
is not a valid anymore for >=4.15 upgrade scenarios.

Signed-off-by: Periyasamy Palanisamy <pepalani@redhat.com>
@pperiyasamy
pperiyasamy force-pushed the fix-ovn-ipsec-disable-on-upgrade branch 2 times, most recently from 10fb24c to 90f7d4e Compare January 30, 2025 13:31
@openshift-ci-robot

openshift-ci-robot commented Jan 30, 2025

Copy link
Copy Markdown
Contributor

@pperiyasamy: This pull request references SDN-5330 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

Details

In response to this:

The commit 4e57dcd is not complete because OVNIPsecStatus is still not set when none of the IPsec daemonset exists on the cluster at the time of machine config pools are updating
(or) node is rebooted. Hence fixing it by OVNIPsecStatus is always set to reflect ipsec deployment state of the cluster
and update the render pipeline to render ovn ipsec for the above mentioned scenarios.

It renders ovn ipsec even before ipsec daemonsets are deployed when IPsec is freshly enabled on the cluster. That's ok because It will be effective only when the ovs-monitor-ipsec script is started and that's going to be done only when the ipsec pod is running. so we are safe to ignore it now.

When IPsec is disabled from API, ovn ipsec is disabled followed by stop rendering ipsec machine config and ipsec daemonset. While ipsec machine configs are removed which would make ovnkube-node daemonset into progressing state and OVNIPsecActive condition becomes true again. Hence this pr considers machine config
status as well so that the rendering pipeline will not render IPsec machine configs again.

It also removes dead code related to IPsec 4.13 upgrade which is no longer valid for upgrade scenarios beyond >= 4.15. This change is intended to be backported until 4.15 so still keeping legacy upgrade scenarios.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Comment thread pkg/network/ovn_kubernetes.go Outdated
Comment on lines +622 to +623
renderIPsecDaemonSet = (isOVNIPsecActive && (isCNOIPsecMachineConfigPresent || isUserDefinedIPsecMachineConfigPresent ||
isHypershiftHostedCluster)) || mode == operv1.IPsecModeFull

@jcaamano jcaamano Jan 31, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you rather tweak isOVNIPsecActive above?

isOVNIPsecActiveOrRollingOut := bootstrapResult.OVN.IPsecUpdateStatus != nil && bootstrapResult.OVN.IPsecUpdateStatus.isOVNIPsecActiveOrRollingOut
// when OVN is rolling out, OVN IPsec might be fully or partially active or inactive.  If MachineConfigs are not present, we know its inactive since we only stop rendering them once inactive.
isOVNIPsecActive := isOVNIPsecActiveOrRollingOut && (isCNOIPsecMachineConfigPresent || isUserDefinedIPsecMachineConfigPresent || isHypershiftHostedCluster)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfect, done.

The commit 4e57dcd is not complete because OVNIPsecStatus
is still not set when none of the IPsec daemonset exists on
the cluster at the time of machine config pools are updating
(or) node is rebooted. Hence fixing it by OVNIPsecStatus is
always set to reflect ipsec deployment state of the cluster
and update the render pipeline to render ovn ipsec for the above
mentioned scenarios.

It renders ovn ipsec even before ipsec daemonsets are deployed
when IPsec is freshly enabled on the cluster. That's ok	because
It will be effective only when the ovs-monitor-ipsec script is
started and that's going to be done only when the ipsec pod is running.
so we are safe to ignore it now.

When IPsec is disabled from API, ovn ipsec is disabled followed
by stop	rendering ipsec	machine	config and ipsec daemonset. While
ipsec machine configs are removed which	would make ovnkube-node
daemonset into progressing state and OVNIPsecActive condition
becomes	true again. Hence this commit considers	machine	config
status as well so that the rendering pipeline will not render IPsec
machine	configs	again.

Signed-off-by: Periyasamy Palanisamy <pepalani@redhat.com>
@pperiyasamy
pperiyasamy force-pushed the fix-ovn-ipsec-disable-on-upgrade branch from 90f7d4e to ff0b147 Compare January 31, 2025 12:14
@jcaamano

Copy link
Copy Markdown
Contributor

/lgtm
/approve

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jan 31, 2025
@openshift-ci

openshift-ci Bot commented Jan 31, 2025

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jcaamano, pperiyasamy

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 31, 2025
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 9ee349a and 2 for PR HEAD ff0b147 in total

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 920c9be and 1 for PR HEAD ff0b147 in total

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 920c9be and 2 for PR HEAD ff0b147 in total

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 0a1a1fa and 1 for PR HEAD ff0b147 in total

@pperiyasamy

Copy link
Copy Markdown
Member Author

/retest-required

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 680b38f and 2 for PR HEAD ff0b147 in total

@pperiyasamy

Copy link
Copy Markdown
Member Author

/retest-required

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 680b38f and 2 for PR HEAD ff0b147 in total

1 similar comment
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 680b38f and 2 for PR HEAD ff0b147 in total

@openshift-ci

openshift-ci Bot commented Feb 5, 2025

Copy link
Copy Markdown
Contributor

@pperiyasamy: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-ovn-ipsec-upgrade 38fb790 link false /test e2e-aws-ovn-ipsec-upgrade
ci/prow/e2e-aws-ovn-ipsec-serial 38fb790 link false /test e2e-aws-ovn-ipsec-serial
ci/prow/e2e-vsphere-ovn-dualstack-primaryv6 ff0b147 link false /test e2e-vsphere-ovn-dualstack-primaryv6
ci/prow/e2e-aws-ovn-single-node ff0b147 link false /test e2e-aws-ovn-single-node
ci/prow/4.18-upgrade-from-stable-4.17-e2e-aws-ovn-upgrade ff0b147 link false /test 4.18-upgrade-from-stable-4.17-e2e-aws-ovn-upgrade
ci/prow/e2e-aws-ovn-serial ff0b147 link false /test e2e-aws-ovn-serial
ci/prow/e2e-aws-hypershift-ovn-kubevirt ff0b147 link false /test e2e-aws-hypershift-ovn-kubevirt
ci/prow/4.18-upgrade-from-stable-4.17-e2e-gcp-ovn-upgrade ff0b147 link false /test 4.18-upgrade-from-stable-4.17-e2e-gcp-ovn-upgrade
ci/prow/security ff0b147 link false /test security
ci/prow/e2e-vsphere-ovn-dualstack ff0b147 link false /test e2e-vsphere-ovn-dualstack

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@pperiyasamy

Copy link
Copy Markdown
Member Author

/retest-required

@openshift-merge-bot
openshift-merge-bot Bot merged commit ff96ab4 into openshift:master Feb 6, 2025
@openshift-bot

Copy link
Copy Markdown
Contributor

[ART PR BUILD NOTIFIER]

Distgit: cluster-network-operator
This PR has been included in build cluster-network-operator-container-v4.19.0-202502061908.p0.gff96ab4.assembly.stream.el9.
All builds following this will include this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants