Skip to content
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

New functions GetFrom{Pid,Thread}WithAltProcfs #76

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alban
Copy link

@alban alban commented May 24, 2023

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.

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.
Copy link
Collaborator

@jeffwidman jeffwidman left a comment

Choose a reason for hiding this comment

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

👍 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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants