Dear Kata Containers Community,

I have open an issue on github, https://github.com/kata-containers/kata-containers/issues/9279, but  nobody helps me to resolve this issue.

Could you please help me figure out where is wrong about my step?

Thanks very much.

 

Yangfei

发件人: Yang Fei 杨斐
发送时间: 2024313 22:09
收件人: 'kata-dev@lists.katacontainers.io'
主题: Kata Containers CNI Network Problems on kata 3.2

 

Dear Kata Containers Community,

I'm the user of Kata Containers from Haier Corp of ChinaNow I want your support to resolve my problems.

I run Kata(version:3.2.0) containers on Containerd (v1.7.9) with CNI Network, and the hypervisor is ACRN(V3.2.0) Now I can run a kata containers on acrn hypervisorbut the SOS cannot communicate with each other over the cni networkbut it works when using hypervisor QEMU

Here are my steps:

1. Create cni conf file

cat << EOF | tee /etc/cni/net.d/redisnet.conf

{

    "cniVersion": "0.4.0",

    "name": "redisnet",

    "type": "bridge",

    "bridge": "cni0",

    "isDefaultGateway": true,

    "forceAddress": false,

   "ipMasq": true,

    "hairpinMode": true,

    "ipam": {

        "type": "host-local",

        "subnet": "10.77.0.0/16"

    }

}

EOF

2. Create networkspace and add network into it.

ip netns add redisnet

 

export CNI_PATH=/opt/cni/bin

cnitool add redisnet /var/run/netns/redisnet

cnitool check redisnet /var/run/netns/redisnet

https://ihaier.feishu.cn/space/api/box/stream/download/asynccode/?code=ZWYzYTZmNTRhNTExNWIyYWVlNDcxMjMxNTcwMTEwMGVfWFZPODI3Wm11Tmp6RjhtSVV5MUFWU0R0R09BTHRuMENfVG9rZW46VFlCTGJPT0Rvb0Vnd2t4d3dOZmM4a1MzbmhkXzE3MTAzMzc4OTU6MTcxMDM0MTQ5NV9WNA

I am now able to ping 10.77.0.2.

 

https://ihaier.feishu.cn/space/api/box/stream/download/asynccode/?code=MGVhMDQzYjAxM2RiNmFlMmY4MDgzN2Y2MGIzYTRmMjRfWVA0ck9wR2ZWcVVxWk00T3dhQlFxZzdIMWRjUTV3VGNfVG9rZW46Rll4RGI1RXBjbzI4V0N4QU9WcWNYTFlObjZjXzE3MTAzMzc4OTU6MTcxMDM0MTQ5NV9WNA

3. Start a kata container with CNI Network

ctr run  --snapshotter devmapper  --runtime "io.containerd.kata.v2"  --with-ns=network:/var/run/netns/redisnet -d registry2-qingdao.cosmoplat.com/62_edegecloud/ubuntu-vim-ip:22.04 kata-test sh

but the container's eth0 is link down.

https://ihaier.feishu.cn/space/api/box/stream/download/asynccode/?code=YjJiNDBkMDNmYzQwNDYwMjVlNjA4NGY3YjE2OWY2ZDNfZ1pJenlzSzJuV2xqY0JiWm1qeXN0N1VHRk5Ta0ZTdmxfVG9rZW46S3AxQWJwUDdyb1g1TVZ4V3pNSGNwZ0s5bjJmXzE3MTAzMzc4OTU6MTcxMDM0MTQ5NV9WNA

Now I cannot ping 10.77.0.2

https://ihaier.feishu.cn/space/api/box/stream/download/asynccode/?code=MmM0MTdhZjY3OGMyOWVmYzU3ODgxMzg2OWY5MGEwYWFfVVF1eDVrODhqMHdlNmVESUczRUo2c3piRlkwQnFnamdfVG9rZW46RXJSZ2JVOTVob2J4V2x4clRPaWNuVVZTbkxlXzE3MTAzMzc4OTU6MTcxMDM0MTQ5NV9WNA

 

could you  please help me figure out where is wrong about my steps? If not wrong ,could you  please help me resolve this problems

 

Here are some logs and configs of my test.

 

Thanks and Best Regards,

Jason Yang

 

The information transmitted is intended solely for the use of the addressee and may contain confidential and/or privileged material. Any unauthorized disclosure, reproduction, distribution, dissemination, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the email together with any material attached (if any) completely from any device immediately. Unless otherwise stated, any views or opinions expressed in this email are solely those of the author and do not necessarily represent those of Haier Group.

本邮件可能包含敏感信息且仅限于发给指定的收件人,任何未经授权泄露、复制、散布或传播此信息的行为将被禁止。如果您错误收到了此邮件,请及时告知发送者并立即从所有设备中完全删除此邮件及附件。除非另有说明,否则邮件中可能包含的观点或建议仅代表发件者本人,并不代表海尔集团。