Issue #3366 has been updated by Mike Pountney. File 3366.patch added
Sorry James, should have uploaded the patch rather than putting it in the comment - redmine mangled it. Attached now. I'm of the impression that settings.rb is the right place for it, as this is where the tags value is getting incorrectly set to true rather than being left at the empty string. I guess the same effect could be had in tagging.rb by setting the array to empty if the :tags option is true. TBH, I don't understand the code well enough to make a call. The other point is that this patch only fixes --tags '', if there are other options that can take an empty string then I'd imagine this would be affecting those too. ---------------------------------------- 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.
