Ask Your Question
0

gem package resource gets "ensure created" notice every puppet run

asked 2013-04-30 17:54:00 -0500

Ash gravatar image

updated 2013-05-02 08:32:55 -0500

chsnell gravatar image

I have the following resource type defined

            package { "install-open4":
                    source          => "/opt/puppet/lib/ruby/gems/open4-1.3.0.gem",
                    ensure          => present,
                    provider        => gem,
            }

and every puppet run on RedHat, Solaris & AIX I get.

notice: /Stage[main]/Setup_shellcmd/Package[install-open4]/ensure: created

even thou the open4 gem got installed the first time.

Here's the appropriate lines from a puppet run debug output.

[root@puppet ~]# puppet agent -d --test
~
~
debug: Prefetching gem resources for package
debug: Puppet::Type::Package::ProviderGem: Executing '/usr/local/bin/gem list --local'
debug: Puppet::Type::Package::ProviderGem: Executing '/usr/local/bin/gem list --local install-open4$'
debug ...
(more)
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2013-05-01 04:49:59 -0500

jonn gravatar image

Possibly you're running into this bug? - it appears to be due to a change in the output of gem when --source is specified. What version of rubygems are you running?

If you do a puppet agent run with "-d" it might provide some clues?

edit flag offensive delete link more

Comments

I'm using the version that came with Puppet Enterprise.

[root@puppet ~]# rpm -q pe-rubygems

pe-rubygems-1.5.3-1.pe.el6.noarch

[root@puppet ~]#

Ash gravatar imageAsh ( 2013-05-01 15:07:43 -0500 )edit

Hi @Ash - could you run those two "gem list" commands from the debug output, and add the results to your question please?

jonn gravatar imagejonn ( 2013-05-02 01:05:52 -0500 )edit

ah, yes. The first one lists all gems, including open4, and the second one tries to list "install-open4", the name of the package resource, which of course list nothing. I ...(more)

Ash gravatar imageAsh ( 2013-05-02 16:14:04 -0500 )edit
0

answered 2013-05-02 08:11:55 -0500

chsnell gravatar image

I was told that this was an issue with the ruby-gems provided with puppet enterprise. The logic is that everything in /opt/puppet should be what's provided from the vendor, so you don't want to install 3rd party gems into that space. That means that you need a second install of ruby-gems somewhere and a place to store your gems outside of /opt/puppet.

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

1 follower

Stats

Asked: 2013-04-30 17:54:00 -0500

Seen: 355 times

Last updated: May 02 '13