Issue #9656 has been reported by Matt Dainty.
----------------------------------------
Bug #9656: Coalesce pending notifies for service resources that initially
weren't running
https://projects.puppetlabs.com/issues/9656
Author: Matt Dainty
Status: Unreviewed
Priority: Normal
Assignee:
Category:
Target version:
Affected Puppet version: 2.6.9
Keywords:
Branch:
Is it possible to get Puppet when transitioning a service resource from stopped
to running to coalesce/consume any pending notifies from other resources
otherwise the service gets started, then restarted by the notifies. By starting
it up, the service is going to have picked up whatever changed (config file,
etc.) so the restart is unnecessary.
So given the following manifest snippet:
<pre>
file { "foo":
ensure => file,
content => inline_template("<%= rand %>\n"),
notify => Service["bar"],
}
service { "bar":
ensure => running,
hasstatus => true,
hasrestart => true,
}
</pre>
Assuming the service is stopped already, I see the following when applying the
manifest:
<pre>
---8<---
notice: /File[foo]/content: content changed
'{md5}caf781abcab8e319f3113f8149a8ee9d' to
'{md5}949f3faf5f6830cc3567aac02f1b8e3a'
info: /File[foo]: Scheduling refresh of Service[bar]
debug: Service[bar](provider=redhat): Executing '/sbin/service bar status'
debug: Service[bar](provider=redhat): Executing '/sbin/service bar start'
notice: /Stage[main]//Node[baz]/Service[bar]/ensure: ensure changed 'stopped'
to 'running'
debug: Service[bar](provider=redhat): Executing '/sbin/service bar status'
debug: Service[bar](provider=redhat): Executing '/sbin/service bar restart'
notice: /Stage[main]//Node[baz]/Service[bar]: Triggered 'refresh' from 1 events
</pre>
This is normally not a problem as most software restarts fairly quickly, except
I have some that takes five minutes to start which is bad enough, except now it
takes ten minutes.
--
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.