Bug 2081834

Summary: networking is broken when building containers due to missing container networking package dependencies
Product: [Fedora] Fedora Reporter: Neal Gompa <ngompa13>
Component: buildahAssignee: Lokesh Mandvekar <lsm5>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: medium    
Version: rawhideCC: amurdaca, daltonminer, davdunc, davide, davidmccheyne, debarshir, dwalsh, fedora, jnovy, lsm5, michel, nalin, pehunt, rh.container.bot, santiago, tsweeney
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: buildah-1.26.0-2.fc36 buildah-1.23.4-1.fc35 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2081835 (view as bug list) Environment:
Last Closed: 2022-05-12 20:25:12 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 Neal Gompa 2022-05-04 18:57:04 UTC
Description of problem:
Building containers with buildah does not work because it chokes on missing container networking dependencies that exist with podman. That is, if you *just* install buildah and never install podman, buildah will not work because it cannot correctly set up networking.

This is because the package is missing the following dependencies that podman has:

Suggests: containernetworking-plugins >= 0.9.1-1
Requires: netavark
Requires: iptables
Requires: nftables


Version-Release number of selected component (if applicable):
1.25.1-1.fc37

How reproducible:
Always

Steps to Reproduce:
1. Install *only* buildah
2. Use "buildah bud" with containerfiles from https://pagure.io/nginx-vts-container

Actual results:
[root@097500dd2fd6 nginx-vts-container]# buildah bud -t nginx-vts-fedora -f Containerfile.fedora 
STEP 1/9: FROM registry.fedoraproject.org/fedora:latest
Trying to pull registry.fedoraproject.org/fedora:latest...
Getting image source signatures
Copying blob 9c6cc3463716 done  
Copying config 750037c05c done  
Writing manifest to image destination
Storing signatures
STEP 2/9: RUN dnf -y install nginx nginx-mod-vts     && dnf clean all
WARN[0006] Failed to load cached network config: network podman not found in CNI cache, falling back to loading network podman from disk 
WARN[0006] 1 error occurred:
	* plugin type="tuning" failed (delete): failed to find plugin "tuning" in path [/usr/local/libexec/cni /usr/libexec/cni /usr/local/lib/cni /usr/lib/cni /opt/cni/bin]
 
error building at STEP "RUN dnf -y install nginx nginx-mod-vts     && dnf clean all": plugin type="bridge" failed (add): failed to find plugin "bridge" in path [/usr/local/libexec/cni /usr/libexec/cni /usr/local/lib/cni /usr/lib/cni /opt/cni/bin]
[root@097500dd2fd6 nginx-vts-container]# WARN[0000] pkg/bind: error detaching "/var/tmp/buildah231551455/mnt/buildah-bind-target-3": no such file or directory 
WARN[0000] pkg/bind: error removing "/var/tmp/buildah231551455/mnt/buildah-bind-target-3": no such file or directory 
WARN[0000] pkg/bind: error detaching "/var/tmp/buildah231551455/mnt/rootfs": no such file or directory 
WARN[0000] pkg/bind: error removing "/var/tmp/buildah231551455/mnt/rootfs": no such file or directory 
WARN[0000] pkg/bind: error detaching "/var/tmp/buildah231551455/mnt": no such file or directory 
WARN[0000] pkg/bind: error removing "/var/tmp/buildah231551455/mnt": no such file or directory 
ERRO[0000] no such file or directory                    
error running container: did not get container start message from parent: EOF

Expected results:
Successful build of an image.

Additional info:
This also affects RHEL, since those packages are similarly configured.

Comment 1 Neal Gompa 2022-05-04 19:19:15 UTC
PR proposed: https://src.fedoraproject.org/rpms/buildah/pull-request/17

Comment 2 Fedora Update System 2022-05-04 20:00:17 UTC
FEDORA-2022-5d9b5060a8 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-5d9b5060a8

Comment 3 Fedora Update System 2022-05-04 20:57:03 UTC
FEDORA-2022-0a0d3df27e has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-0a0d3df27e

Comment 4 Debarshi Ray 2022-05-04 21:14:56 UTC
(In reply to Neal Gompa from comment #0)
>
> This is because the package is missing the following dependencies that
> podman has:
> 
> Suggests: containernetworking-plugins >= 0.9.1-1

Note that Podman itself also needs containernetworking-plugins to keep running older containers.  I had suggested adding this dependency to the podman RPM but that didn't get traction:
  https://github.com/fedora-silverblue/issue-tracker/issues/246

Comment 5 Fedora Update System 2022-05-05 05:34:25 UTC
FEDORA-2022-5d9b5060a8 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-5d9b5060a8`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-5d9b5060a8

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2022-05-05 06:43:22 UTC
FEDORA-2022-0a0d3df27e has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-0a0d3df27e`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-0a0d3df27e

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2022-05-12 20:25:12 UTC
FEDORA-2022-5d9b5060a8 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 8 Fedora Update System 2022-06-03 04:20:25 UTC
FEDORA-2022-396c568c5e has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-396c568c5e`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-396c568c5e

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2022-06-11 01:42:11 UTC
FEDORA-2022-396c568c5e has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.