From 196294a73e32f5f1cd511a8c23006d23839c7e57 Mon Sep 17 00:00:00 2001 From: Dan Bode Date: Wed, 16 Mar 2011 15:32:23 -0500 Subject: (4576) - if ENC declares invalid class, it is logged at warning. used to be at info, so you had to run the master on verbose to see it an ENC was trying to declare a class that could not be loaded. --- lib/puppet/parser/compiler.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/puppet/parser/compiler.rb b/lib/puppet/parser/compiler.rb index fdabd05c9..6e8e3d26b 100644 --- a/lib/puppet/parser/compiler.rb +++ b/lib/puppet/parser/compiler.rb @@ -162,7 +162,7 @@ class Puppet::Parser::Compiler resource.evaluate unless lazy_evaluate found << name else - Puppet.info "Could not find class #{name} for #{node.name}" + Puppet.warning "Could not find class #{name} for #{node.name}" @catalog.tag(name) end end -- cgit From f8941b80bb8ba6042dddce02d132abe252756162 Mon Sep 17 00:00:00 2001 From: Nick Lewis Date: Thu, 24 Mar 2011 11:38:42 -0700 Subject: (#4769) Fix negative timeout support for newer rubies In new versions of Ruby, negative timeouts are unsupported. So munge negatives to zero in the parameter. Reviewed-By: Jacob Helwig --- lib/puppet/type/exec.rb | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'lib') diff --git a/lib/puppet/type/exec.rb b/lib/puppet/type/exec.rb index 4458bf081..be0ece023 100755 --- a/lib/puppet/type/exec.rb +++ b/lib/puppet/type/exec.rb @@ -229,19 +229,17 @@ module Puppet newparam(:timeout) do desc "The maximum time the command should take. If the command takes longer than the timeout, the command is considered to have failed - and will be stopped. Use any negative number to disable the timeout. + and will be stopped. Use 0 to disable the timeout. The time is specified in seconds." munge do |value| value = value.shift if value.is_a?(Array) - if value.is_a?(String) - unless value =~ /^[-\d.]+$/ - raise ArgumentError, "The timeout must be a number." - end - Float(value) - else - value + begin + value = Float(value) + rescue ArgumentError => e + raise ArgumentError, "The timeout must be a number." end + [value, 0.0].max end defaultto 300 -- cgit From 357514ceec94df18abf98e5b906b50cb0dcf4cbd Mon Sep 17 00:00:00 2001 From: James Turnbull Date: Sat, 22 Jan 2011 04:32:10 +1100 Subject: (#5221) Fix fileset path absoluteness checking with trailing slash Reviewed-By: Nick Lewis Reviewed-By: Pieter van de Bruggen --- lib/puppet/file_serving/fileset.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/puppet/file_serving/fileset.rb b/lib/puppet/file_serving/fileset.rb index fdbcf93a3..c020f036d 100644 --- a/lib/puppet/file_serving/fileset.rb +++ b/lib/puppet/file_serving/fileset.rb @@ -59,6 +59,7 @@ class Puppet::FileServing::Fileset end def initialize(path, options = {}) + path = path.chomp(File::SEPARATOR) raise ArgumentError.new("Fileset paths must be fully qualified") unless File.expand_path(path) == path @path = path -- cgit