-
Notifications
You must be signed in to change notification settings - Fork 172
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(userspace/libsinsp): not report container id as host on failed lookups #1604
Conversation
…okups Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
cc @Andreagit97 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
Thank you for the fix! the ideal fix would be to extract the container-id directly from the cgroups
even when no container engines are configured, but not sure if this is really feasible, for sure it deserves some investigation!
LGTM label has been added. Git tree hash: e9478f953ee656983b6baed5860a8dfade666687
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Andreagit97, FedeDP, jasondellaluce The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind bug
Any specific area of the project related to this PR?
/area libsinsp
Does this PR require a change in the driver versions?
What this PR does / why we need it:
Which issue(s) this PR fixes:
On failed container info lookups, the container ID stored in each thread info can potentially be marked as empty. However, the
container.id
field currently reports empty container IDs ashost
value, thus making impossible to distinguish actual threads running on the host from threads running in containers for which the metadata lookup failed.This attempts mitigating the issue by also checking that the thread is running outside of a namespace for
container.id
. As such, failed container ID lookups will return an empty string instead ofhost
.Special notes for your reviewer:
Does this PR introduce a user-facing change?: