RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1730162 - "dnf module reset" will clear the "install" information
Summary: "dnf module reset" will clear the "install" information
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: dnf
Version: ---
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: 8.0
Assignee: Pavla Kratochvilova
QA Contact: Eva Mrakova
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-16 03:01 UTC by yalzhang@redhat.com
Modified: 2021-02-16 13:49 UTC (History)
3 users (show)

Fixed In Version: dnf-4.2.11-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-28 16:48:04 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:1823 0 None None None 2020-04-28 16:49:03 UTC

Description yalzhang@redhat.com 2019-07-16 03:01:09 UTC
Description of problem:
 "dnf module reset" will clear the "install" information

Version-Release number of selected component (if applicable):
# rpm -q dnf rpm
dnf-4.0.9.2-5.el8.noarch
rpm-4.14.2-9.el8.x86_64

How reproducible:
100%

Steps to Reproduce:
1. 
# dnf module list virt
...
800_app
Name                           Stream                                Profiles                                 Summary                                        
virt                           rhel [d][e]                           common [d] [i]                           Virtualization module                          

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

2. 
# dnf module reset virt
...
Dependencies resolved.
========================================================================================================================
 Package                              Arch                                Version                                 Repository                            Size
========================================================================================================================
Removing module profiles:
 virt/common                                                                                                                                                
Resetting module streams:
 virt                                                                     rhel                                                                              

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

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

# dnf module list virt
...
800_app
Name                             Stream                               Profiles                               Summary                                         
virt                             rhel [d]                             common [d]                             Virtualization module                           

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

3.
# dnf module remove virt
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Last metadata expiration check: 0:06:28 ago on Tue 16 Jul 2019 02:29:44 AM EDT.
Unable to match profile in argument virt
Dependencies resolved.
Nothing to do.
Complete!

# dnf module list --installed
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Last metadata expiration check: 0:06:53 ago on Tue 16 Jul 2019 02:29:44 AM EDT.
No matching Modules to list

Actual results:
Step 2, "dnf module reset" will clear the "installed" information

Expected results:
The reset command should not clear the "installed" information

Additional info:
In the man page, it says the reset command is only to make the module no longer enabled or disabled.
"       dnf [options] module reset <module-spec>...
              Reset module state so it's no longer enabled or disabled."

But in fact, after reset, the packages is still visible by yum/dnf, it is the same as "enabled", only clear the "[i]" in the module list output. 
# yum module list virt
...
800_app
Name                  Stream                   Profiles                   Summary                              
virt                  rhel [d]                 common [d]                 Virtualization module 

# yum provides libguestfs    ====> for package in the profile, it it still visible by yum/dnf
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Last metadata expiration check: 0:23:13 ago on Tue 16 Jul 2019 02:29:43 AM EDT.
libguestfs-1:1.38.4-10.module+el8+2709+40ed2f2c.x86_64 : Access and modify virtual machine disk images
Repo        : 800_app
Matched from:
Provide    : libguestfs = 1:1.38.4-10.module+el8+2709+40ed2f2c

After disable, the packages in the module are invisible by yum/dnf
# yum module disable virt
# yum module list virt
...
800_app
Name                 Stream                      Profiles                  Summary                             
virt                 rhel [d][x]                 common [d]                Virtualization module               

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

# yum provides libguestfs  =====> for packages in the profile
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Last metadata expiration check: 0:21:24 ago on Tue 16 Jul 2019 02:29:43 AM EDT.
Error: No Matches found

# yum provides qemu-kvm  ====> for packages do not in the profile but in the module
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Last metadata expiration check: 0:21:06 ago on Tue 16 Jul 2019 02:29:43 AM EDT.
Error: No Matches found

Comment 1 Pavla Kratochvilova 2019-07-23 08:24:58 UTC
This is actually expected behavior.

A module profile can be installed only for an enabled stream (when you install a profile, streams get enabled accordingly). Therefore, when you reset a module, no stream is enabled and all the profiles get removed.

I can enhance the documentation, so that it is clear that reset also has this effect.

Additionally, you are mentioning package visibility. All packages from enabled and default streams are visible, other modules packages are not visible. Since the module stream you are mentioning is default (indicated by the "[d]"), it is expected that you can see its packages.

Is this explanation sufficient?

Comment 2 Pavla Kratochvilova 2019-07-23 10:23:06 UTC
PR that improves the documentation: https://github.com/rpm-software-management/dnf/pull/1437

Comment 3 yalzhang@redhat.com 2019-07-25 08:50:28 UTC
(In reply to Pavla Kratochvilova from comment #1)
> This is actually expected behavior.
> 
> A module profile can be installed only for an enabled stream (when you
> install a profile, streams get enabled accordingly). Therefore, when you
> reset a module, no stream is enabled and all the profiles get removed.
> 
> I can enhance the documentation, so that it is clear that reset also has
> this effect.
> 
> Additionally, you are mentioning package visibility. All packages from
> enabled and default streams are visible, other modules packages are not
> visible. Since the module stream you are mentioning is default (indicated by
> the "[d]"), it is expected that you can see its packages.
> 
> Is this explanation sufficient?

Yes, it's very clear. Thank you very much!

Comment 9 errata-xmlrpc 2020-04-28 16:48:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:1823


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