On 26/04/09 2:29, Luke Kanies wrote:
> On Apr 25, 2009, at 5:49 PM, Brice Figureau wrote:
>
>> On 25/04/09 1:10, Luke Kanies wrote:
>>> Unfortunately, again because of a Ruby bug
>>> (http://rubyforge.org/tracker/?group_id=426&atid=1698&func=detail&aid=8886
>>> )
>>> Ruby can't print yaml that it can read, if custom
>>> classes are used as keys in hashes, which Sets use internally.
>> Note, that I can trigger the same issue but with the VertexWrapper in
>> and out Sets in relation to RelationShip:
>>
>> ...
>> vertices:
>> *id002: !ruby/object:Puppet::SimpleGraph::VertexWrapper
>> adjacencies:
>> :out: {}
>>
>> :in:
>> *id003: !ruby/object:Set
>> hash:
>> &id004 !ruby/object:Puppet::Relationship ?
>> ------------------^
>> not good!
Basically, this is invalid yaml, it should have been written:
? &id004 !ruby/object:Puppet::Relationship
>> source: *id003
>> target: *id002
>> : true
>>
>> vertex: *id002
>> ...
>
> Even with this patch applied?
Yes, otherwise I wouldn't have posted this mail :-)
Please see my mail:
[Puppet-dev] [PATCH 1/1] Fix-up incorrectly generated yaml
for a relatively safe fix-up/workaround for this bug.
I don't expect ruby to automagically fix this issue as they didn't move
in 2 years the bug was reported, so basically the ball is in our camp to
fix this.
>> And it seems --catalog_format doesn't exist anynore in 0.25, is that
>> right?
>
>
> Right; we have a general serialization system now as part of the
> Indirector (Puppet::Network::Format*), and the format is essentially
> chosen automatically but you can set a preferred serialization format
> for all types that serialize (e.g., not files). The new option is,
> creatively, --preferred_serialization_format=<foo>.
OK. If you don't want to fix-up the produced yaml, then I suggest a
switch to Marshal for the catalog indirection if it is possible.
--
Brice Figureau
Days of Wonder
http://www.daysofwonder.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Developers" 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-dev?hl=en
-~----------~----~----~----~------~----~------~--~---