diff options
| author | mpalmer <mpalmer@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-12-31 06:27:24 +0000 |
|---|---|---|
| committer | mpalmer <mpalmer@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-12-31 06:27:24 +0000 |
| commit | 0a1dd1ae8e5d77c22596579fbedfbe1db19b4445 (patch) | |
| tree | a9de63e645f660a0990daf18baa2dbd46e3ddefc /lib | |
| parent | 23b75e2739e62d18d044121fef98462b721b65cb (diff) | |
| download | puppet-0a1dd1ae8e5d77c22596579fbedfbe1db19b4445.tar.gz puppet-0a1dd1ae8e5d77c22596579fbedfbe1db19b4445.tar.xz puppet-0a1dd1ae8e5d77c22596579fbedfbe1db19b4445.zip | |
Use Puppet::Util.sync instead of MonitorMixin to ensure that only one thread runs the executor at once
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2006 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/puppet/client/master.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/puppet/client/master.rb b/lib/puppet/client/master.rb index c1e421ae0..79eb746a5 100644 --- a/lib/puppet/client/master.rb +++ b/lib/puppet/client/master.rb @@ -2,8 +2,6 @@ require 'sync' class Puppet::Client::MasterClient < Puppet::Client - include MonitorMixin - unless defined? @@sync @@sync = Sync.new end @@ -316,11 +314,11 @@ class Puppet::Client::MasterClient < Puppet::Client def run(tags = nil, ignoreschedules = false) lockfile = Puppet::Util::Pidlock.new(Puppet[:puppetdlockfile]) - if !lockfile.lock - Puppet.notice "Lock file %s exists; skipping configuration run" % - lockfile.lockfile - else - self.synchronize do + Puppet::Util.sync(:puppetrun).synchronize(Sync::EX) do + if !lockfile.lock + Puppet.notice "Lock file %s exists; skipping configuration run" % + lockfile.lockfile + else @running = true @configtime = thinmark do self.getconfig |
