markzhang0928
markzhang0928
could you please give us more details for this error? or you can diagnose by using `kubectl --v=8 cp /:/tmp/foo /tmp/bar`.
复制的对象(target pod) 是目标业务容器,而不是debug-agent容器。 et.c 于2020年5月6日周三 下午3:01写道: > 我也遇到 cp 不出来的问题,cp 报如下错误: > > $ kubectl --v=8 cp > debug-agent-pod-c591f1e0-8f64-11ea-90cc-82962ec51401:/tmp/auth.pcap > auth.pcap > command terminated with exit code 126 > >...
> > 看起来是这个 pod 的镜像问题 > > 是我要debug pod 的镜像问题吗?看说明没有什么特别配置 换一个镜像版本,aylei/debug-agent:latest 试试?
好像作者已经提到了,“对于Mount Namespace来说,一个具有多线程的进程是无法使用setns调用进入到对应的命名空间的。” moby的解决方法,是用reexec让新的进程在启动 runtime 多线程环境之前完成 setns 相关操作,golang目前没有相关的机制,而 C 语言却可以通过 gcc 的 扩展 __attribute__((constructor)) 来实现程序启动前执行特定代码。 具体细节 参考一下这个?[Nsenter C代码解析](http://hutao.tech/k8s-source-code-analysis/around/runc/namespace.html)