-
Notifications
You must be signed in to change notification settings - Fork 166
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
Problem when specifying pod/container/pid arguments but not when specifying host/pid arguments #172
Comments
Try specifying the pid with $container_pid per the docs, it will get replaced by the pid that the selector matches |
@03k64 sorry was typing from my phone yesterday so couldn't give a complete explanation, but I think what you need in order to correctly match this process is an invocation like this:
The process selector will match a process relative to the container namespace using the criteria specified (FYI you can also go by exe name, rather than having to hardcode the PID). Regardless of whether you use a process selector or not, the target process ID is available to the trace program via the magic value Please give this a try. |
Hi @dalehamel and thanks for getting back to me. Sorry for my own delay in replying, I'm currently only working part-time on a Monday while studying. I tried the format of command you suggested without success. I tried specifying With each invocation using
The job itself is in a
In this instance, the job is in an active state and has no failure conditions attached. The only thing that struck me as odd about this was that |
As an additional question (and I can raise a new issue for this if desired), is there any plan to have the |
Hi, I'm having an issue when specifying a combination of pod/container/pid arguments, the issue does not occur when I run against a combination of only host/pid arguments. For example, if I
ssh
onto a Kubernetes worker node anddocker inspect...
to find the PID of a running container, then I can run the following command and see output as below in response tocurl
commands that cause the service to make onward requests:However, if I attempt the same command against the pod/container/pid I see only the header output as below no matter how many subsequent
curl
commands I make against the service:I've also tried specifying
--process-selector "pid=1"
instead of/in addition to--args "-p 1"
without success. I've also followed the steps in the README and repeated the above after creating aServiceAccount
,PodSecurityPolicy
,ClusterRole
andClusterRoleBinding
in case that was the issue, but I still saw only the headers output as above. I've confirmed the container-relative PID of1
by inspecting/proc/1/cmdline
to ensure it is the application command that is being run under PID1
.I am running using the latest commit compiled from source per the README and the cluster is running v1.19.14 of Kubernetes. If you can suggest anything to try and debug what the issue might be then I am happy to provide further information, thanks in advance :)
The text was updated successfully, but these errors were encountered: