-
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
FindPidByPodContainer unreliable #174
Closed
Comments
Hi there, we've never tested with cri-o before so thanks for flagging this. Thanks also for linking some more generic code. |
@dalehamel If containerd is used as the CRI runtime, the mount info looks like:
The generic code would be better like this:
|
@dalehamel I submitted a PR(#207 ) to fix this, can you take a look? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
kubectl-trace/pkg/procfs/procfs.go
Line 59 in 7fd3007
This code makes too many assumptions about what the file paths will look like.
Actual mount results on my cluster look like
/kubepods.slice/kubepods-burstable.slice/kubepods-burstable-pod30cea2cf_1b80_4807_abad_d81453e199c5.slice/crio-a8077b08a56c0c6e33d6716557d882ac940cb09475c50372e22e84c40d0733f2.scope
Additionally, the following agruments get passed to the job container
--pod-uid=30cea2cf-1b80-4807-abad-d81453e199c5 --container-id=cri-o://a8077b08a56c0c6e33d6716557d882ac940cb09475c50372e22e84c40d0733f2
We need to also trim the
cri-o://
prefix. The pod UID seems to replace-
with_
so that is another issue.This project works for me: https://github.com/yahoo/kubectl-flame/blob/master/agent/utils/process.go#L35
The text was updated successfully, but these errors were encountered: