Hide Forgot
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
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?
PR that improves the documentation: https://github.com/rpm-software-management/dnf/pull/1437
(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!
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