Skip to content

Conversation

@pperiyasamy
Copy link
Member

test duplicate key 'phase2alg' fix for nncp deployment

@coderabbitai
Copy link

coderabbitai bot commented Dec 10, 2025

Walkthrough

Updates two IPsec MachineConfig manifests to add an annotation and an osImageURL, change an ipsecenabler.service ExecStartPre to use systemd-tmpfiles, and remove the extensions: - ipsec block; also simplifies OVN IPsec activation logic in pkg/network/ovn_kubernetes.go to ignore user-defined IPsec MachineConfigs.

Changes

Cohort / File(s) Summary
MachineConfig IPsec master & worker
bindata/network/ovn-kubernetes/common/80-ipsec-master-extensions.yaml, bindata/network/ovn-kubernetes/common/80-ipsec-worker-extensions.yaml
Added metadata.annotations.user-ipsec-machine-config: "true" and spec.osImageURL: quay.io/pepalani/ipsec-rhcos-layered-image:nm-libreswan-fix; replaced ExecStartPre in ipsecenabler.service from rm -f /etc/ipsec.d/cno.conf to systemd-tmpfiles --create /usr/lib/rpm-ostree/tmpfiles.d/libreswan.conf; removed extensions: - ipsec block.
OVN IPsec rendering logic
pkg/network/ovn_kubernetes.go
Removed checks that treated user-defined IPsec MachineConfigs as contributing to OVN IPsec activation and rendering decisions. OVN IPsec active determination now depends only on CNO IPsec MachineConfig presence or hypershift_hosted_cluster; rendering gates updated accordingly. Comments adjusted.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Mixed changes: manifest edits (configuration and image reference) plus logic change in Go code.
  • Review attention:
    • Confirm the new osImageURL image is correct and intended for layered RHCOS usage.
    • Verify the systemd-tmpfiles invocation and referenced tmpfiles.d entry create the expected files on target hosts.
    • Validate behavioral impact of ignoring user-defined IPsec MachineConfigs in pkg/network/ovn_kubernetes.go, including cluster upgrade and existing-user-config interactions.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.5.0)

Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions
The command is terminated due to an error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions


Comment @coderabbitai help to get the list of available commands and usage tips.

@pperiyasamy
Copy link
Member Author

/test ?

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 10, 2025

@pperiyasamy: The following commands are available to trigger required jobs:

/test 4.21-upgrade-from-stable-4.20-images
/test e2e-aws-ovn-hypershift-conformance
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-aws-ovn-upgrade
/test e2e-aws-ovn-upgrade-ipsec
/test e2e-aws-ovn-windows
/test e2e-azure-ovn-upgrade
/test e2e-gcp-ovn
/test e2e-gcp-ovn-techpreview
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-dualstack-bgp
/test e2e-metal-ipi-ovn-dualstack-bgp-local-gw
/test e2e-metal-ipi-ovn-ipv6
/test e2e-metal-ipi-ovn-ipv6-ipsec
/test e2e-ovn-ipsec-step-registry
/test hypershift-e2e-aks
/test images
/test lint
/test okd-scos-images
/test unit
/test verify
/test verify-deps

The following commands are available to trigger optional jobs:

/test 4.21-upgrade-from-stable-4.20-e2e-aws-ovn-upgrade
/test 4.21-upgrade-from-stable-4.20-e2e-azure-ovn-upgrade
/test 4.21-upgrade-from-stable-4.20-e2e-gcp-ovn-upgrade
/test e2e-aws-hypershift-ovn-kubevirt
/test e2e-aws-ovn-local-to-shared-gateway-mode-migration
/test e2e-aws-ovn-serial-ipsec-1of2
/test e2e-aws-ovn-serial-ipsec-2of2
/test e2e-aws-ovn-shared-to-local-gateway-mode-migration
/test e2e-aws-ovn-single-node
/test e2e-aws-ovn-techpreview-serial-1of2
/test e2e-aws-ovn-techpreview-serial-2of2
/test e2e-azure-ovn
/test e2e-azure-ovn-dualstack
/test e2e-azure-ovn-manual-oidc
/test e2e-network-mtu-migration-ovn-ipv4
/test e2e-network-mtu-migration-ovn-ipv6
/test e2e-openstack-ovn
/test e2e-ovn-hybrid-step-registry
/test e2e-ovn-step-registry
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-dualstack
/test e2e-vsphere-ovn-dualstack-primaryv6
/test e2e-vsphere-ovn-windows
/test frrk8s-e2e
/test okd-scos-e2e-aws-ovn
/test qe-perfscale-aws-ovn-medium-cluster-density
/test qe-perfscale-aws-ovn-medium-node-density-cni
/test qe-perfscale-aws-ovn-small-cluster-density
/test qe-perfscale-aws-ovn-small-node-density-cni
/test security

Use /test all to run the following jobs that were automatically triggered:

pull-ci-openshift-cluster-network-operator-master-4.21-upgrade-from-stable-4.20-e2e-aws-ovn-upgrade
pull-ci-openshift-cluster-network-operator-master-4.21-upgrade-from-stable-4.20-e2e-azure-ovn-upgrade
pull-ci-openshift-cluster-network-operator-master-4.21-upgrade-from-stable-4.20-e2e-gcp-ovn-upgrade
pull-ci-openshift-cluster-network-operator-master-4.21-upgrade-from-stable-4.20-images
pull-ci-openshift-cluster-network-operator-master-e2e-aws-ovn-hypershift-conformance
pull-ci-openshift-cluster-network-operator-master-e2e-aws-ovn-serial-1of2
pull-ci-openshift-cluster-network-operator-master-e2e-aws-ovn-serial-2of2
pull-ci-openshift-cluster-network-operator-master-e2e-aws-ovn-upgrade
pull-ci-openshift-cluster-network-operator-master-e2e-aws-ovn-upgrade-ipsec
pull-ci-openshift-cluster-network-operator-master-e2e-aws-ovn-windows
pull-ci-openshift-cluster-network-operator-master-e2e-azure-ovn-upgrade
pull-ci-openshift-cluster-network-operator-master-e2e-gcp-ovn
pull-ci-openshift-cluster-network-operator-master-e2e-gcp-ovn-upgrade
pull-ci-openshift-cluster-network-operator-master-e2e-metal-ipi-ovn-dualstack-bgp
pull-ci-openshift-cluster-network-operator-master-e2e-metal-ipi-ovn-dualstack-bgp-local-gw
pull-ci-openshift-cluster-network-operator-master-e2e-metal-ipi-ovn-ipv6
pull-ci-openshift-cluster-network-operator-master-e2e-metal-ipi-ovn-ipv6-ipsec
pull-ci-openshift-cluster-network-operator-master-e2e-ovn-ipsec-step-registry
pull-ci-openshift-cluster-network-operator-master-hypershift-e2e-aks
pull-ci-openshift-cluster-network-operator-master-images
pull-ci-openshift-cluster-network-operator-master-lint
pull-ci-openshift-cluster-network-operator-master-okd-scos-images
pull-ci-openshift-cluster-network-operator-master-security
pull-ci-openshift-cluster-network-operator-master-unit
pull-ci-openshift-cluster-network-operator-master-verify
pull-ci-openshift-cluster-network-operator-master-verify-deps
Details

In response to this:

/test ?

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.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 10, 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 jacobtanenbaum for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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
Copy link
Contributor

openshift-ci bot commented Dec 10, 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-ovn ebd1e8b link true /test e2e-gcp-ovn
ci/prow/e2e-aws-ovn-upgrade-ipsec ebd1e8b link true /test e2e-aws-ovn-upgrade-ipsec
ci/prow/e2e-metal-ipi-ovn-dualstack-bgp-local-gw ebd1e8b link true /test e2e-metal-ipi-ovn-dualstack-bgp-local-gw
ci/prow/e2e-metal-ipi-ovn-dualstack-bgp ebd1e8b link true /test e2e-metal-ipi-ovn-dualstack-bgp
ci/prow/e2e-ovn-ipsec-step-registry ebd1e8b link true /test e2e-ovn-ipsec-step-registry
ci/prow/hypershift-e2e-aks ebd1e8b link true /test hypershift-e2e-aks
ci/prow/security ebd1e8b link false /test security
ci/prow/e2e-metal-ipi-ovn-ipv6-ipsec ebd1e8b link true /test e2e-metal-ipi-ovn-ipv6-ipsec

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.

test duplicate key 'phase2alg' fix for nncp deployment

Signed-off-by: Periyasamy Palanisamy <pepalani@redhat.com>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (1)
pkg/network/ovn_kubernetes.go (1)

651-651: Remove commented-out code and unused function.

The commented line at 651 should be deleted rather than left in the codebase. Additionally, the function isUserDefinedIPsecMachineConfigPresent (lines 1604-1615) is no longer called anywhere and should be removed to eliminate dead code.

Apply this diff to remove the commented line:

-	//isUserDefinedIPsecMachineConfigPresent := isUserDefinedIPsecMachineConfigPresent(bootstrapResult.Infra)

Consider removing the unused function isUserDefinedIPsecMachineConfigPresent at lines 1604-1615 as well.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between ebd1e8b and b5ebec3.

📒 Files selected for processing (3)
  • bindata/network/ovn-kubernetes/common/80-ipsec-master-extensions.yaml (2 hunks)
  • bindata/network/ovn-kubernetes/common/80-ipsec-worker-extensions.yaml (2 hunks)
  • pkg/network/ovn_kubernetes.go (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.

Files:

  • pkg/network/ovn_kubernetes.go
  • bindata/network/ovn-kubernetes/common/80-ipsec-worker-extensions.yaml
  • bindata/network/ovn-kubernetes/common/80-ipsec-master-extensions.yaml
🔇 Additional comments (4)
bindata/network/ovn-kubernetes/common/80-ipsec-worker-extensions.yaml (1)

26-26: ExecStartPre change aligns with layered image approach.

The change from removing /etc/ipsec.d/cno.conf to using systemd-tmpfiles --create is appropriate for the layered image workflow, ensuring libreswan is properly initialized from the rpm-ostree tmpfiles configuration.

bindata/network/ovn-kubernetes/common/80-ipsec-master-extensions.yaml (1)

26-26: ExecStartPre change aligns with layered image approach.

The change from removing /etc/ipsec.d/cno.conf to using systemd-tmpfiles --create is appropriate for the layered image workflow, ensuring libreswan is properly initialized from the rpm-ostree tmpfiles configuration.

pkg/network/ovn_kubernetes.go (2)

659-659: IPsec activation logic simplified appropriately.

The change to isOVNIPsecActive removes the requirement for user-defined IPsec MachineConfigs, simplifying the activation logic to depend only on CNO-managed IPsec MachineConfigs or hypershift hosting. This aligns with the PR's objective to ignore user-defined IPsec MachineConfigs.


670-670: Rendering logic updated consistently.

The change to renderCNOIPsecMachineConfig appropriately removes the dependency on user-defined IPsec MachineConfigs, consistent with the broader changes in this PR to simplify IPsec MachineConfig management.

Comment on lines +7 to +8
annotations:
user-ipsec-machine-config: "true"
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Misleading annotation name for CNO-managed resource.

The annotation user-ipsec-machine-config: "true" is misleading since this MachineConfig is managed by CNO, not user-defined. This could cause confusion about resource ownership and lifecycle management.

Consider renaming to reflect CNO ownership, e.g., cno-ipsec-machine-config: "true" or network.operator.openshift.io/ipsec-machine-config: "true".

🤖 Prompt for AI Agents
In bindata/network/ovn-kubernetes/common/80-ipsec-master-extensions.yaml around
lines 7-8, the annotation key user-ipsec-machine-config is misleading for a
CNO-managed MachineConfig; replace or rename it to indicate CNO ownership (for
example cno-ipsec-machine-config: "true" or
network.operator.openshift.io/ipsec-machine-config: "true") so the annotation
accurately reflects resource ownership and lifecycle; update any consumers or
documentation that reference the old key to use the new annotation name.

user-ipsec-machine-config: "true"
name: 80-ipsec-master-extensions
spec:
osImageURL: quay.io/pepalani/ipsec-rhcos-layered-image:nm-libreswan-fix
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Hardcoded test image URL must not be merged.

The osImageURL points to a personal registry (quay.io/pepalani/...) which is not suitable for production. Since this PR is marked [DNM] for testing the nm-libreswan fix, ensure this reference is replaced with an official image registry before any production use.

🤖 Prompt for AI Agents
In bindata/network/ovn-kubernetes/common/80-ipsec-master-extensions.yaml around
line 11, the osImageURL is hardcoded to a personal test image
(quay.io/pepalani/ipsec-rhcos-layered-image:nm-libreswan-fix); replace this test
registry reference with the official, approved image registry and tag used by
the project (or parameterize the value via config/CI variables), ensure no
personal quay.io references remain, and update any documentation/tests to use
the official image before merging to production.

Comment on lines +7 to +8
annotations:
user-ipsec-machine-config: "true"
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Misleading annotation name for CNO-managed resource.

The annotation user-ipsec-machine-config: "true" is misleading since this MachineConfig is managed by CNO, not user-defined. This could cause confusion about resource ownership and lifecycle management.

Consider renaming to reflect CNO ownership, e.g., cno-ipsec-machine-config: "true" or network.operator.openshift.io/ipsec-machine-config: "true".

🤖 Prompt for AI Agents
In bindata/network/ovn-kubernetes/common/80-ipsec-worker-extensions.yaml around
lines 7-8, the annotation key `user-ipsec-machine-config: "true"` is misleading
for a CNO-managed MachineConfig; rename the annotation to indicate CNO ownership
(for example `cno-ipsec-machine-config: "true"` or
`network.operator.openshift.io/ipsec-machine-config: "true"`) and update any
consuming code, documentation, and tests to use the new annotation key so
ownership and lifecycle intent are unambiguous.

user-ipsec-machine-config: "true"
name: 80-ipsec-worker-extensions
spec:
osImageURL: quay.io/pepalani/ipsec-rhcos-layered-image:nm-libreswan-fix
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Hardcoded test image URL must not be merged.

The osImageURL points to a personal registry (quay.io/pepalani/...) which is not suitable for production. Since this PR is marked [DNM] for testing the nm-libreswan fix, ensure this reference is replaced with an official image registry before any production use.

🤖 Prompt for AI Agents
In bindata/network/ovn-kubernetes/common/80-ipsec-worker-extensions.yaml around
line 11 the osImageURL is hardcoded to a personal test registry
(quay.io/pepalani/ipsec-rhcos-layered-image:nm-libreswan-fix); replace this
value with the official, approved production image reference (or a configurable
variable) before merging — update the field to point to the canonical
registry/image tag used by the project (or read from environment/params) and
remove any personal/test registry references.

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.

1 participant