Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ipsec connect wait service #4854

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pperiyasamy
Copy link
Member

When node goes for a reboot on an IPsec enabled cluster, once it comes up, libreswan parses /etc/ipsec.d/openshift.conf file and establishes SAs with peers and it may be still in progress even after kubelet is started, pod scheduled on this node would fail communicating with other pods until IPsec tunnels are established.
So this commit adds wait-for-ipsec-connect.service systemd service which depends on ipsecenabler.service created by IPsec machine config. This new service loads existing connections into libreswan with auto=start option for every connection and waits upto 3 minutes until IPsec tunnels are established. This service is added into the base template to avoid two reboots during upgrade if it goes into IPsec machine configs rendered by CNO.

TODO: observe ipsec-upgrade behavior with this in CI and need to revisit the logic as it needs to be enabled only on IPsec enabled clusters.

Copy link
Contributor

openshift-ci bot commented Feb 14, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: pperiyasamy
Once this PR has been reviewed and has the lgtm label, please assign umohnani8 for approval. For more information see the Code Review Process.

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

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

@pperiyasamy
Copy link
Member Author

/assign @tssurya

@pperiyasamy
Copy link
Member Author

/assign @jcaamano

@pperiyasamy
Copy link
Member Author

/assign @huiran0826

When node goes for a reboot on an IPsec enabled cluster, once it comes up,
libreswan parses /etc/ipsec.d/openshift.conf file and establishes SAs with
peers and it may be still in progress even after kubelet is started, pod
scheduled on this node would fail communicating with other pods until IPsec
tunnels are established.
So this commit adds wait-for-ipsec-connect.service systemd service which depends
on ipsecenabler.service created by IPsec machine config. This new service loads
existing connections into libreswan with auto=start option for every connection
and waits upto 3 minutes until IPsec tunnels are established.
This service is added into the base template to avoid two reboots during upgrade if it
goes into IPsec machine configs rendered by CNO.

TODO: observe ipsec-upgrade behavior with this in CI and need to revisit the logic
as it needs to be enabled only on IPsec enabled clusters.

Signed-off-by: Periyasamy Palanisamy <[email protected]>
It is for troubleshooting purpose

Signed-off-by: Periyasamy Palanisamy <[email protected]>
Copy link
Contributor

openshift-ci bot commented Feb 20, 2025

@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-gcp-op-single-node 19c2998 link true /test e2e-gcp-op-single-node
ci/prow/e2e-vsphere-ovn-upi-zones 19c2998 link false /test e2e-vsphere-ovn-upi-zones
ci/prow/e2e-azure-ovn-upgrade-out-of-change 19c2998 link false /test e2e-azure-ovn-upgrade-out-of-change
ci/prow/e2e-gcp-op-ocl 19c2998 link false /test e2e-gcp-op-ocl

Full PR test history. Your PR dashboard.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants