fedora-cloud / docker-brew-fedora

MIT License
176 stars 46 forks source link

Dnf does not work in Fedora 35 Docker container #97

Closed gotmax23 closed 3 years ago

gotmax23 commented 3 years ago

I reported an issue on Bugzilla about the registry.fedoraproject.org/fedora:35 image. However, I'm not sure if I selected the correct component on Bugzilla and Docker Hub said to file an issue here, so that's what I'm doing. Here is a link to the Bugzilla issue for reference.


Description of problem: I am attempting to build containers based on registry.fedoraproject.org/fedora:35 for both Amd64 and Arm64 using Docker Buildx on Github Actions. Until recently, it was working fine, but now dnf is not able to load repo metadata and it is impossible to install any package.

Here is a link to the build logs from Github Actions. It looks like it stopped working sometime between last Sunday (Jul 25) and last Monday (Jul 26).

Version-Release number of selected component (if applicable): N/A

How reproducible: This issue is reproducible when running the container image using Docker itself or Docker Buildx (both on my local Fedora 33 machine and Github Actions' Ubuntu 20.04 runner), but not Podman.

Steps to Reproduce:

  1. docker run --name f35 -ti registry.fedoraproject.org/fedora:35 bash
  2. Attempt to use dnf to install a package.
  3. dnf makecache fails.

Actual results:

Here is the output of dnf makecache:

[root@8e039f41d4d7 /]# dnf makecache
Fedora rawhide openh264 (From Cisco) - x86_64                                                                                                                                                                0.0  B/s |   0  B     00:00    
Errors during downloading metadata for repository 'fedora-cisco-openh264':
  - Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-rawhide&arch=x86_64 [getaddrinfo() thread failed to start]
Error: Failed to download metadata for repo 'fedora-cisco-openh264': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-rawhide&arch=x86_64 [getaddrinfo() thread failed to start]
Fedora - Rawhide - Developmental packages for the next Fedora release                                                                                                                                        0.0  B/s |   0  B     00:00    
Errors during downloading metadata for repository 'rawhide':
  - Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=rawhide&arch=x86_64 [getaddrinfo() thread failed to start]
Error: Failed to download metadata for repo 'rawhide': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=rawhide&arch=x86_64 [getaddrinfo() thread failed to start]

Expected results: For dnf to properly download the repository metadata and work as expected.

cverna commented 3 years ago

Can you give it another go ? I just tried this morning and it seems to work

 [cverna@localhost]  $ podman pull fedora:rawhide
Trying to pull registry.fedoraproject.org/fedora:rawhide...
Getting image source signatures
Copying blob f584e5fb1c17 done  
Copying config 3c159d48f2 done  
Writing manifest to image destination
Storing signatures
3c159d48f2a46b3809ccce33294f20f9f01c899d041cd6758e06e120bce5b02a
~
 [cverna@localhost]  $ podman run -it --rm fedora:rawhide
[root@0a20b3b349c7 /]# dnf update
Fedora rawhide openh264 (From Cisco) - x86_64                                                                                                                                                                                 1.6 kB/s | 2.5 kB     00:01    
Fedora - Rawhide - Developmental packages for the next Fedora release                                                                                                                                                         7.9 MB/s |  61 MB     00:07    
Fedora - Modular Rawhide - Developmental packages for the next Fedora release                                                                                                                                                 1.5 MB/s | 2.6 MB     00:01    
Last metadata expiration check: 0:00:01 ago on Fri Aug  6 06:53:17 2021.
Dependencies resolved.
Nothing to do.
Complete!
[root@0a20b3b349c7 /]# dnf install htop
Last metadata expiration check: 0:00:11 ago on Fri Aug  6 06:53:17 2021.
Dependencies resolved.
==============================================================================================================================================================================================================================================================
 Package                                                   Architecture                                                Version                                                             Repository                                                    Size
==============================================================================================================================================================================================================================================================
Installing:
 htop                                                      x86_64                                                      3.0.5-5.fc35                                                        rawhide                                                      150 k

Transaction Summary
==============================================================================================================================================================================================================================================================
Install  1 Package

Total download size: 150 k
Installed size: 353 k
Is this ok [y/N]: y
Downloading Packages:
htop-3.0.5-5.fc35.x86_64.rpm                                                                                                                                                                                                  288 kB/s | 150 kB     00:00    
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                                         235 kB/s | 150 kB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                                                                      1/1 
  Installing       : htop-3.0.5-5.fc35.x86_64                                                                                                                                                                                                             1/1 
  Running scriptlet: htop-3.0.5-5.fc35.x86_64                                                                                                                                                                                                             1/1 
  Verifying        : htop-3.0.5-5.fc35.x86_64                                                                                                                                                                                                             1/1 

Installed:
  htop-3.0.5-5.fc35.x86_64                                                                                                                                                                                                                                    

Complete!
[root@0a20b3b349c7 /]# dnf makecache
Fedora rawhide openh264 (From Cisco) - x86_64                                                                                                                                                                                 1.8 kB/s | 989  B     00:00    
Fedora - Rawhide - Developmental packages for the next Fedora release                                                                                                                                                          30 kB/s |  16 kB     00:00    
Fedora - Modular Rawhide - Developmental packages for the next Fedora release                                                                                                                                                  32 kB/s |  20 kB     00:00    
Metadata cache created.
[root@0a20b3b349c7 /]# 
gotmax23 commented 3 years ago

Hi Clement,

How reproducible: This issue is reproducible when running the container image using Docker itself or Docker Buildx (both on my local Fedora 33 machine and Github Actions' Ubuntu 20.04 runner), but not Podman.

It always worked fine with Podman. For some reaaon, this issue only occurs when using Docker.

Thanks, Maxwell

gotmax23 commented 3 years ago

@cverna,

Should continue this thread at the aforementionied Bugzilla ticket? A couple people already CC'd themselves on it. A couple minutes ago, I added a link to this issue on the Bugzilla ticket. I also marked that ticket as urgent because it makes the Fedora 35 container image completely unusable on Docker.

Thanks, Maxwell

cverna commented 3 years ago

Closing in favor of the bugzilla