Skip to content

USHIFT-6849: Add C2CC IPv6 tests scenarios#6750

Open
vanhalenar wants to merge 1 commit into
openshift:mainfrom
vanhalenar:c2cc-ipv6
Open

USHIFT-6849: Add C2CC IPv6 tests scenarios#6750
vanhalenar wants to merge 1 commit into
openshift:mainfrom
vanhalenar:c2cc-ipv6

Conversation

@vanhalenar
Copy link
Copy Markdown
Contributor

@vanhalenar vanhalenar commented May 27, 2026

Summary by CodeRabbit

  • Tests
    • Added IPv6 support to cluster-to-cluster connectivity verification tests
    • Created new IPv6 test scenarios for multi-host setups
    • Tests now dynamically select appropriate IP commands based on IP family configuration

@vanhalenar vanhalenar requested a review from pmtk May 27, 2026 13:36
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 27, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented May 27, 2026

@vanhalenar: This pull request references USHIFT-6849 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 "5.0.0" version, but no target version was set.

Details

In response to this:

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.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 27, 2026

Walkthrough

The PR adds IPv6 support to C2CC (cluster-to-cluster) testing infrastructure. It introduces an ${IP_FAMILY} parameter to Robot test keywords, updates existing IPv4 scenarios to pass FOREIGN_CIDR configuration, and adds complete IPv6 scenario variants for both el9 and el10 platforms with multi-host setup and configuration orchestration.

Changes

IPv6 Support for C2CC Cluster-to-Cluster Testing

Layer / File(s) Summary
IP-family parameterization in test framework
test/resources/c2cc.resource, test/suites/c2cc/cleanup.robot, test/suites/c2cc/reconciliation.robot
Adds ${IP_FAMILY} variable defaulting to ipv4 and updates all route/rule verification and disruption keywords to select ip -4 or ip -6 dynamically, replacing hardcoded ip commands. Variable default changes FOREIGN_CIDR from fixed CIDR to empty when not supplied.
IPv4 scenario FOREIGN_CIDR variable
test/scenarios-bootc/el10/presubmits/el102-src@c2cc.sh, test/scenarios-bootc/el9/presubmits/el98-src@c2cc.sh
Existing el9 and el10 IPv4 scenarios now pass FOREIGN_CIDR=192.0.2.0/24 to the C2CC test suite via the --variable mechanism.
EL9 IPv6 scenario implementation
test/scenarios-bootc/el9/presubmits/el98-src@c2cc-ipv6.sh
New script for el9 defines IPv6 configuration constants and three-cluster CIDR/domain pairs. Provides helpers to check Greenboot readiness across hosts with JUnit recording, configure per-host C2CC routing via MicroShift config and firewall rules, orchestrate symmetric setup, manage three VMs, and run tests with IPv6 family and kubeconfig path variables.
EL10 IPv6 scenario implementation
test/scenarios-bootc/el10/presubmits/el102-src@c2cc-ipv6.sh
New script for el10 mirrors el9 IPv6 structure: IPv6 constants, Greenboot readiness on three hosts, per-host C2CC configuration with YAML payload generation and firewall updates, orchestrated multi-host setup, VM management, and test execution passing IPv6 family and cluster variables to C2CC suite.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (14 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding C2CC IPv6 test scenarios, which aligns with the primary additions of two new IPv6 scenario scripts and IPv6-aware modifications to existing test resources.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed PR contains no Ginkgo tests. Modified files are Robot Framework tests, Bash scripts, and resource files—Ginkgo check not applicable.
Test Structure And Quality ✅ Passed Check is not applicable: PR adds Robot Framework tests and Bash scripts, not Ginkgo test code. No Go test files present.
Microshift Test Compatibility ✅ Passed This PR adds no Ginkgo e2e tests. Changes are limited to Robot Framework tests (.robot files), resource files (.resource), and Bash scenario scripts (.sh), which are outside the scope of this check.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR adds only Robot Framework tests and bash scripts, not Ginkgo e2e tests. SNO compatibility check only applies to Ginkgo tests.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies only test infrastructure (test scenarios and suites for IPv6 C2CC testing). The topology check applies to deployment manifests, operator code, and controllers—none present here.
Ote Binary Stdout Contract ✅ Passed No Go test files or OTE binaries are modified in this PR. Changes are limited to Robot Framework test files and Bash scenario scripts, which are not subject to the OTE Binary Stdout Contract.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No Ginkgo e2e tests present in PR. Changes contain Robot Framework tests and Bash scripts that are already IPv6-aware with ${IP_FAMILY} variable support.
No-Weak-Crypto ✅ Passed PR contains only test infrastructure and scenario scripts with no cryptographic code, weak algorithms, custom crypto implementations, or insecure secret comparisons.
Container-Privileges ✅ Passed PR contains only test files (Robot Framework tests and Bash scripts). No container/K8s manifests or privileged security configurations are present in any modified files.
No-Sensitive-Data-In-Logs ✅ Passed No sensitive data (passwords, tokens, API keys, PII, or credentials) exposed in logging statements; code logs only infrastructure configuration (IPs, CIDRs, domains) and test command outputs.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci openshift-ci Bot requested review from jerpeter1 and kasturinarra May 27, 2026 13:39
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 27, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: vanhalenar
Once this PR has been reviewed and has the lgtm label, please assign pmtk 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

Copy link
Copy Markdown
Contributor

@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: 2

🧹 Nitpick comments (1)
test/suites/c2cc/reconciliation.robot (1)

76-86: ⚡ Quick win

Add guard for empty FOREIGN_CIDR.

If FOREIGN_CIDR is ${EMPTY}, this test will inject an empty string into the annotation and Should Contain will spuriously pass (empty string is contained in any string). Consider adding a precondition check.

🛡️ Suggested guard

Add at the start of the test case:

 Reconcile SNAT Annotation Preserves Foreign Subnets
     [Documentation]    Inject a foreign subnet into the SNAT annotation, then remove only
     ...    the C2CC CIDRs. Verify the controller merges C2CC CIDRs back without
     ...    removing the foreign subnet.
+    Skip If    '${FOREIGN_CIDR}' == '${EMPTY}'    Test requires FOREIGN_CIDR variable
     [Setup]    Inject Foreign Subnet Into SNAT Annotation    cluster-a    ${FOREIGN_CIDR}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/suites/c2cc/reconciliation.robot` around lines 76 - 86, Add a
precondition guard at the top of the "Reconcile SNAT Annotation Preserves
Foreign Subnets" test to ensure FOREIGN_CIDR is not empty: before calling Inject
Foreign Subnet Into SNAT Annotation, run a check like Fail If   
'${FOREIGN_CIDR}' == '${EMPTY}'    FOREIGN_CIDR must be set (or use Skip Test If
to skip) so that Get Node SNAT Annotation / Should Contain can't pass spuriously
when FOREIGN_CIDR is empty.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/scenarios-bootc/el10/presubmits/el102-src`@c2cc-ipv6.sh:
- Around line 94-95: The call to wait_for_greenboot_on_hosts
"c2cc_pre_greenboot" can fail but its failure is currently ignored; update the
caller so that if wait_for_greenboot_on_hosts returns a non-zero status it is
propagated (e.g., return or exit with that status) before proceeding to any C2CC
reconfiguration steps—ensure the caller checks the return value of
wait_for_greenboot_on_hosts and aborts further actions when it fails so hosts
are not reconfigured while in a bad state.

In `@test/scenarios-bootc/el9/presubmits/el98-src`@c2cc-ipv6.sh:
- Around line 94-95: The call to wait_for_greenboot_on_hosts
"c2cc_pre_greenboot" must not be ignored; check its exit status and propagate
failure (exit non‑zero or return) before proceeding to any C2CC reconfiguration
steps. Update the script so after invoking wait_for_greenboot_on_hosts you test
its result (e.g., if ! wait_for_greenboot_on_hosts "c2cc_pre_greenboot"; then
log an error and exit 1) so the subsequent C2CC config application cannot run
when greenboot did not succeed.

---

Nitpick comments:
In `@test/suites/c2cc/reconciliation.robot`:
- Around line 76-86: Add a precondition guard at the top of the "Reconcile SNAT
Annotation Preserves Foreign Subnets" test to ensure FOREIGN_CIDR is not empty:
before calling Inject Foreign Subnet Into SNAT Annotation, run a check like Fail
If    '${FOREIGN_CIDR}' == '${EMPTY}'    FOREIGN_CIDR must be set (or use Skip
Test If to skip) so that Get Node SNAT Annotation / Should Contain can't pass
spuriously when FOREIGN_CIDR is empty.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 08e63990-2158-4f4e-a16d-2f3984368f54

📥 Commits

Reviewing files that changed from the base of the PR and between a890f0c and 13ce93e.

📒 Files selected for processing (7)
  • test/resources/c2cc.resource
  • test/scenarios-bootc/el10/presubmits/el102-src@c2cc-ipv6.sh
  • test/scenarios-bootc/el10/presubmits/el102-src@c2cc.sh
  • test/scenarios-bootc/el9/presubmits/el98-src@c2cc-ipv6.sh
  • test/scenarios-bootc/el9/presubmits/el98-src@c2cc.sh
  • test/suites/c2cc/cleanup.robot
  • test/suites/c2cc/reconciliation.robot

Comment on lines +94 to +95
wait_for_greenboot_on_hosts "c2cc_pre_greenboot"

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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Propagate pre-greenboot failure before applying C2CC config.

Line 94 ignores wait_for_greenboot_on_hosts failure and can continue with host reconfiguration in a bad state.

Suggested fix
-    wait_for_greenboot_on_hosts "c2cc_pre_greenboot"
+    if ! wait_for_greenboot_on_hosts "c2cc_pre_greenboot"; then
+        return 1
+    fi
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/scenarios-bootc/el10/presubmits/el102-src`@c2cc-ipv6.sh around lines 94
- 95, The call to wait_for_greenboot_on_hosts "c2cc_pre_greenboot" can fail but
its failure is currently ignored; update the caller so that if
wait_for_greenboot_on_hosts returns a non-zero status it is propagated (e.g.,
return or exit with that status) before proceeding to any C2CC reconfiguration
steps—ensure the caller checks the return value of wait_for_greenboot_on_hosts
and aborts further actions when it fails so hosts are not reconfigured while in
a bad state.

Comment on lines +94 to +95
wait_for_greenboot_on_hosts "c2cc_pre_greenboot"

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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Propagate pre-greenboot failure before applying C2CC config.

Line 94 ignores wait_for_greenboot_on_hosts failure and can continue with host reconfiguration in a bad state.

Suggested fix
-    wait_for_greenboot_on_hosts "c2cc_pre_greenboot"
+    if ! wait_for_greenboot_on_hosts "c2cc_pre_greenboot"; then
+        return 1
+    fi
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
wait_for_greenboot_on_hosts "c2cc_pre_greenboot"
if ! wait_for_greenboot_on_hosts "c2cc_pre_greenboot"; then
return 1
fi
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/scenarios-bootc/el9/presubmits/el98-src`@c2cc-ipv6.sh around lines 94 -
95, The call to wait_for_greenboot_on_hosts "c2cc_pre_greenboot" must not be
ignored; check its exit status and propagate failure (exit non‑zero or return)
before proceeding to any C2CC reconfiguration steps. Update the script so after
invoking wait_for_greenboot_on_hosts you test its result (e.g., if !
wait_for_greenboot_on_hosts "c2cc_pre_greenboot"; then log an error and exit 1)
so the subsequent C2CC config application cannot run when greenboot did not
succeed.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 27, 2026

@vanhalenar: 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-tests-bootc-el10 13ce93e link true /test e2e-aws-tests-bootc-el10
ci/prow/e2e-aws-tests-bootc-el9 13ce93e link true /test e2e-aws-tests-bootc-el9
ci/prow/e2e-aws-tests-bootc-arm-el10 13ce93e link true /test e2e-aws-tests-bootc-arm-el10
ci/prow/e2e-aws-tests-bootc-arm-el9 13ce93e link true /test e2e-aws-tests-bootc-arm-el9

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.

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

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants