Please review pull request #422: Simplistic fix for puppet labs Issue #4480 opened by (20after4)
Description:
This will eliminate a significant issue for runit users which causes new service installtion to require
two passes from puppet before the dependent resources get a chance to run.
There is more detailed discussion in the issue tracker: http://projects.puppetlabs.com/issues/4480
- Opened: Sat Jan 28 19:10:53 UTC 2012
- Based on: puppetlabs:master (7630671ec38d754464898ba3ad68caab144dc89b)
- Requested merge: 20after4:master (e47c1fbebd16183c93e18f4060a175f9bf3b43d7)
Diff follows:
diff --git a/lib/puppet/provider/service/runit.rb b/lib/puppet/provider/service/runit.rb
index c923bd2..e2be97f 100644
--- a/lib/puppet/provider/service/runit.rb
+++ b/lib/puppet/provider/service/runit.rb
@@ -83,7 +83,13 @@ def stop
end
def start
- enable unless enabled? == :true
+ if enabled? !== :true
+ enable
+ # Work around issue #4480
+ # runsvdir takes up to 5 seconds to recognize
+ # the symlink created by this call to enable
+ sleep 5
+ end
sv "start", self.service
end
-- You received this message because you are subscribed to the Google Groups "Puppet Developers" 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-dev?hl=en.
