Jira (PUP-10177) {brief summary of issue}

15 views
Skip to first unread message

Corey Osman (JIRA)

unread,
Dec 17, 2019, 1:31:04 PM12/17/19
to puppe...@googlegroups.com
Corey Osman created an issue
 
Puppet / Bug PUP-10177
{brief summary of issue}
Issue Type: Bug Bug
Affects Versions: PUP 5.y, PUP 6.y
Assignee: Unassigned
Created: 2019/12/17 10:30 AM
Priority: Normal Normal
Reporter: Corey Osman

 
Puppet Version: Any
Puppet Server Version: Any
OS Name/Version: RHEL (All versions)

When using the puppet_agent module to update an RPM to the latest the install_options flags --enablerepo and --disablerepo only accepts array of hashes and not an array of Strings. This contradictory to the following documentation: https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/package.rb#L36-L58

PR: Puppet 5.x: https://github.com/puppetlabs/puppet/pull/7879  and Puppet 6.x: {PR to come, will update when available}

Desired Behavior:

User's should be able to specify any package manager option as an array of String or an array of Hashes.

The docs detail the user can pass an array of strings or hashes.  However, there are no tests in the puppet code base that back up these claims.
Actual Behavior:

Only --enablerepo and --disablerepo are special for YUM as they affect which packages are visible to the package manager. The logic that pulls them out for use in things like version checks only looks for Hash form of specifying an option: https://github.com/puppetlabs/puppet/blob/5.5.17/lib/puppet/provider/package/yum.rb#L268-L296

create a /tmp/test.pp file with the following contents:

  1. cat /tmp/test.pp
    package { 'nginx':   ensure          => 'latest',   install_options => [ '-enablerepo="dev*"' ], }
    nginx can be any rpm package

Details show that an updated package was available and did not apply, contents of the manifest being applied:

root@:~

  1. yum list --enablerepo=dev nginx
    Loaded plugins: langpacks, package_upload, product-id, search-disabled-repos
    Installed Packages
    nginx.x86_64                                            0.0.1.1111-1e8410a                                            @dev-dev
    Available Packages
    nginxx86_64                                            0.0.1.1114-5e669d5                                           dev

root@:~

  1. cat /tmp/test.pp
    package { 'nginx':   ensure          => 'latest',   install_options => [ '-enablerepo="dev*"' ], }

root@:~

  1. puppet apply /tmp/test.pp
    Notice: Compiled catalog for <hostname> in environment production in 0.02 seconds
    Notice: Applied catalog in 2.11 seconds

Full puppet apply --debug /tmp/test.pp attached. 

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages