Issue #3366 has been updated by Markus Roberts.

Status changed from Needs more information to Ready for Checkin
Branch set to http://github.com/MarkusQ/puppet/tree/ticket/0.25.x/3366

I applied the patch from the list to 0.25.x, added the test Luke requested, and 
threw it on my github.
----------------------------------------
Bug #3366: --tags '' causes runtime error 'undefined method `each' for 
true:TrueClass'
http://projects.puppetlabs.com/issues/3366

Author: Mike Pountney
Status: Ready for Checkin
Priority: Normal
Assigned to: Jesse Wolfe
Category: tags
Target version: 0.25.5
Affected version: 0.25.4
Keywords: tags
Branch: http://github.com/MarkusQ/puppet/tree/ticket/0.25.x/3366


Running:

puppetd -v -o --tags '' --no-daemonize

results in:

err: Got an uncaught exception of type NoMethodError: undefined method `each' 
for true:TrueClass

After running with --trace, this is due to the value to --tags being set 
incorrectly to true, which then causes an exception at puppet/util/tagging.rb:46

This is pretty serious for us, as we run with tags set in the puppetd.conf 
(specifically, we set tags = 'autoapply' for normal cron runs, and perform a 
full run manually using --tags '').

Patch to fix:

--- a/lib/puppet/util/settings.rb
+++ b/lib/puppet/util/settings.rb
@@ -155,7 +155,9 @@ class Puppet::Util::Settings
         end
         str = str.intern
 
-        if value == "" or value.nil?
+        if str == :tags and value == ""
+           # tags arg can be empty
+        elsif value == "" or value.nil?
             value = bool
         end
 





-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://reductivelabs.com/redmine/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" 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-bugs?hl=en.

Reply via email to