cloud-probe
cloud-probe copied to clipboard
在containerd运行时的k8s集群,部署了升级到crictl v1.32.0最新版本的cloudprobe,在开启采集时触发异常报错
Note: In order to provide a more accurate response to your issue, please present your issue using the template.
Environment
- *CP version 0.8.7
- *Crictl version 1.32.0
- *platform(e.g., vm, pod, etc)Kubenetes containerd运行时
Issue description
在Crictl version 1.25.0,通过cp计算得出的pid的结果中,包含了2个pid,其中第一个是指定业务容器的运行pid,当cloudprobe采集该pid的业务流量时,采集正常:
因漏洞扫描的要求,需要升级Crictl version 1.32.0,通过cp计算得出的pid的结果中,指定业务容器的运行pid,是所有结果中的第二个,导致cloudprobe最终采集的是pid为1的业务流量,采集失败:
How to reproduce
- 更新Crictl version 1.32.0
- 制作基于Crictl version 1.32.0的cloudprobe容器镜像文件
- 在基于containerd运行时的Kubenetes 集群部署上述cloudprobe pod
- 开启流量采集任务
Attachments and their description
- pod-log.log: 现场报错日志记录
Message that will be displayed on users first issue
crictl升级后,获取主机pid方式不再可用,可以通过修改get_pid_with_container.sh逻辑来处理。 步骤大体如下:
- 将crictl放入到一个非PATH路径,这样就不会调用crictl来获取主机pid
- 在get_pid_with_container.sh使用全路径crictl inspect来获取主机pid