diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-10-18 19:54:16 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-10-18 19:54:16 +0000 |
commit | e3b4f234a39f264b488c80fd526fe820a09fc16c (patch) | |
tree | 645bf43d3182457c2db7ad5a7cfa5984db81c397 | |
parent | 07f616badf4e067000fa5d49c2698b8b6b5a7609 (diff) | |
download | puppet-e3b4f234a39f264b488c80fd526fe820a09fc16c.tar.gz puppet-e3b4f234a39f264b488c80fd526fe820a09fc16c.tar.xz puppet-e3b4f234a39f264b488c80fd526fe820a09fc16c.zip |
Another round of bugfixing, including finding out that the tagmail report was leaving zombie processes lying around
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1816 980ebf18-57e1-0310-9a29-db15c13687c0
-rwxr-xr-x | bin/puppetmasterd | 2 | ||||
-rw-r--r-- | lib/puppet/reports/tagmail.rb | 4 | ||||
-rwxr-xr-x | lib/puppet/server/fileserver.rb | 17 | ||||
-rw-r--r-- | lib/puppet/server/master.rb | 2 | ||||
-rwxr-xr-x | test/other/transactions.rb | 4 |
5 files changed, 18 insertions, 11 deletions
diff --git a/bin/puppetmasterd b/bin/puppetmasterd index b9614c29b..2bf018b55 100755 --- a/bin/puppetmasterd +++ b/bin/puppetmasterd @@ -257,7 +257,7 @@ begin #server = Puppet::Server.new(:CA => ca) server = Puppet::Server.new(args) rescue => detail - if Puppet[:debug] + if Puppet[:trace] puts detail.backtrace end $stderr.puts detail diff --git a/lib/puppet/reports/tagmail.rb b/lib/puppet/reports/tagmail.rb index e842b17ac..2a00ea4c1 100644 --- a/lib/puppet/reports/tagmail.rb +++ b/lib/puppet/reports/tagmail.rb @@ -87,7 +87,7 @@ Puppet::Server::Report.newreport(:tagmail) do # Let's fork for the sending of the email, since you never know what might # happen. - fork do + pid = fork do if Puppet[:smtpserver] != "none" begin Net::SMTP.start(Puppet[:smtpserver]) do |smtp| @@ -128,6 +128,8 @@ Puppet::Server::Report.newreport(:tagmail) do raise Puppet::Error, "SMTP server is unset and could not find sendmail" end end + + Process.detach(pid) end end diff --git a/lib/puppet/server/fileserver.rb b/lib/puppet/server/fileserver.rb index 85f0f5016..8033fac5b 100755 --- a/lib/puppet/server/fileserver.rb +++ b/lib/puppet/server/fileserver.rb @@ -245,7 +245,7 @@ class Server name = $1 if newmounts.include?(name) raise FileServerError, "%s is already mounted at %s" % - [newmounts[name], name] + [newmounts[name], name], count, @config.file end mount = Mount.new(name) newmounts[name] = mount @@ -267,8 +267,8 @@ class Server mount.info "allowing %s access" % val mount.allow(val) rescue AuthStoreError => detail - raise FileServerError, "%s at line %s of %s" % - [detail.to_s, count, @config] + raise FileServerError.new(detail.to_s, + count, @config.file) end } when "deny": @@ -277,16 +277,17 @@ class Server mount.info "denying %s access" % val mount.deny(val) rescue AuthStoreError => detail - raise FileServerError, "%s at line %s of %s" % - [detail.to_s, count, @config] + raise FileServerError.new(detail.to_s, + count, @config.file) end } else - raise FileServerError, - "Invalid argument '%s' at line %s" % [var, count] + raise FileServerError.new("Invalid argument '%s'" % var, + count, @config.file) end else - raise FileServerError, "Invalid line %s: %s" % [count, line] + raise FileServerError.new("Invalid line '%s'" % line.chomp, + count, @config.file) end count += 1 } diff --git a/lib/puppet/server/master.rb b/lib/puppet/server/master.rb index 1822e779e..79fe53da0 100644 --- a/lib/puppet/server/master.rb +++ b/lib/puppet/server/master.rb @@ -202,3 +202,5 @@ class Server end end end + +# $Id$ diff --git a/test/other/transactions.rb b/test/other/transactions.rb index baf25aab5..ee4b901cb 100755 --- a/test/other/transactions.rb +++ b/test/other/transactions.rb @@ -265,6 +265,8 @@ class TestTransactions < Test::Unit::TestCase file[:check] = check file[:group] = @groups[0] + assert_apply(file) + @@tmpfiles << execfile component = newcomp("both",file,exec) @@ -285,7 +287,7 @@ class TestTransactions < Test::Unit::TestCase file[:mode] = "755" } - trans = assert_events([:file_changed, :file_changed, :triggered], component) + trans = assert_events([:file_changed, :triggered], component) assert(FileTest.exists?(execfile), "Execfile does not exist") File.unlink(execfile) |