Skip to content
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

Kata Containers CNI Network Problems on kata 3.2 #9279

Open
yangfeiCosmo opened this issue Mar 14, 2024 · 4 comments
Open

Kata Containers CNI Network Problems on kata 3.2 #9279

yangfeiCosmo opened this issue Mar 14, 2024 · 4 comments
Labels
question Requires an answer

Comments

@yangfeiCosmo
Copy link

yangfeiCosmo commented Mar 14, 2024

Dear Kata Containers Community,
I'm the user of Kata Containers from Haier Corp of China。Now 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 hypervisor,but the SOS cannot communicate with each other over the cni network,but 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

image

I am now able to ping 10.77.0.2.
2

  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.

3

Now I cannot ping 10.77.0.2。

4
containerd.log
containerd-kata.log
kata-collect-data.log
persist.json

Now The tap0_kata did not have IP in networkspace redisnet。

And eth0's mac didn't match to eth0's mac of kata-test containers. but eth0's mac of kata-test containers is same as tap0_kata in redisnet networkspace.
image

@yangfeiCosmo yangfeiCosmo added the question Requires an answer label Mar 14, 2024
@Apokleos
Copy link
Contributor

Hi @yangfeiCosmo could you try to active the eth0 manualy using kata-runtime exec <ID> to enter the kata guest and then executing the command ip link set eth0 up

@yangfeiCosmo
Copy link
Author

Hi @yangfeiCosmo could you try to active the eth0 manualy using kata-runtime exec <ID> to enter the kata guest and then executing the command ip link set eth0 up
Hi @Apokleos ,thanks for your reply。 I have tried your suggestion,kata-runtime exec kata-test ,and ip link set dev eth0 up。but eth0 is still link down.

image

@Apokleos
Copy link
Contributor

@yangfeiCosmo Could you please give us instructions about how to get acrn binary ? I have no such env for testing a kata with acrn hypervisor

@Apokleos
Copy link
Contributor

Apokleos commented Apr 7, 2024

@yangfeiCosmo FYI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Requires an answer
Projects
Issue backlog
  
To do
Development

No branches or pull requests

2 participants