Bug 1496732

Summary: [modularity] Error: No such module on update locked module
Product: [Fedora] Fedora Reporter: Irina Gulina <igulina>
Component: dnfAssignee: Martin Hatina <mhatina>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: dmach, jmracek, rpm-software-management
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-22 09:12:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Irina Gulina 2017-09-28 09:07:31 UTC
Description of problem:

If one tries to update locked module, the "Error: No such module" is displayed, which is not true.

Version-Release number of selected component (if applicable):
dnf-2.6.5-1.git.102.e0caca2.fc27.noarch

How reproducible:
always

Steps to Reproduce:
>> dnf module lock httpd
Loading repositories.
Last metadata expiration check: 2:37:09 ago on Thu 28 Sep 2017 06:11:14 AM UTC.
'httpd' is locked (stream: master, version: 20170905144343)

>> dnf module list --installed | grep httpd 
httpd           master (default) 20170905144343 (locked)                                 default   httpd module   
                              
>> dnf module update httpd
Loading repositories.
Last metadata expiration check: 2:41:56 ago on Thu 28 Sep 2017 06:11:14 AM UTC.
Error: No such module: httpd

>> dnf module list --installed | grep httpd
httpd           master (default) 20170905144343 (locked)                                 default   httpd module  

Expected results:
I believe a message similar to "Module <name> is locked and can't be updated" will be more realistic.

Comment 1 Irina Gulina 2017-09-28 10:36:53 UTC
In other words, I would expect VersionLockedException instead of NoModuleException

Comment 2 Martin Hatina 2017-10-04 11:02:58 UTC
Fixed by https://github.com/rpm-software-management/dnf/pull/939

Comment 3 Jaroslav Mracek 2018-06-28 08:07:08 UTC
The issue is solved by dnf-3.0.1-1 that was released into rawhide.