Skip to content

ROX-31331: Require Collector reporting all processes#17551

Merged
vikin91 merged 2 commits intomasterfrom
piotr/ROX-31331-more-processes
Oct 30, 2025
Merged

ROX-31331: Require Collector reporting all processes#17551
vikin91 merged 2 commits intomasterfrom
piotr/ROX-31331-more-processes

Conversation

@vikin91
Copy link
Contributor

@vikin91 vikin91 commented Oct 29, 2025

Description

Re-enable detection of /bin/sh, /bin/date, and /bin/sleep processes in TestPod and TestContainerInstances by removing TODO(ROX-31331) workarounds.

Problem

Tests TestPod and TestContainerInstances were not checking for /bin/sh, /bin/date, and /bin/sleep processes from the Ubuntu container due to unreliable Collector process detection (ROX-31331). The tests had TODO comments indicating these processes should be re-enabled once the underlying issue was resolved.

Why it was failing before

We created ROX-31331, because it was easy to say that if something is missing in Central, then most probably the Collector is not reporting something. The faith in Sensor was too strong, because it turned out that Sensor was loosing selected data in the test run because it was restarted shortly before the TestPod and TestContainerInstances were triggered.
The issue of Sensor not being ready for test was fixed in #17502.

Changes

Removed TODO(ROX-31331) comments and re-enabled full process detection:

tests/container_instances_test.go:

  • Changed requiredSecondContainer from []string{"/bin/sh"}
  • To: []string{"/bin/sh", "/bin/date", "/bin/sleep"}

tests/pods_test.go:

  • Changed requiredProcesses from []string{"/usr/sbin/nginx"}
  • To: []string{"/usr/sbin/nginx", "/bin/sh", "/bin/date", "/bin/sleep"}

Before vs After

Before:

// TODO(ROX-31331): Collector cannot reliably detect /bin/sh /bin/date or /bin/sleep
requiredProcesses := []string{"/usr/sbin/nginx"} // Only checking nginx

After:

requiredProcesses := []string{"/usr/sbin/nginx", "/bin/sh", "/bin/date", "/bin/sleep"}

User-facing documentation

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

  • I run gke-nongroovy-e2e-tests and ocp-4-19-nongroovy-e2e-tests in CI 10 times each, and manually checked the results by making sure that TestPod and TestContainerInstances are not failing.

@rhacs-bot
Copy link
Contributor

Images are ready for the commit at f5e064e.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.10.x-189-gf5e064e228.

@codecov
Copy link

codecov bot commented Oct 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.72%. Comparing base (2f9f188) to head (f5e064e).
⚠️ Report is 12 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #17551   +/-   ##
=======================================
  Coverage   48.71%   48.72%           
=======================================
  Files        2724     2724           
  Lines      202999   202999           
=======================================
+ Hits        98893    98904   +11     
+ Misses      96352    96342   -10     
+ Partials     7754     7753    -1     
Flag Coverage Δ
go-unit-tests 48.72% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vikin91 vikin91 added the auto-retest PRs with this label will be automatically retested if prow checks fails label Oct 29, 2025
@vikin91
Copy link
Contributor Author

vikin91 commented Oct 29, 2025

/retest-times 10 ocp-4-19-nongroovy-e2e-tests
/retest-times 10 gke-nongroovy-e2e-tests

@rhacs-bot
Copy link
Contributor

/test gke-nongroovy-e2e-tests
/test ocp-4-19-nongroovy-e2e-tests

@rhacs-bot
Copy link
Contributor

/test gke-nongroovy-e2e-tests

@rhacs-bot
Copy link
Contributor

/test ocp-4-19-nongroovy-e2e-tests

@rhacs-bot
Copy link
Contributor

/test gke-nongroovy-e2e-tests

1 similar comment
@rhacs-bot
Copy link
Contributor

/test gke-nongroovy-e2e-tests

@rhacs-bot
Copy link
Contributor

/test ocp-4-19-nongroovy-e2e-tests

@rhacs-bot
Copy link
Contributor

/test gke-nongroovy-e2e-tests

@rhacs-bot
Copy link
Contributor

/test gke-nongroovy-e2e-tests
/test ocp-4-19-nongroovy-e2e-tests

1 similar comment
@rhacs-bot
Copy link
Contributor

/test gke-nongroovy-e2e-tests
/test ocp-4-19-nongroovy-e2e-tests

@rhacs-bot
Copy link
Contributor

/test gke-nongroovy-e2e-tests

@rhacs-bot
Copy link
Contributor

/test ocp-4-19-nongroovy-e2e-tests

@rhacs-bot
Copy link
Contributor

/test gke-nongroovy-e2e-tests

1 similar comment
@rhacs-bot
Copy link
Contributor

/test gke-nongroovy-e2e-tests

@rhacs-bot
Copy link
Contributor

/test ocp-4-19-nongroovy-e2e-tests

@openshift-ci
Copy link

openshift-ci bot commented Oct 30, 2025

@vikin91: The following test 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/ocp-4-18-nongroovy-e2e-tests f5e064e link false /test ocp-4-18-nongroovy-e2e-tests

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.

@vikin91 vikin91 requested review from a team October 30, 2025 08:11
@rhacs-bot
Copy link
Contributor

/test ocp-4-19-nongroovy-e2e-tests

2 similar comments
@rhacs-bot
Copy link
Contributor

/test ocp-4-19-nongroovy-e2e-tests

@rhacs-bot
Copy link
Contributor

/test ocp-4-19-nongroovy-e2e-tests

@rhacs-bot
Copy link
Contributor

/retest

@vikin91 vikin91 merged commit 76e375a into master Oct 30, 2025
93 of 94 checks passed
@vikin91 vikin91 deleted the piotr/ROX-31331-more-processes branch October 30, 2025 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-retest PRs with this label will be automatically retested if prow checks fails

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants