#125 Mirrors are weird — some are missing defaults
Closed: Fixed 5 months ago by asamalik. Opened 5 months ago by asamalik.

We've just discovered an interesting issue with @puiterwijk — there are probably inconsistencies in mirrors where some of them don't include defaults.

Running dnf module install nodejs:10 for me worked OK and installed the default profile, but for @puiterwijk it only enabled the module because the mirror he was consuming didn't have the defaults.

We should probably look into that.


Hmm, that's very odd. That should not be possible. It's not like the defaults are stored in a separate location from the rest of the metadata.

So, background information:
The difference is that on my system (both my laptop itself and a Docker container), this happens:

Pulling image fedora:latest ...
Step 1/5 : FROM fedora:latest
 ---> 26ffec5b4a8a
Step 2/5 : RUN dnf -y module install nodejs:10 && dnf clean all
 ---> Running in 42a53a248d72

Fedora Modular 29 - x86_64                      291 kB/s | 1.5 MB     00:05    
Fedora Modular 29 - x86_64 - Updates            161 kB/s | 2.0 MB     00:12    
Fedora 29 - x86_64 - Updates                    3.1 MB/s |  22 MB     00:07    
Fedora 29 - x86_64                              3.5 MB/s |  62 MB     00:17    
No default profiles for module nodejs:10
Dependencies resolved.
================================================================================
 Package           Arch             Version             Repository         Size
================================================================================
Enabling module streams:
 nodejs                             10                                         

Transaction Summary
================================================================================

Complete!
33 files removed
 ---> 1a641b14ac8e

Note that it did not select the default profile, and did not in fact install any packages.

@asamalik got hte following:

Step 1/6 : FROM fedora:29
 ---> 24508ec0e667
Step 2/6 : RUN dnf -y module install nodejs:10 &&     dnf -y install git &&     dnf clean all
 ---> Running in 105ae66241be
Fedora Modular 29 - x86_64                      920 kB/s | 1.5 MB     00:01    
Fedora Modular 29 - x86_64 - Updates            1.3 MB/s | 2.0 MB     00:01    
Fedora Modular 29 - x86_64 - Test Updates       995 kB/s | 2.0 MB     00:02    
Fedora 29 - x86_64 - Test Updates               3.9 MB/s | 9.4 MB     00:02    
Fedora 29 - x86_64 - Updates                    5.4 MB/s |  22 MB     00:04    
Fedora 29 - x86_64                              6.2 MB/s |  62 MB     00:10    
Last metadata expiration check: 0:00:00 ago on Thu Feb 14 09:51:33 2019.
Dependencies resolved.
================================================================================
 Package     Arch   Version                               Repository       Size
================================================================================
Upgrading:
 libnghttp2  x86_64 1.35.1-1.module_2672+97d6a5e9         updates-modular  70 k
Installing group packages:
 nodejs      x86_64 1:10.14.1-1.module_2533+7361f245      updates-modular 6.3 M
 npm         x86_64 1:6.4.1-1.10.14.1.1.module_2533+7361f245
                                                          updates-modular 3.6 M
Installing dependencies:
 http-parser x86_64 2.9.0-1.module_2672+97d6a5e9          updates-modular  35 k
 libuv       x86_64 1:1.23.2-1.module_2302+4c6ccf2f       updates-modular 123 k
 libicu      x86_64 62.1-3.fc29                           updates         8.8 M
Installing module profiles:
 nodejs/default

Enabling module streams:
 nodejs             10                                                         

Transaction Summary
================================================================================
Install  5 Packages
Upgrade  1 Package

Total download size: 19 M
Downloading Packages:
(1/6): http-parser-2.9.0-1.module_2672+97d6a5e9 224 kB/s |  35 kB     00:00    
(2/6): libuv-1.23.2-1.module_2302+4c6ccf2f.x86_ 640 kB/s | 123 kB     00:00    
(3/6): npm-6.4.1-1.10.14.1.1.module_2533+7361f2 3.5 MB/s | 3.6 MB     00:01    
(4/6): libnghttp2-1.35.1-1.module_2672+97d6a5e9 1.6 MB/s |  70 kB     00:00    
(5/6): nodejs-10.14.1-1.module_2533+7361f245.x8 2.2 MB/s | 6.3 MB     00:02    
(6/6): libicu-62.1-3.fc29.x86_64.rpm            3.2 MB/s | 8.8 MB     00:02    
--------------------------------------------------------------------------------
Total                                           3.5 MB/s |  19 MB     00:05     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Running scriptlet: npm-1:6.4.1-1.10.14.1.1.module_2533+7361f245.x86_64    1/1 
  Preparing        :                                                        1/1 
  Upgrading        : libnghttp2-1.35.1-1.module_2672+97d6a5e9.x86_64        1/7 
  Installing       : libicu-62.1-3.fc29.x86_64                              2/7 
  Running scriptlet: libicu-62.1-3.fc29.x86_64                              2/7 
  Installing       : libuv-1:1.23.2-1.module_2302+4c6ccf2f.x86_64           3/7 
  Installing       : http-parser-2.9.0-1.module_2672+97d6a5e9.x86_64        4/7 
  Installing       : npm-1:6.4.1-1.10.14.1.1.module_2533+7361f245.x86_64    5/7 
  Installing       : nodejs-1:10.14.1-1.module_2533+7361f245.x86_64         6/7 
  Cleanup          : libnghttp2-1.32.1-1.fc29.x86_64                        7/7 
  Running scriptlet: libnghttp2-1.32.1-1.fc29.x86_64                        7/7 
  Verifying        : http-parser-2.9.0-1.module_2672+97d6a5e9.x86_64        1/7 
  Verifying        : libuv-1:1.23.2-1.module_2302+4c6ccf2f.x86_64           2/7 
  Verifying        : nodejs-1:10.14.1-1.module_2533+7361f245.x86_64         3/7 
  Verifying        : npm-1:6.4.1-1.10.14.1.1.module_2533+7361f245.x86_64    4/7 
  Verifying        : libicu-62.1-3.fc29.x86_64                              5/7 
  Verifying        : libnghttp2-1.35.1-1.module_2672+97d6a5e9.x86_64        6/7 
  Verifying        : libnghttp2-1.32.1-1.fc29.x86_64                        7/7 

Upgraded:
  libnghttp2-1.35.1-1.module_2672+97d6a5e9.x86_64                               

Installed:
  nodejs-1:10.14.1-1.module_2533+7361f245.x86_64                                
  npm-1:6.4.1-1.10.14.1.1.module_2533+7361f245.x86_64                           
  http-parser-2.9.0-1.module_2672+97d6a5e9.x86_64                               
  libuv-1:1.23.2-1.module_2302+4c6ccf2f.x86_64                                  
  libicu-62.1-3.fc29.x86_64                                                     

Complete!

I can reproduce it by running: docker run fedora:latest dnf module install nodejs:10, that will only enable the module stream, not the profile.

Per request of Stephen, here my DNF versions (image sha256:7b921a4a008ee83c06d2cde9f21d3aa8de4635b0c4ec159f31caee83ad220b21, pulled earlier today):

$ docker run fedora:latest rpm -qa | grep dnf
python3-libdnf-0.22.3-1.fc29.x86_64
dnf-4.0.9-2.fc29.noarch
dnf-yum-4.0.9-2.fc29.noarch
dnf-data-4.0.9-2.fc29.noarch
libdnf-0.22.3-1.fc29.x86_64
python3-dnf-4.0.9-2.fc29.noarch

I can also reproduce this with updated container images. @asamalik I suspect the only reason you're getting different results is that your container image is likely cached with an older DNF without this regression.

Can you provide us with the output of:

docker run fedora:latest rpm -qa | grep dnf

After asking @asamalik to update his image to the January 2019 one, he hits the same bug.

This is also hitting Fedora 30:

[puiterwijk@foreshadow ~]$ docker run fedora:30 dnf module install nodejs:10
Fedora - Modular Rawhide - Developmental packag 536 kB/s | 2.2 MB     00:04    
Fedora - Rawhide - Developmental packages for t 8.7 MB/s |  61 MB     00:06    
Last metadata expiration check: 0:00:01 ago on Thu Feb 14 13:51:49 2019.
No default profiles for module nodejs:10
Dependencies resolved.
================================================================================
 Package           Arch             Version             Repository         Size
================================================================================
Enabling module streams:
 nodejs                             10                                         

Transaction Summary
================================================================================

Is this ok [y/N]: Operation aborted.

OK, so upon further investigation, it turns out there's no bug in DNF here. The problem is that the nodejs defaults settings happen to be missing the nodejs:10 stream, so naturally there's nothing to install.

The reason that @asamalik's old DNF worked is because we used to allow a fallback to installing a profile called, literally, 'default' if it existed in the module definition and no default was specified by the fedora-module-defaults. This was dropped a while back because it was deeply confusing for users and packagers in favor of only using the explicitly-set ones.

I then forgot to update the default profiles for nodejs once the 10 stream came out. I'll fix that immediately.

@sgallagh @puiterwijk nice! Thanks a lot for looking into that so quickly. I just tried and everything works as it should.

Metadata Update from @asamalik:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

5 months ago

Login to comment on this ticket.

Metadata