On 10/13/2013 1:47 AM, Harm De Weirdt wrote:
Hello everyone.I've been toying around with puppet and something happened that seems strange to me. In site.pp I have the following: node default { # This is where you can declare classes for all nodes. # Example: # class { 'my_class': } # class { 'lamp': } package {'php': ensure => present, before => File['/etc/php.ini'], } file {'/etc/php.ini': ensure => file, } package {'httpd': ensure => present, } service {'httpd': ensure => running, enable => true, require => Package['httpd'], subscribe => File['/etc/php.ini'], } package {'mysql-server': ensure => 'present', } service {'mysqld': ensure => running, enable => true, require => Package['mysql-server'], } } [I know about classes etc, this was just for easy testing. ] Now, if I change the httpd resource to package {'httpd': ensure => absent, } I get the following error: Error: Execution of '/bin/rpm -e httpd-2.2.3-82.el5.centos.i386' returned 1: error: Failed dependencies: httpd-mmn = 20051115 is needed by (installed) php-5.1.6-40.el5_9.i386 Error: /Stage[main]//Node[default]/Package[httpd]/ensure: change from 2.2.3-82.el5.centos to absent failed: Execution of '/bin/rpm -e httpd-2.2.3-82.el5.centos.i386' returned 1: error: Failed dependencies: httpd-mmn = 20051115 is needed by (installed) php-5.1.6-40.el5_9.i386 Notice: /Stage[main]//Node[default]/Service[httpd]: Dependency Package[httpd] has failures: true Warning: /Stage[main]//Node[default]/Service[httpd]: Skipping because of failed dependencies Notice: Finished catalog run in 15.00 seconds This seems strange to me, because I never declared a require dependency from php to httpd. The only thing is that the httpd service subscribes to the php.ini file. I could understand this error if the direction of this dependency was the other way around, but not this way.
It's important when troubleshooting Puppet to separate the Puppet error reported from the subsystem error that may have caused Puppet to report a failure. This seems to confuse more frequently that I would have thought.
In the case above the Puppet error is: "Error: /Stage[main]//Node[default]/Package[httpd]/ensure: change from 2.2.3-82.el5.centos to absent failed" and the error Puppet is passing on comes from rpm is "Failed dependencies: httpd-mmn = 20051115 is needed by (installed) php-5.1.6-40.el5_9.i386"
Ramin -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
