Skip to content

CORENET-7131: migrate UDN Security and OVNK CNI test cases - #3213

Open
SachinNinganure wants to merge 20 commits into
openshift:mainfrom
SachinNinganure:otp-networking-tools-migration
Open

CORENET-7131: migrate UDN Security and OVNK CNI test cases#3213
SachinNinganure wants to merge 20 commits into
openshift:mainfrom
SachinNinganure:otp-networking-tools-migration

Conversation

@SachinNinganure

@SachinNinganure SachinNinganure commented May 31, 2026

Copy link
Copy Markdown

Validates that ovnkube-node container logs do not expose API tokens
or Bearer authentication credentials.

Test searches ovnkube-controller container logs for sensitive patterns
(api-token, authorization, bearer) and filters false positives to ensure
no actual tokens are logged.

Description
Migrate OTP test case 49216 (API Token Logging Security) to OTE framework as part of the broader OTP-to-OTE migration effort.

Test Case: Medium-49216 - API Token Logging Security
Priority: Blocking (port=yes, >95% pass rate)
Lifecycle: blocking

Fixes
N/A (migration work, not fixing a specific issue)

Additional Information for reviewers

  • Added openshift/test/otp/networking_tools_test.go - First OTP networking tools test
  • Added openshift/test/otp/otp_suite_test.go - Ginkgo test suite registration for OTP package
  • Uses k8s client-go directly (no openshift/origin dependency for portability)
  • Tagged with [sig-networking][OTP][blocking][case_id:49216]

Checks
[ ] My code requires changes to the documentation → Leave UNCHECKED
[ ] if so, I have updated the documentation as required → Leave UNCHECKED
[x] My code requires tests → CHECK THIS (type x between the brackets)
[x] if so, I have added and/or updated the tests as required → CHECK THIS
[ ] All the tests have passed in the CI → Leave UNCHECKED (say "will verify once CI runs")

How to verify it

Test Type: End-to-end Ginkgo test

Local verification:

export KUBECONFIG=/path/to/kubeconfig
cd openshift/test
go test -v ./otp -ginkgo.focus="case_id:49216" 

Manual verification (already done):
- Tested on live OpenShift 4.22 cluster
- Checked 6 ovnkube-node pods
- Result: 0 API tokens found in logs 

CI verification:
Test will run automatically as part of OpenShift networking test suite (tagged with [sig-networking]).



<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

* **New Features**
* Added comprehensive end-to-end tests for Multus networking support, including IPv6 exclude-range handling and Dummy CNI plugin validation.
* Added network tracing tests using ovnkube-trace to validate pod-to-pod and pod-to-host traffic delivery.
* Added security tests to detect token exposure in logs and validate CNI configuration file permissions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

@coderabbitai

coderabbitai Bot commented May 31, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

This PR introduces a comprehensive OTP (OpenShift Tests Private) test suite covering Multus networking, OVN integration, and security validation. Five new test cases are registered and implemented across Multus secondary networks, pod tracing, and CNI configuration security.

Changes

OTP Test Suite

Layer / File(s) Summary
Test infrastructure and registration
openshift/.gitignore, openshift/cmd/ovn-kubernetes-tests-ext/main.go, openshift/test/e2e_test.go, openshift/test/tests.go
Gitignore entry for build artifact, blank imports in main and e2e test files enable test package initialization, and test case identifiers are registered in InformingTests and BlockingTests slices.
Multus networking tests
openshift/test/otp/multus.go
Two Ginkgo blocking tests validate secondary network attachment via Multus: IPv6 whereabouts exclude ranges (case 57589) and dummy CNI with static IPAM (case 76652). Both create temporary namespaces, install NetworkAttachmentDefinition resources, start annotated pods, and assert correct network-status annotation presence and content. Helper createNAD builds and applies unstructured NAD objects via the dynamic client.
Networking tools and integration tests
openshift/test/otp/networking_tools.go
Three informing tests validate OVN and connectivity: northbound database state inspection (case 49087), pod-to-pod tracing over TCP/8080 (case 76648), and pod-to-hostnetwork tracing over TCP/22 (case 76649). Each creates temporary namespaces, provisions test pods, executes kubectl commands or shell traces, and asserts expected output markers. Shared helper runOVNKubeTrace locates ovnkube-node pods, constructs trace commands, and streams output via SPDY exec.
Security validation tests
openshift/test/otp/security.go
Two blocking tests enforce security compliance: token exposure scanning (case 49216) iterates ovnkube-node logs checking for sensitive patterns with heuristic reduction; CIS file permissions (case 77102) validates 600 permissions on Multus and whereabouts CNI config files via in-pod stat commands and debug pod execution. Helper execInPod streams stdout/stderr from exec subresources. Utility functions provide typed pointer construction.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 New tests hop into view,
Multus networks, tracing too,
Security logs on guard,
OTP's work, never hard!
Five cases strong, the suite rings true! 🔐✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 72.73% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.
Title check ✅ Passed The title matches the PR’s main theme of migrating OVNK/OTP security and CNI-related test cases, though it is a bit broader than the actual change set.

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

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

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@openshift-ci
openshift-ci Bot requested review from martinkennelly and tssurya May 31, 2026 13:29
@openshift-ci

openshift-ci Bot commented May 31, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 (2)
openshift/test/otp/networking_tools_test.go (2)

17-17: ⚡ Quick win

defer g.GinkgoRecover() here is ineffective.

Placed in the Describe container body, this defer runs during spec-tree construction and returns immediately — it does not protect any spec. GinkgoRecover is only needed inside goroutines you spawn; it can be removed here.

♻️ Proposed change
 var _ = g.Describe("[sig-networking] OTP Networking Tools", func() {
-	defer g.GinkgoRecover()
-
 	var (
🤖 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 `@openshift/test/otp/networking_tools_test.go` at line 17, Remove the
ineffective defer g.GinkgoRecover() call that lives in the Describe container
body; it runs at spec-tree construction time and does not protect specs. Delete
the defer g.GinkgoRecover() line from the Describe block in
networking_tools_test.go (where g.GinkgoRecover() is referenced) and, if you
spawn any goroutines inside individual specs, add g.GinkgoRecover() as a
deferred call inside those goroutines instead.

81-82: 💤 Low value

Simplify the false-positive filter.

This condition is equivalent to !strings.Contains(lowerLine, "token: ") — the first clause is always true whenever the negated token: case is false, so the compound expression reduces to skipping only lines with an empty token: field.

♻️ Proposed change
-							if !strings.Contains(lowerLine, "token:") ||
-								(strings.Contains(lowerLine, "token:") && !strings.Contains(lowerLine, "token: ")) {
+							if !strings.Contains(lowerLine, "token: ") {
🤖 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 `@openshift/test/otp/networking_tools_test.go` around lines 81 - 82, The
conditional that filters out false-positive token lines is overly complex;
replace the compound condition that checks lowerLine with the simpler check for
absence of "token: " (i.e., use !strings.Contains(lowerLine, "token: ")) so the
logic only skips lines missing a token value; update the expression that
currently inspects lowerLine in the test (the if using
strings.Contains(lowerLine, "token:") / "token: ") to the single simplified
check.
🤖 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 `@openshift/test/otp/networking_tools_test.go`:
- Around line 84-85: The check that treats any occurrence of "ey" in lowerLine
as a JWT marker is too broad and causes false positives; update the condition in
the strings.Contains checks (the conditional using strings.Contains(lowerLine,
"ey") || strings.Contains(lowerLine, "bearer ")) to look specifically for the
JWT prefix "eyJ" instead of "ey" (i.e., replace the "ey" substring match with
"eyJ") so the lowerLine JWT detection is precise while retaining the existing
"bearer " check.
- Around line 62-65: The test currently silently continues when DoRaw fails,
which allows a false negative if every pod's logs are unreadable; modify the
test to record skipped pods and fail (or assert) when no pods were actually
scanned. Specifically, in the loop that calls DoRaw (reference the DoRaw call
and the totalViolations variable), increment a skippedPods counter or append pod
identifiers when err != nil instead of just continue, and after the loop assert
that (len(pods.Items) - len(skippedPods)) > 0 (or fail the test with a clear
message) so the test fails if all pods were skipped and no logs were examined.

---

Nitpick comments:
In `@openshift/test/otp/networking_tools_test.go`:
- Line 17: Remove the ineffective defer g.GinkgoRecover() call that lives in the
Describe container body; it runs at spec-tree construction time and does not
protect specs. Delete the defer g.GinkgoRecover() line from the Describe block
in networking_tools_test.go (where g.GinkgoRecover() is referenced) and, if you
spawn any goroutines inside individual specs, add g.GinkgoRecover() as a
deferred call inside those goroutines instead.
- Around line 81-82: The conditional that filters out false-positive token lines
is overly complex; replace the compound condition that checks lowerLine with the
simpler check for absence of "token: " (i.e., use !strings.Contains(lowerLine,
"token: ")) so the logic only skips lines missing a token value; update the
expression that currently inspects lowerLine in the test (the if using
strings.Contains(lowerLine, "token:") / "token: ") to the single simplified
check.
🪄 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: Path: .coderabbit.yml

Review profile: CHILL

Plan: Enterprise

Run ID: 20057199-ce7e-4281-8ed2-bae45629f5c6

📥 Commits

Reviewing files that changed from the base of the PR and between 3ce6353 and 3821003.

📒 Files selected for processing (2)
  • openshift/test/otp/networking_tools_test.go
  • openshift/test/otp/otp_suite_test.go

Comment thread openshift/test/otp/networking_tools_test.go Outdated
Comment thread openshift/test/otp/networking_tools_test.go Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
openshift/test/otp/networking_tools_test.go (1)

444-471: ⚡ Quick win

srcIP and dstIP parameters are never used.

runOVNKubeTrace accepts srcIP/dstIP but the built execCmd only references the namespaces/pod names, protocol and port. The callers (lines 346-349 and 425-428) perform extra Get calls solely to populate these unused arguments. Drop the parameters (and the corresponding caller plumbing) to remove the dead/misleading surface, or wire them into the trace command if they were intended to be used.

🤖 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 `@openshift/test/otp/networking_tools_test.go` around lines 444 - 471,
runOVNKubeTrace currently accepts srcIP and dstIP but never uses them (execCmd
only uses namespaces/pod names), so remove the dead parameters: update the
runOVNKubeTrace function signature to drop srcIP and dstIP, remove any related
local variables, and leave execCmd as-is; then update all callers that were
performing extra Get calls solely to obtain those IPs to stop fetching them
(remove that plumbing). If instead you intended to trace by IP, wire the values
into execCmd (e.g., add the appropriate ovnkube-trace flags for
source/destination IP) and keep callers, but choose one approach and make
matching changes to runOVNKubeTrace and its callers to eliminate the mismatch.
🤖 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 `@openshift/test/otp/networking_tools_test.go`:
- Around line 455-457: The current check "if len(pods.Items) == 0 { return \"\",
err }" returns a nil error when no ovnkube-node pods are found; change it to
return an explicit error (e.g., using fmt.Errorf) so callers get a clear failure
instead of a nil error and later confusing assertions; update the imports to
include "fmt" and replace the return in the pods.Items empty branch with a
descriptive fmt.Errorf error referencing "no ovnkube-node pods found".

---

Nitpick comments:
In `@openshift/test/otp/networking_tools_test.go`:
- Around line 444-471: runOVNKubeTrace currently accepts srcIP and dstIP but
never uses them (execCmd only uses namespaces/pod names), so remove the dead
parameters: update the runOVNKubeTrace function signature to drop srcIP and
dstIP, remove any related local variables, and leave execCmd as-is; then update
all callers that were performing extra Get calls solely to obtain those IPs to
stop fetching them (remove that plumbing). If instead you intended to trace by
IP, wire the values into execCmd (e.g., add the appropriate ovnkube-trace flags
for source/destination IP) and keep callers, but choose one approach and make
matching changes to runOVNKubeTrace and its callers to eliminate the mismatch.
🪄 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: Path: .coderabbit.yml

Review profile: CHILL

Plan: Enterprise

Run ID: eeb3c5f7-788c-4b8c-a1c6-2fcf7d08615e

📥 Commits

Reviewing files that changed from the base of the PR and between 3821003 and d65249b.

📒 Files selected for processing (1)
  • openshift/test/otp/networking_tools_test.go

Comment thread openshift/test/otp/networking_tools.go Outdated
@SachinNinganure SachinNinganure changed the title OTE: migrate OTP tests: ocp_49216_API token logging security OTE: migrate OTP tests: Tools and multus test cases Jun 2, 2026
@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@asood-rh

asood-rh commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

@SachinNinganure Change the name of file to networking_tools.go from networking_tools_test.go.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (3)
openshift/test/otp/multus_test.go (1)

20-21: 💤 Low value

defer g.GinkgoRecover() at Describe scope is ineffective.

GinkgoRecover() is intended to recover panics inside goroutines spawned during test execution. At the Describe scope, this defer runs when the Describe closure returns (immediately after spec registration), not during test execution. It serves no purpose here and should be removed.

🧹 Proposed fix
 var _ = g.Describe("[sig-networking] OTP Multus", func() {
-	defer g.GinkgoRecover()
-
 	var (
🤖 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 `@openshift/test/otp/multus_test.go` around lines 20 - 21, Remove the
ineffective defer g.GinkgoRecover() placed inside the g.Describe closure: the
call is executed at spec registration time rather than during test execution, so
delete the line containing "defer g.GinkgoRecover()" next to the g.Describe(...)
block; if panic recovery for goroutines is required during tests, add
g.GinkgoRecover() as a defer inside appropriate runtime scopes such as It,
BeforeEach, AfterEach, or inside spawned goroutines instead of at Describe
scope.
openshift/test/otp/security_test.go (2)

82-102: 💤 Low value

Token detection logic is convoluted and hard to follow.

The nested conditionals and double-negative checks make the filtering intent unclear. Consider restructuring to explicitly document what constitutes a "false positive" vs "actual token". The current break at line 96 also exits after the first violation per pattern, which may miss other violations in the same pod's logs.

🤖 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 `@openshift/test/otp/security_test.go` around lines 82 - 102, The
token-detection loop around patterns/logsStr is convoluted; simplify by
iterating each log line (split logsStr into lines), for each line lowerLine
check if it contains the pattern and then explicitly classify false-positives
(e.g., lines matching `token:\s*$` or `token:\s*$` with no non-whitespace value)
versus real tokens using clear positive checks (e.g., regex or checks for "eyj"
prefix for JWT or "bearer " token), increment podViolations for each real token
found (do not break after the first match so subsequent violations in the same
pod are counted), and replace the nested double-negatives around "token:" with
an explicit if/else clarity using functions like strings.Contains,
strings.TrimSpace or a compiled regex to locate non-empty token values.

20-21: 💤 Low value

defer g.GinkgoRecover() at Describe scope is ineffective.

Same issue as in multus_test.go — this serves no purpose at Describe scope and should be removed.

🧹 Proposed fix
 var _ = g.Describe("[sig-networking] OTP Security", func() {
-	defer g.GinkgoRecover()
-
 	var (
🤖 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 `@openshift/test/otp/security_test.go` around lines 20 - 21, Remove the
ineffective defer g.GinkgoRecover() call placed at the Describe scope in the OTP
Security test; locate the var _ = g.Describe("[sig-networking] OTP Security",
func() { ... }) block and delete the defer g.GinkgoRecover() line (as done in
multus_test.go) — do not reintroduce it at Describe scope, only use
GinkgoRecover within individual goroutines or appropriate It/BeforeEach scopes
if needed.
🤖 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 `@openshift/test/otp/security_test.go`:
- Around line 216-219: The anonymous probe passed to o.Eventually can
dereference a nil pod when clientset.CoreV1().Pods(...).Get(...) returns an
error; update that closure (the function returning corev1.PodPhase used in the
Eventually call) to capture the error from Get, and if err != nil return
corev1.PodPending (instead of using p.Status.Phase), otherwise return
p.Status.Phase; reference debugPodName and the clientset.CoreV1().Pods(...).Get
call in your change so the test mirrors the multus_test.go pattern.

---

Nitpick comments:
In `@openshift/test/otp/multus_test.go`:
- Around line 20-21: Remove the ineffective defer g.GinkgoRecover() placed
inside the g.Describe closure: the call is executed at spec registration time
rather than during test execution, so delete the line containing "defer
g.GinkgoRecover()" next to the g.Describe(...) block; if panic recovery for
goroutines is required during tests, add g.GinkgoRecover() as a defer inside
appropriate runtime scopes such as It, BeforeEach, AfterEach, or inside spawned
goroutines instead of at Describe scope.

In `@openshift/test/otp/security_test.go`:
- Around line 82-102: The token-detection loop around patterns/logsStr is
convoluted; simplify by iterating each log line (split logsStr into lines), for
each line lowerLine check if it contains the pattern and then explicitly
classify false-positives (e.g., lines matching `token:\s*$` or `token:\s*$` with
no non-whitespace value) versus real tokens using clear positive checks (e.g.,
regex or checks for "eyj" prefix for JWT or "bearer " token), increment
podViolations for each real token found (do not break after the first match so
subsequent violations in the same pod are counted), and replace the nested
double-negatives around "token:" with an explicit if/else clarity using
functions like strings.Contains, strings.TrimSpace or a compiled regex to locate
non-empty token values.
- Around line 20-21: Remove the ineffective defer g.GinkgoRecover() call placed
at the Describe scope in the OTP Security test; locate the var _ =
g.Describe("[sig-networking] OTP Security", func() { ... }) block and delete the
defer g.GinkgoRecover() line (as done in multus_test.go) — do not reintroduce it
at Describe scope, only use GinkgoRecover within individual goroutines or
appropriate It/BeforeEach scopes if needed.
🪄 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: Path: .coderabbit.yml

Review profile: CHILL

Plan: Enterprise

Run ID: 46fe9741-dce5-4920-8ff9-9d4219b8a305

📥 Commits

Reviewing files that changed from the base of the PR and between c9d8ba8 and eda4d88.

📒 Files selected for processing (3)
  • openshift/test/otp/multus_test.go
  • openshift/test/otp/networking_tools_test.go
  • openshift/test/otp/security_test.go
💤 Files with no reviewable changes (1)
  • openshift/test/otp/networking_tools_test.go

Comment thread openshift/test/otp/security.go Outdated
Comment thread openshift/test/otp/networking_tools.go
)

// otpBlockingTests lists the substring patterns for OTP tests that should be blocking
var otpBlockingTests = []string{

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@SachinNinganure Thanks. lets hold on making tests blocking. Lets make all informing for now.

"should not expose API tokens in ovnkube-node logs",
"should have secure permissions on CNI configuration files",
"should handle large IPv6 exclude ranges without timeout",
"should support Dummy CNI plugin with Multus",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Multus tests should go in openshift/multus-cni repo. SO I guess we all need to carefully look at our sheets/tasks and not assume default that everything shall go in openshift/ovn-kubernetes repo.

In this list it seems Whereabouts IPAM and CI Plugin with multus are only 2 cases which belongs to openshift/multus-cni repo

@anuragthehatter anuragthehatter Jun 10, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You are a contributor to openshift/multus-cni#303. You can clone it and keep adding .You can add musltus cases there and
we can test with its registered origin binary openshift/origin#31231 (you are also contributor there). Happy to chat more on this.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Also apparently some cases might belongs to https://github.com/openshift/network-tools as well. So your cases here belongs to 3 repos here IMO.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Multus tests should go in openshift/multus-cni repo. SO I guess we all need to carefully look at our sheets/tasks and not assume default that everything shall go in openshift/ovn-kubernetes repo.

In this list it seems Whereabouts IPAM and CI Plugin with multus are only 2 cases which belongs to openshift/multus-cni repo

Added the 4 Multus test cases to PR #303 framework
Tested them on live cluster (all PASS)
Created PR: anuragthehatter/multus-cni#1

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Also apparently some cases might belongs to https://github.com/openshift/network-tools as well. So your cases here belongs to 3 repos here IMO.

openshift/network-tools - Security and tools tests (5 tests) TODO
OCP-49216: API token logging security
OCP-77102: CNI file permissions
OCP-55889: ovn-db-run-command script
OCP-67625: ovnkube-trace pod-to-pod
OCP-67648: ovnkube-trace pod-to-hostnetworkpod

Comment thread openshift/test/otp/security.go Outdated
})

// Medium-77102: CIS File Permissions for CNI Config
g.It("[OTP][blocking][case_id:77102] should have secure permissions on CNI configuration files", func() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

remove "case_id:" from tests. Lets just keep numbers as we discussed.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

done!

@SachinNinganure
SachinNinganure force-pushed the otp-networking-tools-migration branch from e6f46f7 to d367cdf Compare June 24, 2026 06:30
Comment thread openshift/test/otp/multus.go Outdated
})

// High-57589: Whereabouts CNI Timeout with Large Exclude Range
g.It("[OTP][informing][57589] should handle large IPv6 exclude ranges without timeout", func() {

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.

@SachinNinganure The tests themselves do not have [informing] or [blocking] label

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Hello @asood-rh thank you for the review
Removed [informing]/[blocking] labels from test names and changed format from [OTP][informing][57589] to 57589- following the pattern in PR #3200. The lifecycle is now controlled only by tests.go and main.go.

Comment thread openshift/test/tests.go
"[Feature:EVPN][Feature:RouteAdvertisements][FeatureGate:EVPN][ovn-kubernetes-ote][sig-network] BGP: For BGP configured networks When the tested network is of type Layer 3 CUDN EVPN IP-VRF random VTEP When a pod runs on the tested network When there is other network Of type Layer 2 UDN Both networks are isolated [Suite:openshift/conformance/parallel]",
"[Feature:EVPN][Feature:RouteAdvertisements][FeatureGate:EVPN][ovn-kubernetes-ote][sig-network] BGP: For BGP configured networks When the tested network is of type Layer 3 CUDN EVPN IP-VRF shared VTEP When a pod runs on the tested network When there is other network Of type Layer 3 CUDN EVPN IP-VRF random VTEP Both networks are isolated [Suite:openshift/conformance/parallel]",
"[Feature:EVPN][Feature:RouteAdvertisements][FeatureGate:EVPN][ovn-kubernetes-ote][sig-network] BGP: For BGP configured networks When the tested network is of type Layer 3 CUDN EVPN IP-VRF random VTEP When a pod runs on the tested network When there is other network Of type Layer 3 UDN Both networks are isolated [Suite:openshift/conformance/parallel]",
"[Feature:EVPN][Feature:RouteAdvertisements][FeatureGate:EVPN][ovn-kubernetes-ote][sig-network] BGP: For BGP configured networks When the tested network is of type Layer 2 CUDN EVPN MAC-VRF and IP-VRF When a pod runs on the tested network Can reach KAPI service [Suite:openshift/conformance/parallel]",

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.

Should these changes be there at all? This file is for upstream tests that are being enabled with OTE.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I had some confusion for this, claude helped out;

Removed all OTP test entries from tests.go. You're correct - this file is for upstream ovn-kubernetes tests. understood that
OTP tests are:

  1. Discovered via the import in main.go
  2. Lifecycle controlled by isOTPBlocking() function
  3. Don't need to be listed in tests.go

Thank you @asood-rh

Comment thread openshift/test/e2e_test.go Outdated
// import OVN-Kubernetes E2Es
_ "github.com/ovn-kubernetes/ovn-kubernetes/test/e2e"

// import OTP (OpenShift Tests Private) migration tests

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.

This import is happening in main.go, why is it needed here?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Removed duplicate OTP import from e2e_test.go

Comment thread openshift/test/otp/networking_tools.go Outdated
// Check that at least one message mentions the configured IPs
hasExpectedIPs := false
for _, msg := range messages {
msgStr := msg.(string)

@asood-rh asood-rh Jun 24, 2026

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.

Inconsistent with code at line#452

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Changed line 474 to use the safer two-value type assertion pattern msgStr, ok := msg.(string) with explicit check, consistent with the pattern at line 452

Comment thread openshift/test/otp/networking_tools.go Outdated
})

// Medium-55889: ovn-db-run-command Script Functionality
g.It("[OTP][informing][55889] should execute ovn-db-run-command script successfully", func() {

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.

[informing] or [blocking] is not a test label

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

covered

Comment thread openshift/test/otp/security.go Outdated
})

// Medium-49216: API Token Logging Security
g.It("[OTP][informing][49216] should not expose API tokens in ovnkube-node logs", func() {

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.

Same as in multus.go and networking_tools.go , [informing] or [blocking] is not a test label.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

covered

Comment thread openshift/test/otp/port_isolation.go Outdated
})

// OCP-80525: Verify pods with isolated and non-isolated ports using bridge-cni
g.It("[OTP][informing][80525] should allow communication on non-isolated network but not on isolated network", func() {

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.

[informing] is not a test label.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

covered

// All OTP tests marked as [informing] per reviewer feedback
return false

// Original logic (commented out for now):

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.

Why is this code commented?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

per @anuragthehatter feedback, all OTP tests should start as [informing] for the initial rollout. The commented code is kept for future reference when tests graduate to blocking.
while I can remove it, I thought tests matching blocking will fail when we use this, and this would not be triggered as we have all our cases to be set as informing, should I take it off @asood-rh , or wait for some more stable runs and then open

@asood-rh

Copy link
Copy Markdown
Contributor

@SachinNinganure For the ovntrace tests, please look at the fixing the tests. I recall a change went in where pod containers for pod ovnkube-node changed.

[67625] Pod-to-pod traffic trace - - ovnkube-trace issue

[67648] Pod-to-hostnetworkpod traffic trace - ovnkube-trace issue

Comment thread openshift/test/otp/port_isolation.go Outdated
o.Expect(nonIsolatedOutput).To(o.ContainSubstring("0% packet loss"), "Should show successful ping on non-isolated bridge")
})

// OCP-80526: UDN Verify pods with isolated and non-isolated ports using bridge-cni

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@SachinNinganure Please avoid using references anywhere like OCP-xxxx. Having just numerical IDsin our test case titles is enough.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

done! this was only pending and somehow got missed. thank you @anuragthehatter

@@ -0,0 +1,547 @@
package otp

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

As discussed in earlier comment, networking_tools.go cases belongs to openshift/network-tools repo so you probably need to enable that repro from OTE framework perspective and then migrate these all network_tools.go cases there

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Hello @anuragthehatter I have some questions before moving them
'openshift/network-tools' is not a test framework right, I should 1st enable it and then move if decided to move right?.

While
1 these 3 tests validate OVN debugging and are OVN-specific
55889 ovn-nbctl
67625 ovnkube-trace
67648 ovnkube-trace

2 tests validate OVN features (NOT tools):
45146: OVN routing behavior (single-stack GW on dual-stack)
69761: AdminPolicyBasedExternalRoute CRD status

I have created ovn_features.go to have the above 2 cases

only thing remaining is about the 3 cases 55889, 67625 and 67648; get them to openshift/network-tools .
I will put this in to-do to discuss more. Thank you so much for all the reviews and assist @anuragthehatter

Comment thread openshift/test/otp/security.go Outdated
})

// Medium-77102: CIS File Permissions for CNI Config
g.It("77102-should have secure permissions on CNI configuration files", func() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This usecase and associated util if any should be moved to multus PR openshift/multus-cni#303

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

moved 77102 to multus-cni

Comment thread openshift/test/otp/security.go Outdated
o.Expect(err).NotTo(o.HaveOccurred())
})

// Medium-49216: API Token Logging Security

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please remove such comments as its not followed upstream

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

removed all the comment lines to follow upstream

Comment thread openshift/test/otp/security.go Outdated
"k8s.io/client-go/tools/remotecommand"
)

var _ = g.Describe("[JIRA:Networking][OTP][sig-network] OTP Security", func() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please replace OTP with SDN network segmentation security. Also we just need [OTP] in g.Describe but in each case title like 2445c2b#diff-17e9ab766308533e44e7fe206902b89c107a36433efc64e1d1d6894e8eafab78R42

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You need to add/fix each case

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I followed this for all the cases including the multus ones in other repo;

Changed all g.Describe() blocks per the reference pattern in commit 2445c2b:

ovn-kubernetes security.go:

  • Before: [JIRA:Networking][OTP][sig-network] OTP Security
  • After: [OTP] SDN network segmentation security

ovn-kubernetes port_isolation.go:

  • Before: [JIRA:Networking][OTP][sig-network] OTP Multus Port Isolation
  • After: [OTP] UDN Port Isolation

multus-cni multus.go:

  • Before: [JIRA:Networking][OTP][sig-network] OTP Multus [Suite:openshift/multus-cni]
  • After: [OTP] Multus CNI [Suite:openshift/multus-cni]

@anuragthehatter

anuragthehatter commented Jun 24, 2026

Copy link
Copy Markdown

/retitle CORENET-7131: migrate UDN Security and OVNK CNI test cases

@openshift-ci openshift-ci Bot changed the title OTE: migrate OTP tests: Tools and multus test cases CORENET-7131: migrate UDN Security and OVNK CNI test cases Jun 24, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 24, 2026
@openshift-ci-robot

openshift-ci-robot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

@SachinNinganure: This pull request references CORENET-7131 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:

Validates that ovnkube-node container logs do not expose API tokens
or Bearer authentication credentials.

Test searches ovnkube-controller container logs for sensitive patterns
(api-token, authorization, bearer) and filters false positives to ensure
no actual tokens are logged.

Description
Migrate OTP test case 49216 (API Token Logging Security) to OTE framework as part of the broader OTP-to-OTE migration effort.

Test Case: Medium-49216 - API Token Logging Security
Priority: Blocking (port=yes, >95% pass rate)
Lifecycle: blocking

Fixes
N/A (migration work, not fixing a specific issue)

Additional Information for reviewers

  • Added openshift/test/otp/networking_tools_test.go - First OTP networking tools test
  • Added openshift/test/otp/otp_suite_test.go - Ginkgo test suite registration for OTP package
  • Uses k8s client-go directly (no openshift/origin dependency for portability)
  • Tagged with [sig-networking][OTP][blocking][case_id:49216]

Checks
[ ] My code requires changes to the documentation → Leave UNCHECKED
[ ] if so, I have updated the documentation as required → Leave UNCHECKED
[x] My code requires tests → CHECK THIS (type x between the brackets)
[x] if so, I have added and/or updated the tests as required → CHECK THIS
[ ] All the tests have passed in the CI → Leave UNCHECKED (say "will verify once CI runs")

How to verify it

Test Type: End-to-end Ginkgo test

Local verification:

export KUBECONFIG=/path/to/kubeconfig
cd openshift/test
go test -v ./otp -ginkgo.focus="case_id:49216" 

Manual verification (already done):
- Tested on live OpenShift 4.22 cluster
- Checked 6 ovnkube-node pods
- Result: 0 API tokens found in logs 

CI verification:
Test will run automatically as part of OpenShift networking test suite (tagged with [sig-networking]).



<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

* **New Features**
* Added comprehensive end-to-end tests for Multus networking support, including IPv6 exclude-range handling and Dummy CNI plugin validation.
* Added network tracing tests using ovnkube-trace to validate pod-to-pod and pod-to-host traffic delivery.
* Added security tests to detect token exposure in logs and validate CNI configuration file permissions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

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.

@SachinNinganure
SachinNinganure force-pushed the otp-networking-tools-migration branch from 0412b51 to 659cbd9 Compare July 8, 2026 06:59
@SachinNinganure

Copy link
Copy Markdown
Author

/retest

@asood-rh

Copy link
Copy Markdown
Contributor

/test e2e-aws-ovn

@SachinNinganure

Copy link
Copy Markdown
Author

/test e2e-aws-ovn-fdp-qe

@SachinNinganure

Copy link
Copy Markdown
Author

/test e2e-aws-ovn-edge-zones

@SachinNinganure
SachinNinganure force-pushed the otp-networking-tools-migration branch from 03d5278 to 07f5d86 Compare July 27, 2026 05:44
@SachinNinganure

Copy link
Copy Markdown
Author

/test e2e-aws-ovn-fdp-qe e2e-metal-ipi-ovn-ipv6

SachinNinganure-zz and others added 20 commits July 30, 2026 10:08
  Validates that ovnkube-node container logs do not expose API tokens
  or Bearer authentication credentials.

  Test searches ovnkube-controller container logs for sensitive patterns
  (api-token, authorization, bearer) and filters false positives to ensure
  no actual tokens are logged.

Signed-off-by: Sachin Ninganure <sninganu@sninganu.pnq.csb>
Address reviewer feedback: prevent false negatives by tracking skipped
pods and failing if no pods were successfully scanned.

Changes:
- Track skippedPods when log retrieval fails
- Print warning to GinkgoWriter for debugging
- Assert at least one pod was scanned before checking for violations

This ensures the test cannot pass vacuously if all log retrievals fail
due to RBAC, container restarts, or API errors.

Signed-off-by: Sachin Ninganure <sninganu@sninganu.pnq.csb>
…eviewer feedback: replace broad 'ey' substring match with 'eyJ' to avoid flagging common words

Signed-off-by: Sachin Ninganure <sninganu@sninganu.pnq.csb>
   - Medium-55889: ovn-nbctl database command (uses ovn-nbctl directly)
   - High-57589: Whereabouts CNI large IPv6 exclude ranges (268M IPs)
   - Medium-67625: ovnkube-trace pod-to-pod [informing]
   - Medium-67648: ovnkube-trace pod-to-hostnetworkpod [informing]

   Tests 67625/67648 marked [informing] due to RBAC limitations - ovnkube-trace
   requires cluster-wide pod list permissions not available in default service
   accounts.
   Test results
   - 3 PASSING [blocking]: 49216, 55889, 57589
   - 2 FAILING [informing]: 67625, 67648 (RBAC - expected)
All tests compiled successfully
  Add fmt import for explicit error messages
  Return explicit error when no ovnkube-node pods found
  Remove unused srcIP/dstIP parameters from runOVNKubeTrace
  Remove unnecessary pod Get calls
  and adds new test coverage:

  Changes:
  - Split networking_tools_test.go into 3 category-based files:
    * security_test.go - Security/compliance tests
    * networking_tools_test.go - Tools group tests only
    * multus_test.go - Multus CNI tests

  New Tests Added:
  1. Medium-76652: Dummy CNI plugin support with Multus
     - Tests dummy interface creation with static IPAM
     - Validates network-status annotation contains dummy network
     - Confirms IP assignment (10.10.10.2/24)

  2. Medium-77102: CIS file permissions for CNI configs
     - Checks multus config permissions (600 expected)
     - Validates whereabouts config permissions (600 expected)
     - Ensures CIS compliance for CNI configuration files
     - Uses exec into multus pods and debug pod on nodes
Test Results (7 tests total):
  5 blocking tests PASS (100% pass rate)
  2 informing tests FAIL (expected - RBAC limitations)

  Test Organization:
  a) security_test.go: 49216, 77102
  b) networking_tools_test.go: 55889, 67625, 67648
  c) multus_test.go: 57589, 76652
  Changes:
  - Split networking_tools_test.go into 3 category-based files:
    security.go - Security/compliance tests
    networking_tools.go - Tools group tests only
    multus.go - Multus CNI tests
  - Removed otp_suite_test.go (not needed in OTE pattern)

  Added new tests:
  1. Medium-76652: Dummy CNI plugin support with Multus
     - Tests dummy interface creation with static IPAM
     - Validates network-status annotation contains dummy network
     - Confirms IP assignment (10.10.10.2/24)
2. Medium-77102: CIS file permissions for CNI configs
  Code Review Fixes:
  - Fixed runOVNKubeTrace to return explicit error when no ovnkube-node
    pods found (previously returned nil error)
  - Removed unused srcIP/dstIP parameters from runOVNKubeTrace function
  - Updated all callers (67625, 67648 tests)

  Test Registration:
  - Added all 7 tests to openshift/test/tests.go (5 blocking, 2 informing)
  - Imported OTP package in main.go and e2e_test.go
  - Tests compile successfully but not appearing in OTE list (needs help)

  Test Results (verified with go test before OTE migration):
  - 5 blocking tests PASS (100% pass rate)
  - 2 informing tests FAIL (expected - RBAC limitations)

  Test Organization:
  - security.go: 49216, 77102
  - networking_tools.go: 55889, 67625, 67648
  - multus.go: 57589, 76652
  - Replaced clientcmd kubeconfig loading with exutil.NewCLI()
  - Converted Kubernetes client-go calls to oc.Run() commands
  - Removed manual namespace creation/deletion (exutil handles this)
  - Simplified pod exec operations to use oc exec instead of SPDY executor
  - All test operations now use 'oc' commands for consistency
  Files refactored:
  - security.go: Token logging + CIS permissions tests
  - multus.go: Whereabouts + Dummy CNI tests
  - networking_tools.go: ovn-nbctl + ovnkube-trace tests

  Known issue:
  This refactor requires github.com/openshift/origin dependency which
  is not yet in main. This PR needs to be rebased on top of PR openshift#3200
  (Anurag's networkpolicy migration) which includes the required
  infrastructure.needs PR openshift#3200 merged or rebase
  onto that branch to get openshift/origin@v1.5.0-alpha dependency.
  - Add [JIRA:Networking][OTP][sig-network] tags to all Describe blocks (required by OTE)
  - Add isOTPBlocking() function to main.go for OTP lifecycle assignment
  - Update specs.Walk() to skip label prepending for OTP tests
  - Fix test names in tests.go to match actual format (without prepended labels)
  - Test 45146: Pod health with single-stack gateway on dual-stack cluster
    Tests pod with k8s.ovn.org/routing-* annotations
    Verified pod reaches Running state and is healthy
  - Test 69761: AdminPolicyBasedExternalRoute status aggregation
    Validates status.messages from all OVN-IC zones (nodes)
    Checks status.status shows Success when all zones report
    Tests external gateway IP configuration (172.18.0.8, 172.18.0.9),verified on 422 cluster
Both tests added to networking_tools.go in ExternalRoute category.
Added dynamic client imports for CRD interaction.
Updated main.go with blocking test patterns.
OCP-66876: Whereabouts dual-stack IPAM test
    - Validates IPv4 + IPv6 assignment from Whereabouts
    - Tests same-node connectivity (IPv4 and IPv6)
    - UBI9 Python server with dual-stack HTTP listener
OCP-69947: Macvlan Unsolicited Neighbor Advertisements test
    - Validates ICMPv6 NA packets sent when macvlan pods are created
    - Packet capture with tcpdump filtering icmp6[0]=136
    - Marked as [informing] due to timing sensitivity in automation
    - Manually validated successfully (6 NAs captured to ff02::1)
  1. Changed all 8 blocking tests to [informing]
     - Updated main.go isOTPBlocking() to return false
     - Changed test tags: [OTP][blocking] → [OTP][informing]

  2. Removed 'case_id:' prefix from test IDs
     - Was: [OTP][informing][case_id:77102]
     - Now: [OTP][informing][77102]

  3. Added PodSecurity labels to fix CI failures
     - Added privileged labels to 7 test namespaces
     - Fixes tests 45146, 76652, 57589 (403 Forbidden in CI)

  Repository redistribution plan (per reviewer):
  - 4 Multus tests → openshift/multus-cni (PR created)
  - 5 Security/tools tests → openshift/network-tools (future)
  - 2 Core OVN-K tests → remain here

  Changes:
  - 11 informing tests (was 8 blocking + 3 informing)
  - PodSecurity labels on 7 namespaces
  - Test IDs simplified (no case_id: prefix)
Add bridge CNI port isolation test cases:
  - [80524]: Basic port isolation on bridge CNI
  - [80525]: Mixed isolated/non-isolated ports
  - [81757]: UDN with port isolation (requires UDN feature)
  - [80526]: UDN with mixed isolation (requires UDN feature)

Tests 80524 and 80525 pass on live cluster.
Tests 81757 and 80526 require UDN feature to be enabled.

All tests marked [informing] per requirements.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
  1. Fixed test naming format across all OTP test files:
     - Removed [OTP][informing]/[blocking] labels from test names
     - Changed format from "[OTP][informing][57589]" to "57589-"
     - Follows pattern established in PR openshift#3200
     - Lifecycle now controlled solely by main.go isOTPBlocking()

  2. Removed OTP entries from tests.go:
     - OTP tests discovered via import in main.go line 18
     - Lifecycle set by isOTPBlocking() function (lines 200-203)
     - tests.go is for upstream ovn-kubernetes tests only (EVPN, UDN)
     - Removed 11 redundant OTP test entries

  3. Removed duplicate OTP import from e2e_test.go:
     - Import in main.go line 18 is sufficient for test discovery
     - Duplicate was unnecessary

  4. Fixed type assertion consistency in networking_tools.go:
     - Line 474: Changed unsafe single-value assertion to safe two-value
     - Now consistent with line 452 pattern
     - Added explicit check: msgStr, ok := msg.(string)
…IPv6 exclude ranges

  - [76652]: Dummy CNI plugin support
  - [66876]: Whereabouts dual-stack IPAM
  - [69947]: Macvlan Unsolicited Neighbor Advertisements
  - [80524]: Basic port isolation with bridge CNI
  - [80525]: Mixed port isolation networks
  These tests were moved as they are pure Multus CNI tests without ovn-kubernetes dependencies.
  Total OTP tests now: 9 (2 security + 5 networking tools + 2 port isolation)

  Related: openshift/multus-cni#303
  - 81757: Port isolation with UDN and bridge CNI - NOW PASSING
  - 80526: UDN with mixed port isolation - NOW PASSING
  - 69947: Macvlan Unsolicited NA - AWS skip logic (already working)

  Tests Documented (require infrastructure changes):
  - 67625: ovnkube-trace pod-to-pod - RBAC permissions needed
  - 67648: ovnkube-trace pod-to-hostnet - RBAC permissions needed

  Key Changes for UDN Tests:

  1. IPv4-only subnet configuration (cluster doesn't support IPv6):
     - Changed from dual-stack to single subnet: 10.132.0.0/16
     - Matches scale team's working configuration
     - Fixes: cluster does not support ipv6 controller errors

  2. Correct UDN status condition check:
     - Changed from NetworkReady to NetworkCreated
     - This is the actual condition type used by UDN controller
     - Fixes: 180-second timeout waiting for wrong condition

  3. Added required namespace labels:
     - k8s.ovn.org/primary-user-defined-network: layer2-ipv4-pudn1
     - security.openshift.io/scc.podSecurityLabelSync: false
     - Per Arti's guidance and scale team patterns

  4. Increased timeout from 120s to 180s for slower clusters

  RBAC Documentation (67625, 67648):

  Added detailed FIXME comments explaining:
  - ovnkube-trace needs pods/exec permission
  - Current ClusterRole has pods/nodes get/list but missing pods/exec
  - Cannot add temporary RBAC in tests (security risk in CI)
  - Tests marked [informing] so won't block CI
  - Requires team decision on proper RBAC solution
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Test validates ovn-get script functionality:
- ovn-get -h: Verifies help shows leaders, dbs, mode commands
- ovn-get leaders: Gets ovn-k master, nbdb, sbdb leaders
- ovn-get mode: Checks if cluster runs in ovn-ic or legacy mode

Manually validated commands on 4.22 cluster (Jul):
- Help output shows correct commands
- Leaders command shows ovn-k master leader
- Mode command reports multi-zone (ovn-ic)

Added execCommandInPod helper for pod exec operations.

Per Anurag's request to add test 55890 to network tools.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…x ovnkube-trace RBAC

  - 55890: Deploy network-tools pod from imagestream, run ovn-get via /opt/bin/network-tools wrapper
  - 67625/67648: Create separate trace runner pod with temporary cluster-admin SA instead of
    exec'ing into ovnkube-node pod (which has restricted SA lacking pods/list and pods/exec)
  - All three tests create temporary RBAC (ClusterRoleBinding) and clean up in defer
@SachinNinganure
SachinNinganure force-pushed the otp-networking-tools-migration branch from 07f5d86 to a73e6bf Compare July 30, 2026 04:46
@SachinNinganure

Copy link
Copy Markdown
Author

/retest

@SachinNinganure

Copy link
Copy Markdown
Author

/test e2e-metal-ipi-ovn-ipv6

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Tests from second stage were triggered manually. Pipeline can be controlled only manually, until HEAD changes. Use command to trigger second stage.

@openshift-ci

openshift-ci Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

@SachinNinganure: 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-upgrade-local-gateway 659cbd9 link true /test e2e-aws-ovn-upgrade-local-gateway
ci/prow/e2e-aws-ovn-hypershift 659cbd9 link true /test e2e-aws-ovn-hypershift
ci/prow/e2e-aws-ovn-local-gateway 659cbd9 link true /test e2e-aws-ovn-local-gateway
ci/prow/e2e-aws-ovn-upgrade 659cbd9 link true /test e2e-aws-ovn-upgrade
ci/prow/e2e-metal-ipi-ovn-dualstack-bgp 659cbd9 link true /test e2e-metal-ipi-ovn-dualstack-bgp
ci/prow/e2e-gcp-ovn-techpreview 659cbd9 link true /test e2e-gcp-ovn-techpreview
ci/prow/e2e-aws-ovn-local-to-shared-gateway-mode-migration 659cbd9 link true /test e2e-aws-ovn-local-to-shared-gateway-mode-migration
ci/prow/e2e-aws-ovn-serial 659cbd9 link true /test e2e-aws-ovn-serial
ci/prow/e2e-metal-ipi-ovn-dualstack-bgp-local-gw 659cbd9 link true /test e2e-metal-ipi-ovn-dualstack-bgp-local-gw
ci/prow/e2e-aws-ovn-edge-zones 659cbd9 link true /test e2e-aws-ovn-edge-zones
ci/prow/e2e-aws-ovn-fdp-qe 07f5d86 link true /test e2e-aws-ovn-fdp-qe
ci/prow/qe-perfscale-payload-control-plane-6nodes a73e6bf link true /test qe-perfscale-payload-control-plane-6nodes

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.

5 participants