Bug 1480467 - (dnf-modularity) how list --installed shows installed modules
(dnf-modularity) how list --installed shows installed modules
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
26
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Martin Hatina
Fedora Extras Quality Assurance
:
Depends On:
Blocks: dnf-modularity
  Show dependency treegraph
 
Reported: 2017-08-11 04:23 EDT by Irina Gulina
Modified: 2017-08-16 02:15 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-16 02:15:36 EDT
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)
logs list installed pkgs (34.56 KB, text/plain)
2017-08-11 04:23 EDT, Irina Gulina
no flags Details
ansible 25 pkgs install, reinstall installed pkg, no that pkg in --installed (39.95 KB, text/plain)
2017-08-14 05:35 EDT, Irina Gulina
no flags Details

  None (edit)
Description Irina Gulina 2017-08-11 04:23:57 EDT
Created attachment 1311996 [details]
logs list installed pkgs

Description of problem:

1) dnf module list --installed shows only 2 modules, however I have 18 of them installed
2) dnf list --installed also shows only 2 modules installed in the end of its output under MODULES section, it seems others are under INSTALLED PACKAGES

See attached logs and:

>> cat /etc/dnf/modules.d/httpd.module"
[httpd]
name = httpd
stream = f26
version = 20170717182804
profiles = default
enabled = 1
locked = 

>> cat /etc/dnf/modules.d/systemtools.module"
[systemtools]
name = systemtools
stream = f26
version = 20170714152023
profiles = default
enabled = 1
locked = 

Version-Release number of selected component (if applicable):
latest boltron compose 07-17
dnf-2.6.0-3.git.40.c0f7fc6.module_a7788b02.noarch

How reproducible:
always
Comment 1 Martin Hatina 2017-08-14 02:27:10 EDT
Can you provide commands you installed profiles with, please?
Comment 2 Irina Gulina 2017-08-14 04:17:19 EDT
I didn't specify any profiles, just:

`dnf module install [module_name]`

Ansible playbook reported 18 modules were installed. 7 failed. And just 2 shown with list --installed as comment #0 says.
Comment 3 Martin Hatina 2017-08-14 04:45:53 EDT
How many `dnf module install` commands have you run? According to '/etc/dnf/modules.d/*.module' you have only 2 profiles installed from 2 modules.
Comment 4 Irina Gulina 2017-08-14 05:35 EDT
Created attachment 1313006 [details]
ansible 25 pkgs install, reinstall installed pkg, no that pkg in --installed
Comment 5 Irina Gulina 2017-08-14 05:42:10 EDT
All Boltron modules, 25 of them, are installed in Ansible loop [1]. 
See the attachment in the comment #4. Ansible reports that mariadb was installed. See in the end of that attachment, I tried to install mariadb again. Dnf says 2 mariadb pkgs are installed, there is nth to install, when I query --installed modules, only 2 are shown. 

I'm not the only one who says there is such an issue. Adam put it into Known Issues, though never reported it elsewhere [2]

[1] https://github.com/alexxa/compose_tester/blob/master/tests/modules_install.yaml#L8
[2] https://docs.pagure.org/modularity/prototype/boltron/issues.html
Comment 6 Irina Gulina 2017-08-14 05:43:09 EDT
*only 2 are shown, no mariadb among them.
Comment 7 Irina Gulina 2017-08-14 05:48:57 EDT
Another example: nodejs installed, but not listed by --installed: 

>> [vagrant@fvagrant ~]$ docker exec boltron_container bash -l -c "dnf module install nodejs"
Last metadata expiration check: 0:19:45 ago on Mon Aug 14 09:26:39 2017.
Package npm-1:3.10.10-1.6.10.3.2.module_9c237b2a.x86_64 is already installed, skipping.
Package nodejs-1:6.10.3-2.module_9c237b2a.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!
[>> vagrant@fvagrant ~]$ docker exec boltron_container bash -l -c "dnf module list --installed | grep nodejs"
>> [vagrant@fvagrant ~]$ docker exec boltron_container bash -l -c "dnf module list --installed " 
Last metadata expiration check: 0:20:26 ago on Mon Aug 14 09:26:39 2017.
Name        Stream Version        Repo           Installed                                                                Info
httpd       f26    20170717182804 fedora-modular default                                                       httpd webserver
systemtools f26    20170714152023 fedora-modular default   Provides the tools a general Linux user expects on the command line
Comment 8 Martin Hatina 2017-08-16 02:15:36 EDT
Looks like it is connected with https://bugzilla.redhat.com/show_bug.cgi?id=1475375. Module profiles are installed, but dnf backtraced before writing it to conf. Due to this it has no information about all installed profiles. Closing.

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