Ask Your Question
1

Why doesn't my install_options work for my package resource

asked 2015-04-22 18:39:02 -0500

red-cricket gravatar image

Here is what I am doing ...

    [root@mgmt-el7-002 ~]# puppet -V
    3.6.2 (Puppet Enterprise 3.3.2)
    [root@mgmt-el7-002 ~]# cat kernel_upgrade.pp
    package {'kernel-3.10.0-123.20.1.el7':
            ensure => present,
            allow_virtual => false,
            install_options => [ { '--enablerepo' => 'Redhat_7_Updates'} ],
    }

    [root@mgmt-el7-002 ~]# puppet apply kernel_upgrade.pp
    Notice: Compiled catalog for mgmt-el7-002 in environment production in 0.38 seconds
    Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list kernel-3.10.0-123.20.1.el7' returned 1: Error: No matching Packages to list
    Error: /Stage[main]/Main/Package[kernel-3.10.0-123.20.1.el7]/ensure: change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y list kernel-3.10.0-123.20.1.el7' returned 1: Error: No matching Packages to list
    Notice: Finished catalog run in 1.89 seconds
    [root@mgmt-el7-002 ~]# yum --enablerepo=Redhat_7_Updates list kernel-3.10.0-123.20.1.el7
    Loaded plugins: fastestmirror, priorities, product-id, subscription-manager
    This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
    Loading mirror speeds from cached hostfile
     * Openstack-Juno-Repo: wwwin-kickstart-sj.example.com
     * example-linux-common: wwwin-kickstart-dev.example.com
     * example-linux-server: wwwin-kickstart-dev.example.com
    91 packages excluded due to repository priority protections
    Available Packages
    kernel.x86_64                       3.10.0-123.20.1.el7               Redhat_7_Updates

So what is wrong with my kernel_upgrade.pp file?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2015-04-23 07:21:35 -0500

JohnsonEarls gravatar image

updated 2015-04-23 07:22:38 -0500

This is a bug: PUP-2971 - fixed in version 3.7.0

To work around it, try setting allow_virtual to true, which avoids the does-the-package-exist check.

edit flag offensive delete link more

Comments

that did the trick! thanks

red-cricket gravatar imagered-cricket ( 2015-04-24 00:13:57 -0500 )edit
1

answered 2015-04-22 22:17:27 -0500

GregLarkin gravatar image

I would be interested to see what happens if you change your code to:

package { 'kernel':
  ensure          => latest,
  allow_virtual   => false,
  install_options => [ { '--enablerepo' => 'Redhat_7_Updates'} ],
  noop            => true,
}

Try puppet apply with that file, and if it works better, then you can remove noop attribute. Please post any relevant output back here if you need additional help.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2015-04-22 18:39:02 -0500

Seen: 972 times

Last updated: Apr 23 '15