-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: set follow
to false when retrieving logs
#2286
fix: set follow
to false when retrieving logs
#2286
Conversation
|
I have signed the CLA twice, once on mobile and once on my phone. Also clicked the recheck button multiple times. Maybe that integration is having issues? The integration test is timing out at 300s on "When unmanaged Pod is created [It] Should create VulnerabilityReport". In my cluster, the modified trivy-operator creates a VulnerabilityReport for an unmanaged pod. On the line above that (460 in the test output, there is an error (below) which i think is the real cause of the failure: failed to download policies: failed to download built-in policies: download error: oci download error: failed to fetch the layer: GET https://ghcr.io/v2/aquasecurity/trivy-checks/blobs/sha256:cba49b6781cfcdeb6b063283a711ce0ddb1f36d6e2a5db69ef7d2e3f13998149: TOOMANYREQUESTS: retry-after: 885.605µs, allowed: 44000/minute |
This PR is stale because it has been labeled with inactivity. |
The PR seems fine to me but can we confirm that we only use this function to get logs for completed jobs? Otherwise we would need the |
follow
to false when retrieving logs
Description
Set Follow=false when retrieving logs from completed job.
Using Follow mode in this case is unnecessary because:
In cases where the underlying node has resources (fsnotify handle) exhaustion this causes the logs to return an error after the base64 data "failed to create fsnotify watcher: too many open files", and trivy fails to process that scan job due to "illegal base64 data".
I tested this simple change in a cluster that was having the issue, and the operator processed and deleted all the completed scan jobs that were previously being continuously re-processed with base64 failures.
Related issues
Checklist