-
Notifications
You must be signed in to change notification settings - Fork 32
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
Could not create network lnst_container_net_net1: 404 Client Error: Not Found (network not found) #246
Comments
Could you please upload the |
[konguyen@konguyen lnst]$ cat runner.py class HelloWorldRecipe(BaseRecipe):
podman_uri = "unix:///run/podman/podman.sock" recipe_instance = HelloWorldRecipe() overall_result = all([run.overall_result for run in recipe_instance.runs]) exit(not overall_result) |
I tried to reproduce this locally on Fedora 34 but I did not hit the issue. I did:
I will check on RHEL. |
@konguyen what version of podman do you use - |
podman --version |
[root@wsfd-netdev20 lnst]# poetry update Writing lock file Package operations: 0 installs, 9 updates, 0 removals • Updating pyroute2.core (0.6.9 -> 0.6.12) No dependencies to install or update Installing the current project: lnst (16.1.0) Package operations: 0 installs, 2 updates, 0 removals • Updating pyxdg (0.27 -> 0.28) Installing the current project: lnst (16.1.0) |
Thanks @konguyen, i found an issue. Here is how to configure podman4.0+ to use cni:
to The log from RH infra seems OK, you just need to run it using just Just note, please paste large blocks of tracebacks/code to ``` quotes for better formatting. |
so this sounds like we should maybe start thinking about migrating to the netavark/aardvark instead of CNI AND/OR we should include or link to the configuration steps you described in the docs? |
I just tested netavark real quick and it seems it also does not support multiple nics of containers connected to the same network. Maybe we can instead migrate to technology that supports that as you mentioned in #225 . |
I've added CNI configuration steps to #248 , so i think, we can close this issue |
Samuel - I just tried your steps but still hit the same issue. Do I need to copy the containers.conf into /etc/cni/net.d/? |
[root@wsfd-netdev20 lnst]# cat /etc/redhat-release
Red Hat Enterprise Linux release 8.6 (Ootpa)
[root@wsfd-netdev20 lnst]# uname -srm
Linux 4.18.0-372.9.1.el8.x86_64 x86_64
[root@wsfd-netdev20 lnst]# systemctl status podman.socket
● podman.socket - Podman API Socket
Loaded: loaded (/usr/lib/systemd/system/podman.socket; enabled; vendor preset: disabled)
Active: active (listening) since Tue 2022-05-24 10:46:42 EDT; 1 weeks 0 days ago
Docs: man:podman-system-service(1)
Listen: /run/podman/podman.sock (Stream)
Tasks: 0 (limit: 822526)
Memory: 0B
CGroup: /system.slice/podman.socket
May 24 10:46:42 wsfd-netdev20.ntdv.lab.eng.bos.redhat.com systemd[1]: Listening on Podman API Socket.
[root@wsfd-netdev20 lnst]# poetry run python3 runner.py
Loading config file '/root/.lnst/lnst-ctl.conf'
Loading config file '/root/lnst/lnst-ctl.conf'
2022-05-31 08:27:55 (localhost) - DEBUG: Connecting to Podman API
2022-05-31 08:27:55 (localhost) - DEBUG: Starting new HTTP connection (1): %2frun%2fpodman%2fpodman.sock:80
2022-05-31 08:27:55 (localhost) - DEBUG: http://%2frun%2fpodman%2fpodman.sock:80 "GET /v4.0.0/libpod/info HTTP/1.1" 200 None
2022-05-31 08:27:55 (localhost) - DEBUG: http://%2frun%2fpodman%2fpodman.sock:80 "GET /v4.0.0/libpod/images/lnst/exists HTTP/1.1" 204 0
2022-05-31 08:27:55 (localhost) - INFO: Creating container machine1
2022-05-31 08:27:55 (localhost) - DEBUG: http://%2frun%2fpodman%2fpodman.sock:80 "POST /v4.0.0/libpod/containers/create HTTP/1.1" 201 88
2022-05-31 08:27:55 (localhost) - DEBUG: http://%2frun%2fpodman%2fpodman.sock:80 "GET /v4.0.0/libpod/containers/9a858872fec0e22178e4d0cce2cc565bdda8687a8fcb509d1868410abc2c1549/json HTTP/1.1" 200 None
2022-05-31 08:27:55 (localhost) - DEBUG: Starting container sharp_pasteur
2022-05-31 08:27:55 (localhost) - DEBUG: http://%2frun%2fpodman%2fpodman.sock:80 "POST /v4.0.0/libpod/containers/9a858872fec0e22178e4d0cce2cc565bdda8687a8fcb509d1868410abc2c1549/start HTTP/1.1" 204 0
2022-05-31 08:27:55 (localhost) - DEBUG: http://%2frun%2fpodman%2fpodman.sock:80 "GET /v4.0.0/libpod/containers/9a858872fec0e22178e4d0cce2cc565bdda8687a8fcb509d1868410abc2c1549/json HTTP/1.1" 200 None
2022-05-31 08:27:55 (localhost) - DEBUG: http://%2frun%2fpodman%2fpodman.sock:80 "POST /v4.0.0/libpod/containers/9a858872fec0e22178e4d0cce2cc565bdda8687a8fcb509d1868410abc2c1549/wait?condition=running HTTP/1.1" 200 3
2022-05-31 08:27:55 (localhost) - DEBUG: Checking connection with machine 10.88.0.6
2022-05-31 08:27:55 (localhost) - DEBUG: Connecting to 10.88.0.6, retry counter: 0
2022-05-31 08:27:56 (localhost) - DEBUG: Connecting to 10.88.0.6, retry counter: 1
2022-05-31 08:27:57 (localhost) - DEBUG: Connecting to 10.88.0.6, retry counter: 2
2022-05-31 08:27:57 (localhost) - DEBUG: Connected to agent process at machine 10.88.0.6
2022-05-31 08:27:57 (localhost) - INFO: Agent process is running at 10.88.0.6
2022-05-31 08:27:57 (localhost) - DEBUG: Connecting sharp_pasteur to net1
2022-05-31 08:27:57 (localhost) - INFO: Creating network lnst_container_net_net1
2022-05-31 08:27:57 (localhost) - DEBUG: http://%2frun%2fpodman%2fpodman.sock:80 "GET /v4.0.0/libpod/networks/lnst_container_net_net1 HTTP/1.1" 404 75
Traceback (most recent call last):
File "/root/lnst/lnst/Controller/ContainerPoolManager.py", line 227, in _create_network
network = self._podman_client.networks.get(name)
File "/root/.cache/pypoetry/virtualenvs/lnst-MdZhQDa5-py3.9/lib/python3.9/site-packages/podman/domain/networks_manager.py", line 114, in get
response.raise_for_status()
File "/root/.cache/pypoetry/virtualenvs/lnst-MdZhQDa5-py3.9/lib/python3.9/site-packages/podman/api/client.py", line 64, in raise_for_status
raise not_found(cause, response=self._response, explanation=message)
podman.errors.exceptions.NotFound: 404 Client Error: Not Found (network not found)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/lnst/runner.py", line 34, in
ctl.run(recipe_instance)
File "/root/lnst/lnst/Controller/Controller.py", line 162, in run
for match in self._mapper.matches(**kwargs):
File "/root/lnst/lnst/Controller/MachineMapper.py", line 377, in matches
self._pool_manager.process_reqs(self._mreqs)
File "/root/lnst/lnst/Controller/ContainerPoolManager.py", line 290, in process_reqs
self._connect_to_networks(container, m_reqs)
File "/root/lnst/lnst/Controller/ContainerPoolManager.py", line 280, in _connect_to_networks
network = self._create_network(name)
File "/root/lnst/lnst/Controller/ContainerPoolManager.py", line 229, in _create_network
raise PoolManagerError(f"Could not create network {name}: {e}")
lnst.Controller.AgentPoolManager.PoolManagerError: Could not create network lnst_container_net_net1: 404 Client Error: Not Found (network not found)
The text was updated successfully, but these errors were encountered: