Issue #18716 has been reported by Diego Morales.

----------------------------------------
Bug #18716: Service[x]/enable action is not reported on log when 
Service[x]/ensure  action is also done
https://projects.puppetlabs.com/issues/18716

Author: Diego Morales
Status: Unreviewed
Priority: Low
Assignee: 
Category: 
Target version: 
Affected Puppet version: 3.0.2
Keywords: 
Branch: 


When puppet needs to make a service both running|stopped and enabled|disabled, 
only the ensure action is logged, but both are done.

Say we have apache2 both stopped and disabled. Then:

<pre>
# puppet apply -e "service {'apache2': ensure => running, enable => true, }" 
--noop
Notice: /Stage[main]//Service[apache2]/ensure: current_value stopped, should be 
running (noop)
Notice: Class[Main]: Would have triggered 'refresh' from 1 events
Notice: Stage[main]: Would have triggered 'refresh' from 1 events
Notice: Finished catalog run in 0.22 seconds
</pre>
Leaving just enable => true now logs that action:
<pre>
# puppet apply -e "service {'apache2': enable => true, }" --noop
Notice: /Stage[main]//Service[apache2]/enable: current_value false, should be 
true (noop)
Notice: Class[Main]: Would have triggered 'refresh' from 1 events
Notice: Stage[main]: Would have triggered 'refresh' from 1 events
Notice: Finished catalog run in 0.22 seconds
</pre>

Taking --noop out we see it actually does enable the service:
<pre>
# puppet apply -e "service {'apache2': ensure => running, enable => true, }"
Notice: /Stage[main]//Service[apache2]/ensure: ensure changed 'stopped' to 
'running'
Notice: Finished catalog run in 0.50 seconds
# puppet resource service apache2
service { 'apache2':
  ensure => 'running',
  enable => 'true',
}
</pre>

I took a look on existing issues and think this might be a side effect of Issue 
#1537 proposed solution (despite that being very old and still in just accepted 
state). It seems to me to be a very minor issue, but it did make me very 
confused for a short time. 

I'm running this on ubuntu precise with puppet 3.0.2. Ubuntu native package 
(2.7.11) has the same behavior.


-- 
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to