So ...

> servermd5 = YAML.load(apitruthtag("metadata")).ivars["checksum"] #
> When executed from a puppet run I tells me that ivars is undefined.

What does the output of apitruthtag("metadata") show you between each
run in facter, irb and puppet? Can you output each to a file and
analyze the difference?

> irb, ruby, or facter:
> yaml parsed http response = #<YAML::Object:0x2ada01f7cf00>
>
> puppet run:
> yaml parsed http response = #<Puppet::FileServing::Metadata:
> 0x2ac7987b9c08>
> with error:
>
> undefined method `ivars' for #<Puppet::FileServing::Metadata:
> 0x2ac7987152c0>
> #<NoMethodError: undefined method `ivars' for
> #<Puppet::FileServing::Metadata:0x2ac7987152c0>>

So when you run it with all the Puppet libraries the YAML object is
being serialized back into a Ruby object Puppet::FileServing::Metadata
... I'm really curious what the raw YAML output looks like. This
should only happen I think if the YAML output has meta information
that matches that class type for example:

 ---
!ruby/object:Puppet::FileServing::Metadata {}

I get the feeling the YAML you are getting back isn't what you were
expecting and looking at the contents of the raw output might give a
better clue as to why.

ken.

-- 
"Join us for PuppetConf, September 22nd and 23rd in Portland, OR:
http://bit.ly/puppetconfsig";

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to