Issue #3949 has been updated by Markus Roberts.

Status changed from Needs more information to Accepted
Assigned to changed from R.I. Pienaar aka Volcane to Markus Roberts

The problem is that you're loading an RDDtool object into a context that 
doesn't have the class RRDtool defined.  You can fix this by requiring RRDtool 
before trying to load structures containing them.

It broke in 0.25.5 because zaml handles this "correctly" (albeit not 
particularly gracefully) while Syck/yaml simply quietly passed it on.  In this 
case the "correct" behavior is not particularly useful and we probably want to 
do something more graceful, or at least more informative--and we may even want 
to pass it on unmodified.


----------------------------------------
Bug #3949: Zaml undefined method `name' for "RRDtool":String
http://projects.puppetlabs.com/issues/3949

Author: R.I. Pienaar aka Volcane
Status: Accepted
Priority: Normal
Assigned to: Markus Roberts
Category: 
Target version: 
Affected version: 0.25.5
Keywords: 
Branch: 


If you've previously loaded a report from disk and then try to convert it to 
YAML again the following happens:

<pre>
irb(main):001:0> require 'puppet'
=> true
irb(main):002:0> r = YAML.load(File.read("201006051724.yaml")).to_yaml
NoMethodError: undefined method `name' for "RRDtool":String
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/zaml.rb:124:in 
`zamlized_class_name'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/zaml.rb:128:in `to_zaml'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/zaml.rb:90:in 
`first_time_only'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/zaml.rb:127:in `to_zaml'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/zaml.rb:138:in `to_zaml'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/zaml.rb:134:in `each'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/zaml.rb:134:in `to_zaml'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/zaml.rb:38:in `nested'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/zaml.rb:129:in `to_zaml'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/zaml.rb:90:in 
`first_time_only'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/zaml.rb:127:in `to_zaml'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/zaml.rb:264:in `to_zaml'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/zaml.rb:260:in `each_pair'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/zaml.rb:260:in `to_zaml'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/zaml.rb:38:in `nested'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/zaml.rb:256:in `to_zaml'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/zaml.rb:90:in 
`first_time_only'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/zaml.rb:255:in `to_zaml'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/zaml.rb:138:in `to_zaml'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/zaml.rb:134:in `each'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/zaml.rb:134:in `to_zaml'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/zaml.rb:38:in `nested'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/zaml.rb:129:in `to_zaml'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/zaml.rb:90:in 
`first_time_only'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/zaml.rb:127:in `to_zaml'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/zaml.rb:22:in `dump'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/monkey_patches.rb:25:in 
`to_yaml'
        from (irb):2irb(main):003:0> 
irb(main):004:0* 
</pre>

The reason for wanting to do this is something or other with how Foreman stores 
reports, I just thought I'd log this error anyway as it's something isolated 
and weird I noticed in the Zaml code.

I confirmed against 0.25.4 this does not happen, its only 0.25.5


-- 
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://projects.puppetlabs.com/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