Bug 1998676

Summary: Network namespacing stopping containers from starting
Product: Red Hat Enterprise Linux 9 Reporter: Mike Rochefort <mroche>
Component: podmanAssignee: Jindrich Novy <jnovy>
Status: CLOSED ERRATA QA Contact: Joy Pu <ypu>
Severity: medium Docs Contact:
Priority: unspecified    
Version: CentOS StreamCC: bbaude, bstinson, dwalsh, jligon, jnovy, jwboyer, lsm5, mharri, mheon, pholzing, pthomas, tsweeney, umohnani, ypu
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: podman-4.2.0-3.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-09 07:41:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mike Rochefort 2021-08-27 23:20:23 UTC
Latest bundling of podman|podman-catatonit is breaking the ability to run containers.

Small set of info here: https://gitlab.com/-/snippets/2166903

I have all other updates applied to this Stream 9 system, these are the only two packages not updated.

Latest version:
20210825.0 then 20210827.0 compose (shares the same package versions here):
3.3.0-1.module_el9+106+4f4d4bc7

Last functioning version (20210823.1):
podman-catatonit-3.3.0-0.19.module_el9+98+b21e7d79.x86_64
podman-3.3.0-0.19.module_el9+98+b21e7d79.x86_64

Starting/restarting services calling podman result in the following:
$ podman run --name znc-bouncer -v /opt/znc-config/_data:/znc-data:Z -p 7777:6697 docker.io/library/znc:1.8
ERRO[0000] error loading cached network config: network "podman" not found in CNI cache 
WARN[0000] falling back to loading from existing plugins on disk 
ERRO[0000] Error tearing down partially created network namespace for container ae7608946788fdd06c9807e141cb4187b1b9dd893be67f8431f6cccdbddd8ba4: CNI network "podman" not found 
Error: error configuring network namespace for container ae7608946788fdd06c9807e141cb4187b1b9dd893be67f8431f6cccdbddd8ba4: CNI network "podman" not found

Expected result:
The service stops the container, destroys its resources, and spins it back up cleanly.

If there's any further information I can provide, please let me know!

Comment 1 Paul Holzinger 2021-08-30 15:42:54 UTC
Can you run `sudo rm /var/lib/containers/storage/libpod/defaultCNINetExists`, this should fix it for now.

Comment 2 Mike Rochefort 2021-08-30 21:20:37 UTC
That did the trick for now!

Comment 6 Paul Holzinger 2022-09-05 12:20:11 UTC
This was part of the big network rewrite with 4.0, there is no specific PR which fixed it rather the new design which stores the file in memory now so we no longer have to use the defaultCNINetExists hack.

Comment 7 Jindrich Novy 2022-09-05 13:03:13 UTC
Thanks.

Comment 8 Joy Pu 2022-11-10 13:28:32 UTC
Install a host with podman-3.3.0-0.6.el9.x86_64.rpm. and start a container:
# podman run -d quay.io/libpod/busybox top
0756e9ea68c877f77172fac459603d1d0c83ac9b446648cce8dd1555c3f514be

Can reproduce it with podman-3.3.0-1.module+el9beta+12321+73f3d895.x86_64.rpm:
Update the podman version to podman-3.3.0-1. And reboot the host. Then try to restart the container:
# podman start 0756e9ea68c8
ERRO[0000] error loading cached network config: network "podman" not found in CNI cache 
WARN[0000] falling back to loading from existing plugins on disk 
ERRO[0000] Error tearing down partially created network namespace for container 0756e9ea68c877f77172fac459603d1d0c83ac9b446648cce8dd1555c3f514be: CNI network "podman" not found 
Error: unable to start container "0756e9ea68c877f77172fac459603d1d0c83ac9b446648cce8dd1555c3f514be": error configuring network namespace for container 0756e9ea68c877f77172fac459603d1d0c83ac9b446648cce8dd1555c3f514be: CNI network "podman" not found

Then update the podman to podman-4.2.0-3.el9.x86_64.rpm:
Reboot the host again and try to start the container again, it works as expected:
# podman start 0756e9ea68c8
0756e9ea68c8

So mark this as Tested.

Comment 12 Joy Pu 2022-12-05 09:58:35 UTC
Test with podman-2:4.3.1-3.el9.x86_64 and it works with a host that installed and updated from podman-3.3.0-0.6.el9.x86_64.rpm. So move this to verified:
# podman ps -a
CONTAINER ID  IMAGE                          COMMAND     CREATED         STATUS                      PORTS       NAMES
a63b56de2c43  quay.io/libpod/busybox:latest  top         26 minutes ago  Exited (143) 3 minutes ago              vigilant_goldstine
# podman start a63b56de2c43
a63b56de2c43

Comment 14 errata-xmlrpc 2023-05-09 07:41:58 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: podman security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:2282