Jira (PUP-10235) Support enable module with dnfmodule package provider

0 views
Skip to first unread message

Jens Almer (JIRA)

unread,
Jan 14, 2020, 6:07:04 PM1/14/20
to puppe...@googlegroups.com
Jens Almer created an issue
 
Puppet / New Feature PUP-10235
Support enable module with dnfmodule package provider
Issue Type: New Feature New Feature
Affects Versions: PUP 6.11.0
Assignee: Unassigned
Components: Types and Providers
Created: 2020/01/14 3:06 PM
Environment:

CentOS 8, RHEL 8 agents.

Priority: Normal Normal
Reporter: Jens Almer

The dnfmodule package provider currently only supports installing a profile, ala `dnf module install module-name:stream/profile`. Some modules do not provide profiles, and can only be enabled. For example, the 389-ds module. To install, 2 steps are required:

  • `dnf module enable 389-ds:1.4`
  • `dnf install 389-ds-base`

I think it would be ideal to allow for an 'enabled' value for the ensure parameter which would change the invocation of dnf. The stream should be passed in with a new or repurposed parameter. A secondary package resource can be used to install the needed package as that is not deterministic.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Josh Cooper (JIRA)

unread,
Jan 14, 2020, 8:06:04 PM1/14/20
to puppe...@googlegroups.com

Mihai Buzgau (JIRA)

unread,
Jan 16, 2020, 11:09:04 AM1/16/20
to puppe...@googlegroups.com

Mihai Buzgau (Jira)

unread,
Mar 18, 2020, 6:21:04 AM3/18/20
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Sprint: PR NW - Triage 2020-04-01
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Mihai Buzgau (Jira)

unread,
Mar 18, 2020, 6:21:04 AM3/18/20
to puppe...@googlegroups.com

Gabriel Nagy (Jira)

unread,
Mar 19, 2020, 4:18:04 AM3/19/20
to puppe...@googlegroups.com

Gabriel Nagy (Jira)

unread,
Mar 26, 2020, 8:56:03 AM3/26/20
to puppe...@googlegroups.com
Gabriel Nagy commented on New Feature PUP-10235
 
Re: Support enable module with dnfmodule package provider

Hi Jens Almer, I tried to reproduce this case and looks like dnf module install falls back to enable for modules with no default profiles. So apart from the catalog application not being idempotent, what you are asking should be possible with the current code.

Can you provide more details as to what exactly is failing? We have a PR open that adds a new parameter which allows a module to be only enabled, but I wonder if maybe I missed something here.

Thanks.

Gabriel Nagy (Jira)

unread,
Mar 27, 2020, 5:07:03 AM3/27/20
to puppe...@googlegroups.com
Gabriel Nagy commented on New Feature PUP-10235

I did some investigation myself, and I found this PR on dnf which changes the behavior of dnf module install: https://github.com/rpm-software-management/dnf/pull/1427/

So it looks like prior to DNF version 4.2.8 you could run dnf module install on a module with no default profile, and it will silently enable it. With more recent versions, the command fails without enabling the stream. Apparently the previous behavior was misleading, since the install command wouldn't install any RPMs (see https://bugzilla.redhat.com/show_bug.cgi?id=1669527).

This was a bit tricky to find out since on our test boxes we had an older version of DNF which didn't present this issue/fix.

Jens Almer (Jira)

unread,
Mar 27, 2020, 12:43:04 PM3/27/20
to puppe...@googlegroups.com
Jens Almer commented on New Feature PUP-10235

Hey Gabriel,

I appreciate your work on this! I never noticed the fallback behavior, but
I can confirm that is correct. My assumption after observing the lack of
idempotency was that it was failing to enable the module. The open PR
should meet my needs.

Takk!
--Jens

On Fri, Mar 27, 2020 at 6:28 AM Gabriel Nagy (Jira) <

Jens Almer (Jira)

unread,
Mar 27, 2020, 12:57:03 PM3/27/20
to puppe...@googlegroups.com
Jens Almer commented on New Feature PUP-10235

I missed your comment about the DNF behavior change. Good find!

Mihai Buzgau (Jira)

unread,
Apr 1, 2020, 3:51:03 AM4/1/20
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Sprint: NW - 2020-04-01 , NW - 2020-04-15

Gabriel Nagy (Jira)

unread,
Apr 6, 2020, 6:59:03 AM4/6/20
to puppe...@googlegroups.com
Gabriel Nagy updated an issue
Change By: Gabriel Nagy
Fix Version/s: PUP 6.15.0
Fix Version/s: PUP 5.5.20

Claire Cadman (Jira)

unread,
Apr 6, 2020, 9:38:04 AM4/6/20
to puppe...@googlegroups.com

Vadym Chepkov (Jira)

unread,
Apr 13, 2020, 12:00:03 PM4/13/20
to puppe...@googlegroups.com
Vadym Chepkov commented on New Feature PUP-10235
 
Re: Support enable module with dnfmodule package provider

Could you also add an option to disable a module? It's required to use non-modular sources, postgresql 11, for instance

Gabriel Nagy (Jira)

unread,
Apr 13, 2020, 12:18:03 PM4/13/20
to puppe...@googlegroups.com
Gabriel Nagy commented on New Feature PUP-10235

Vadym Chepkov good suggestion! Should ensure => absent also disable a module? Or should we have a different value for this (i.e. ensure => disabled).

I'm also assuming that dnf module disable works on not enabled modules as well? I ran the command against a module not appearing in dnf module list --enabled and I was able to disable it.

Vadym Chepkov (Jira)

unread,
Apr 13, 2020, 1:26:03 PM4/13/20
to puppe...@googlegroups.com

I think `ensure => disabled` is most logical. they marked with letter x in output:

 

# dnf module list|grep postgresql
postgresql           9.6 [x]       client, server [d]                       PostgreSQL server and client module                                         
postgresql           10 [d][x]     client, server [d]                       PostgreSQL server and client module                                         
postgresql           12 [x]        client, server                           PostgreSQL server and client module                         

 

Vadym Chepkov (Jira)

unread,
Apr 13, 2020, 1:26:04 PM4/13/20
to puppe...@googlegroups.com

# dnf module list --disabled
Last metadata expiration check: 0:01:36 ago on Mon 13 Apr 2020 05:23:56 PM UTC.
CentOS-8 - AppStream
Name                              Stream                           Profiles                                 Summary                                                  
postgresql                        9.6 [x]                          client, server [d]                       PostgreSQL server and client module                      
postgresql                        10 [d][x]                        client, server [d]                       PostgreSQL server and client module                      
postgresql                        12 [x]                           client, server                           PostgreSQL server and client module                      
 
 
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

Gabriel Nagy (Jira)

unread,
Apr 14, 2020, 8:02:04 AM4/14/20
to puppe...@googlegroups.com
Gabriel Nagy commented on New Feature PUP-10235

Thanks for the additional information, Vadym Chepkov. Would you be able to open a PUP ticket for this functionality?

Vadym Chepkov (Jira)

unread,
Apr 14, 2020, 8:23:03 AM4/14/20
to puppe...@googlegroups.com

Claire Cadman (Jira)

unread,
Apr 28, 2020, 3:48:03 AM4/28/20
to puppe...@googlegroups.com

Gabriel Nagy (Jira)

unread,
Apr 28, 2020, 4:17:03 AM4/28/20
to puppe...@googlegroups.com
Gabriel Nagy commented on New Feature PUP-10235

For everyone watching this issue, due to the additional use cases of DNF modules compared to other package providers, and because we want to implement a most logical way of managing a DNF module (enabling, disabling, installing, removing, resetting), we are not going to document this feature yet. This means that the current implementation is subject to change, depending on how PUP-10419 is implemented.

Thanks for the understanding, and we apologize for any inconvenience this might cause.

Reply all
Reply to author
Forward
0 new messages