Skip to content

USHIFT-6849: Add C2CC IPv6 tests scenarios#6750

Open
vanhalenar wants to merge 2 commits into
openshift:mainfrom
vanhalenar:c2cc-ipv6
Open

USHIFT-6849: Add C2CC IPv6 tests scenarios#6750
vanhalenar wants to merge 2 commits 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 now pick IP-family-aware commands.
    • Created new IPv6 multi-host test scenarios that provision VMs, collect kubeconfigs, and run C2CC suites.
    • Reconciliation and cleanup tests updated to be IP-family aware; FOREIGN_CIDR is now configurable (default empty).

@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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: 3119165a-56e9-4d61-a273-7271c333513b

📥 Commits

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

📒 Files selected for processing (2)
  • test/scenarios-bootc/el10/presubmits/el102-src@c2cc-ipv6.sh
  • test/scenarios-bootc/el9/presubmits/el98-src@c2cc-ipv6.sh
🚧 Files skipped from review as they are similar to previous changes (2)

Walkthrough

Adds an ${IP_FAMILY} parameter to Robot C2CC tests (defaulting to ipv4), updates route/rule verification and disruptive keywords to use ip -4/ip -6 accordingly, passes a FOREIGN_CIDR into existing IPv4 scenarios, and adds full IPv6 presubmit scenario scripts for el9 and el10 that run C2CC tests with IP_FAMILY=ipv6.

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 route/rule verification and disruption keywords to select ip -4 or ip -6. Also changes FOREIGN_CIDR default to ${EMPTY}.
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 --variable.
EL10 IPv6 scenario implementation
test/scenarios-bootc/el10/presubmits/el102-src@c2cc-ipv6.sh
New script defines IPv6 pod/service CIDRs and domains, Greenboot helpers, per-host C2CC YAML/firewall updates, VM creation/teardown, and runs C2CC tests with IP_FAMILY=ipv6.
EL9 IPv6 scenario implementation
test/scenarios-bootc/el9/presubmits/el98-src@c2cc-ipv6.sh
New script mirrors el10 IPv6 flow: IPv6 constants, Greenboot readiness checks, per-host C2CC config and firewall rules, VM orchestration, and test execution passing IP_FAMILY=ipv6 and remote kubeconfigs to the C2CC suite.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • kasturinarra
🚥 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 PR title directly and clearly describes the main change: adding C2CC IPv6 test scenarios. It is specific, concise, and accurately reflects the primary objective.
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 This PR contains no Ginkgo tests. All modified Robot Framework test names are static, descriptive strings without dynamic values like generated IDs, timestamps, IP addresses, or node names.
Test Structure And Quality ✅ Passed PR contains only Robot Framework tests (.robot), Bash scripts (.sh), and resource files (.resource)—no Ginkgo Go test code to review. Custom check is not applicable.
Microshift Test Compatibility ✅ Passed This PR only modifies Robot Framework tests, shell scripts, and resource files. No new Ginkgo e2e tests are being added, so the check does not apply.
Single Node Openshift (Sno) Test Compatibility ✅ Passed This PR adds only Robot Framework tests (.robot files) and Bash scenario scripts (.sh files), not Ginkgo e2e tests. The custom check only applies to Ginkgo tests.
Topology-Aware Scheduling Compatibility ✅ Passed PR only modifies test infrastructure (Robot Framework resources, Bash test scripts) in test/ directory, not deployment manifests, operator code, or controllers.
Ote Binary Stdout Contract ✅ Passed PR only modifies Robot Framework test files and Bash scripts, not OTE binaries with process-level stdout. The check is not applicable to these file types.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR adds Robot Framework tests and Bash scenario scripts, not Ginkgo e2e tests. Check is specific to Ginkgo tests and is not applicable here.
No-Weak-Crypto ✅ Passed PR contains only test infrastructure (Robot Framework tests and Bash scripts). No weak crypto, custom crypto implementations, or insecure token comparisons found.
Container-Privileges ✅ Passed PR adds test framework files only (Robot Framework resources/tests, Bash scripts) with no Kubernetes manifests or container configs. Container-privileges check is not applicable to non-manifest files.
No-Sensitive-Data-In-Logs ✅ Passed No sensitive data exposure in logs found. PR adds IPv6 test infrastructure with no new logging statements containing passwords, tokens, API keys, PII, or credentials.

✏️ 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