New functions GetFrom{Pid,Thread}WithAltProcfs#76
Open
alban wants to merge 1 commit intovishvananda:masterfrom
Open
New functions GetFrom{Pid,Thread}WithAltProcfs#76alban wants to merge 1 commit intovishvananda:masterfrom
alban wants to merge 1 commit intovishvananda:masterfrom
Conversation
3 tasks
Existing functions GetFrom{Pid,Thread}() need the pid/tid argument to
be numbered as per the pid namespace of the /proc mount.
In some container configurations, this is not suitable: a container with
unshared pid namespace and the host's /proc mounted in /host/proc needs
to lookup pids numbered as per the host pid namespace in /host/proc.
GetFrom{Pid,Thread}WithAltProcfs() provide a way for such container
setups to use an alternative /proc path.
jeffwidman
reviewed
Oct 13, 2023
Collaborator
jeffwidman
left a comment
There was a problem hiding this comment.
👍 for the general feature, let me think on the API for a sec... debating whether we actually need new functions, or if we should make a breaking change to require the path (with '' as the default value)...
mauriciovasquezbernal
added a commit
to inspektor-gadget/inspektor-gadget
that referenced
this pull request
Jan 26, 2024
Use upstream version of netns and implement move custom functions from fork to utils package. Once vishvananda/netns#76 is merged we can remove the custom functions and use upstream. Signed-off-by: Mauricio Vásquez <mauriciov@microsoft.com>
mauriciovasquezbernal
added a commit
to inspektor-gadget/inspektor-gadget
that referenced
this pull request
Jan 26, 2024
Use upstream version of netns and implement move custom functions from fork to utils package. Once vishvananda/netns#76 is merged we can remove the custom functions and use upstream. Signed-off-by: Mauricio Vásquez <mauriciov@microsoft.com>
mauriciovasquezbernal
added a commit
to inspektor-gadget/inspektor-gadget
that referenced
this pull request
Jan 31, 2024
Use upstream version of netns and implement move custom functions from fork to utils package. Once vishvananda/netns#76 is merged we can remove the custom functions and use upstream. Signed-off-by: Mauricio Vásquez <mauriciov@microsoft.com>
mauriciovasquezbernal
added a commit
to inspektor-gadget/inspektor-gadget
that referenced
this pull request
Jan 31, 2024
Use upstream version of netns and move custom functions from fork to utils package. Once vishvananda/netns#76 is merged we can remove the custom functions and use upstream. Signed-off-by: Mauricio Vásquez <mauriciov@microsoft.com>
ghinks
pushed a commit
to ghinks/inspektor-gadget-ghinks
that referenced
this pull request
Jan 31, 2024
Use upstream version of netns and move custom functions from fork to utils package. Once vishvananda/netns#76 is merged we can remove the custom functions and use upstream. Signed-off-by: Mauricio Vásquez <mauriciov@microsoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Existing functions GetFrom{Pid,Thread}() need the pid/tid argument to be numbered as per the pid namespace of the /proc mount.
In some container configurations, this is not suitable: a container with unshared pid namespace and the host's /proc mounted in /host/proc needs to lookup pids numbered as per the host pid namespace in /host/proc.
GetFrom{Pid,Thread}WithAltProcfs() provide a way for such container setups to use an alternative /proc path.