Issue #3366 has been updated by James Turnbull.

Status changed from Accepted to Code Insufficient

Hi Mike - just testing you code and I get:

"undefined local variable or method `tags' for 
#<Puppet::Util::Settings:0x40f0f998>" - not sure you can use tags in that 
context."

Shouldn't the fix be in the tagging.rb in the tags method?
----------------------------------------
Bug #3366: --tags '' causes runtime error 'undefined method `each' for 
true:TrueClass'
http://projects.reductivelabs.com/issues/3366

Author: Mike Pountney
Status: Code Insufficient
Priority: High
Assigned to: James Turnbull
Category: tags
Target version: 0.25.5
Affected version: 0.25.4
Keywords: tags
Branch: 


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