Please review pull request #712: (#13966) Fix default pidfile race condition opened by (jeffweiss)
Description:
Commit 8b81794 introduced a race condition for the pidfile that
incorrectly defaulted all pidfiles to user.pid because of when in load
time defaults.rb was read. Run_mode bootstraps as user and then
switches to [master|agent] if necessary. This change modifies the
default pidfile value to interpolate run_mode at time of pidfile use
rather than bootstrapped run_mode. This commit restores proper
functionality for the pidfile names.
- Opened: Wed Apr 25 17:00:01 UTC 2012
- Based on: puppetlabs:master (32f91d11e149bfad7b38639d3aa2aea1e8176cd8)
- Requested merge: jeffweiss:ticket/master/13966_remove_name_option (bbda9d21ce193efad2fc0c59d71b482bac0aeede)
Diff follows:
diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb
index 0f87700..f590e5e 100644
--- a/lib/puppet/defaults.rb
+++ b/lib/puppet/defaults.rb
@@ -678,7 +678,7 @@ module Puppet
},
:pidfile => {
:type => :file,
- :default => "$rundir/#{Puppet.run_mode.name}.pid",
+ :default => "$rundir/${run_mode}.pid",
:desc => "The pid file",
},
:bindaddress => {
-- 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.
