Issue #20121 has been updated by Charlie Sharpsteen. Category set to service Status changed from Investigating to Accepted Keywords changed from sles redhat service customer to sles redhat customer
The problem here is that on CentOS, `chkconfig` returns an exit code of 0 to indicate that a service is enabled at boot and 1 to indicate it is missing or disabled. On SLES, `chkconfig` always returns 0 so Puppet thinks the service is enabled when it is actually missing. Patch incoming. ---------------------------------------- Bug #20121: SLES service acts different than RedHat https://projects.puppetlabs.com/issues/20121#change-89287 * Author: Charles Dunbar * Status: Accepted * Priority: Normal * Assignee: Charlie Sharpsteen * Category: service * Target version: * Affected Puppet version: * Keywords: sles redhat customer * Branch: ---------------------------------------- On Puppet 2.7.19, when trying to manage a non-existant service in RedHat/CentOS, puppet compiles without issue. When you use the exact same manifest for SLES (currently testing x64 SLES 11.1), you get an error that the service doesn't exist. Manifest: <pre> service { 'foo': ensure => 'false', enable => false, } </pre> On CentOS 6.3, with --debug: <pre> debug: Service[foo](provider=redhat): Executing '/sbin/service foo status' debug: Puppet::Type::Service::ProviderRedhat: Executing '/sbin/chkconfig foo' notice: Finished catalog run in 5.04 seconds </pre> On SLES 11.1: <pre> debug: Service[foo](provider=redhat): Executing '/sbin/service foo status' debug: Puppet::Type::Service::ProviderRedhat: Executing '/sbin/chkconfig foo' debug: Puppet::Type::Service::ProviderRedhat: Executing '/sbin/chkconfig foo off' err: /Stage[main]/Cron/Service[foo]/enable: change from true to false failed: Could not disable foo: notice: Finished catalog run in 1.80 seconds </pre> Looks like trying to call the service off is the failure. Ideally would prefer a non-existing service to be assumed to be off, as the centos machine simulates. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" 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-bugs?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
