Bug 1629544 - dnf module list --installed claims wrong package
Summary: dnf module list --installed claims wrong package
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf   
(Show other bugs)
Version: 29
Hardware: Unspecified Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jaroslav Mracek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords: Reopened, Triaged
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-09-17 04:34 UTC by lnie
Modified: 2018-10-02 08:20 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-09-18 14:55:43 UTC
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
journal (158.20 KB, text/plain)
2018-09-17 04:34 UTC, lnie
no flags Details

Description lnie 2018-09-17 04:34:05 UTC
Created attachment 1483856 [details]
journal

Description of problem:
As shown in the following,dnf module list --installed will claim mongodb:3.6,but not mongodb:3.4,is installed even though I just dnf module enable it

[root@localhost ~]# dnf module list --installed
Last metadata expiration check: 1:30:19 ago on Mon 17 Sep 2018 10:41:37 AM CST.
Fedora Modular 29 - x86_64
Name                                                           Stream                                                         Profiles                                                                             
mongodb                                                        3.4 [e]                                                        client, default[i], server, ...                                                      

Hint: [d]efault, [e]nabled, [i]nstalled
[root@localhost ~]# dnf module enable mongodb:3.6
Last metadata expiration check: 1:30:41 ago on Mon 17 Sep 2018 10:41:37 AM CST.
===================================================================================================================================================================================================================
 Package                                            Arch                                              Version                                             Repository                                          Size
===================================================================================================================================================================================================================
Switching module streams:
 mongodb                                                                                              3.4 -> 3.6                                                                                                  

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

Is this ok [y/N]: y

To switch to the new streams' RPMs, run 'dnf distro-sync'. 
Then migrate configuration files and data as necessary.
[root@localhost ~]# dnf module list --installed
Last metadata expiration check: 1:30:50 ago on Mon 17 Sep 2018 10:41:37 AM CST.
Fedora Modular 29 - x86_64
Name                                                           Stream                                                         Profiles                                                                             
mongodb                                                        3.6 [e]                                                        client, default[i], server, ...                                                      

Hint: [d]efault, [e]nabled, [i]nstalled
[root@localhost ~]#  dnf module install mongodb:3.6
Last metadata expiration check: 1:31:18 ago on Mon 17 Sep 2018 10:41:37 AM CST.
Dependencies resolved.
===================================================================================================================================================================================================================
 Package                                          Arch                                     Version                                                          Repository                                        Size
===================================================================================================================================================================================================================
Upgrading:
 mongodb                                          x86_64                                   3.6.4-2.module_1831+e8c1cdcd                                     fedora-modular                                    26 M
 mongodb-server                                   x86_64                                   3.6.4-2.module_1831+e8c1cdcd                                     fedora-modular                                    22 M

Transaction Summary
===================================================================================================================================================================================================================
Upgrade  2 Packages

Total download size: 48 M
Is this ok [y/N]: N
Operation aborted.


Version-Release number of selected component (if applicable):
dnf-3.2.0-2.fc29.noarch
kernel-4.18.5-300.fc29.x86_64


How reproducible:
always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Jaroslav Mracek 2018-09-18 14:55:43 UTC
I believe that problem was solved in dnf-3.5.1. Please if the bug is still reproducible, please don't hesitate to reopen the bug.

Comment 2 lnie 2018-09-20 08:43:35 UTC
Here is the output of the fresh installed system with Fedora-Workstation-Live-x86_64-29_Beta-1.4.iso.

[root@localhost-live lnie]# dnf module list --installed
Last metadata expiration check: 0:04:11 ago on Thu 20 Sep 2018 04:26:49 PM CST.
Fedora Modular 29 - x86_64
Name                  Stream                Profiles                                 Summary                    mongodb               3.4 [e]               client, server, default [i]              MongoDB Module             

Hint: [d]efault, [e]nabled, [i]nstalled
[root@localhost-live lnie]# dnf module enable mongodb:3.6
Last metadata expiration check: 0:14:12 ago on Thu 20 Sep 2018 04:26:49 PM CST.
Dependencies resolved.
================================================================================================================
 Package                   Arch                     Version                     Repository                 Size
================================================================================================================
Switching module streams:
 mongodb                                            3.4 -> 3.6                                                 

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

Is this ok [y/N]: y
Complete!

To switch to the new streams' RPMs, run 'dnf distro-sync'. 
Then migrate configuration files and data as necessary.
[root@localhost-live lnie]# dnf module list --installed
Last metadata expiration check: 0:14:18 ago on Thu 20 Sep 2018 04:26:49 PM CST.
Fedora Modular 29 - x86_64
Name                  Stream                Profiles                                 Summary                    mongodb               3.6 [e]               client, server, default [i]              MongoDB Module             

Hint: [d]efault, [e]nabled, [i]nstalled

[root@localhost-live lnie]# rpm -q dnf
dnf-3.5.1-1.fc29.noarch

Comment 3 Jaroslav Mracek 2018-09-20 08:54:50 UTC
Please can you specify expected behavior. I only guess that you expect that after switching streams installed profiles should be:
a) deleted
b) packages removed and profiles deleted
c) ...

Comment 4 lnie 2018-09-20 09:24:51 UTC
dnf module list --installed is supposed to list modules that are installed on the system,right? mongodb:3.6 is not installed after you only run"dnf module enable mongodb:3.6",so the output should still list 3.4 but not 3.6.

Comment 5 Jaroslav Mracek 2018-10-01 15:54:19 UTC
The solution would be to store not only installed profiles, but also stream, and package names that were part of the profile at the time of installation.

Comment 6 Jaroslav Mracek 2018-10-02 08:20:00 UTC
Unfortunately the change has to be approve first, because it requires change in modular configuration file.


Note You need to log in before you can comment on or make changes to this bug.