Hey, I''m running Puppet 2.6.0 and somehow I can''t really use the rpm provider like I was used to in previous versions. This is what my manifest looks like: file { "/tmp/apache2-mod_security2-2.5.9-6.2.x86_64.rpm": ensure => present, owner => "root", group => "root", mode => "744", source => "puppet:///modules/$module/apache2- mod_security2-2.5.9-6.2.x86_64.rpm", before => Package["mod_security2"] } package { "mod_security2": ensure => present, source => "/tmp/apache2- mod_security2-2.5.9-6.2.x86_64.rpm", provider => "rpm" } As long as the package isn''t installed the manifest works fine, but afterwards every run throws this error: Thu Aug 26 08:29:06 +0200 2010 /Stage[main]/Webserver::Apache/ Package[mod_security2]/ensure (err): change from absent to present failed: Execution of ''/bin/rpm -i --oldpackage/tmp/apache2- mod_security2-2.5.9-6.2.x86_64.rpm'' returned 1: package apache2- mod_security2-2.5.9-6.2.x86_64 is already installed Thu Aug 26 08:29:06 +0200 2010 /Stage[main]/Webserver::Apache/File[/ usr/lib64/apache2-prefork/mod_security2.so] (notice): Dependency Package[mod_security2] has failures: true Thu Aug 26 08:29:06 +0200 2010 /Stage[main]/Webserver::Apache/File[/ usr/lib64/apache2-prefork/mod_security2.so] (warning): Skipping because of failed dependencies Well suprise...why does puppet declare the state of a package already being installed as error? So I''ve played around a bit and if I use ensure => absent instead of present the manifest runs through whitout errors but also keeping the package. Bug or feature? christian -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Wed, Aug 25, 2010 at 11:47 PM, Christian Casar <c.casar@web.de> wrote:> Hey, > I''m running Puppet 2.6.0 and somehow I can''t really use the rpm > provider like I was used to in previous versions. > This is what my manifest looks like:[snip]> package { "mod_security2": > ensure => present, > source => "/tmp/apache2- > mod_security2-2.5.9-6.2.x86_64.rpm", > provider => "rpm" > } > > As long as the package isn''t installed the manifest works fine, but > afterwards every run throws this error: > > Thu Aug 26 08:29:06 +0200 2010 /Stage[main]/Webserver::Apache/ > Package[mod_security2]/ensure (err): change from absent to present > failed: Execution of ''/bin/rpm -i --oldpackage/tmp/apache2- > mod_security2-2.5.9-6.2.x86_64.rpm'' returned 1: package apache2- > mod_security2-2.5.9-6.2.x86_64 is already installedPuppet is checking if the package "mod_security2" is installed but I think the package is called "apache2-mod_security2", right? If you add name => "apache2-mod_security2", it should do what you expect. Since you haven''t specified the name property, puppet automatically uses the title as the name of the package to check. Puppet is doing the equivalent of rpm -q mod_security2 when it should be doing rpm -q apache-mod_security2 to check if the package is installed or not. Hope this helps. -- Jeff McCune -- Jeff McCune http://www.puppetlabs.com/ -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
> If you add name => "apache2-mod_security2", it should do what you expect.Oh great :) That works! But I have to add the complete package name (apache2- mod_security2-2.5.9-6.2.x86_64 ) instead of just "apache2-mod_security2" Thanks for the fast help On 26 Aug., 08:54, Jeff McCune <j...@puppetlabs.com> wrote:> On Wed, Aug 25, 2010 at 11:47 PM, Christian Casar <c.ca...@web.de> wrote: > > Hey, > > I''m running Puppet 2.6.0 and somehow I can''t really use the rpm > > provider like I was used to in previous versions. > > This is what my manifest looks like: > > [snip] > > > package { "mod_security2": > > ensure => present, > > source => "/tmp/apache2- > > mod_security2-2.5.9-6.2.x86_64.rpm", > > provider => "rpm" > > } > > > As long as the package isn''t installed the manifest works fine, but > > afterwards every run throws this error: > > > Thu Aug 26 08:29:06 +0200 2010 /Stage[main]/Webserver::Apache/ > > Package[mod_security2]/ensure (err): change from absent to present > > failed: Execution of ''/bin/rpm -i --oldpackage/tmp/apache2- > > mod_security2-2.5.9-6.2.x86_64.rpm'' returned 1: package apache2- > > mod_security2-2.5.9-6.2.x86_64 is already installed > > Puppet is checking if the package "mod_security2" is installed but I > think the package is called "apache2-mod_security2", right? > > If you add name => "apache2-mod_security2", it should do what you expect. > > Since you haven''t specified the name property, puppet automatically > uses the title as the name of the package to check. Puppet is doing > the equivalent of rpm -q mod_security2 when it should be doing rpm -q > apache-mod_security2 to check if the package is installed or not. > > Hope this helps. > > -- > Jeff McCune > > -- > Jeff McCunehttp://www.puppetlabs.com/-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On 26 August 2010 08:16, Christian Casar <c.casar@web.de> wrote:>> If you add name => "apache2-mod_security2", it should do what you expect. > > Oh great :) > That works! > But I have to add the complete package name (apache2- > mod_security2-2.5.9-6.2.x86_64 > ) instead of just "apache2-mod_security2" >You should only need what rpm thinks is the name (or the full NVR, which will work with an rpm query) rpm --queryformat ''%{name}\n'' -qp /tmp/apache2-mod_security2-2.5.9-6.2.x86_64.rpm Paul -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Nice to have on This list an ex rpm maintainer :) -----Original Message----- From: Paul Nasrat Sent: 26/08/2010, 16:41 To: puppet-users@googlegroups.com Subject: Re: [Puppet Users] Re: RPM Provider broken? On 26 August 2010 08:16, Christian Casar <c.casar@web.de> wrote:>> If you add name => "apache2-mod_security2", it should do what you expect. > > Oh great :) > That works! > But I have to add the complete package name (apache2- > mod_security2-2.5.9-6.2.x86_64 > ) instead of just "apache2-mod_security2" >You should only need what rpm thinks is the name (or the full NVR, which will work with an rpm query) rpm --queryformat ''%{name}\n'' -qp /tmp/apache2-mod_security2-2.5.9-6.2.x86_64.rpm Paul -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.