Use catalogs from PuppetDB

47 views
Skip to first unread message

Raphaël Pinson

unread,
Jul 2, 2015, 5:46:25 AM7/2/15
to puppe...@googlegroups.com
Hello,


I've been trying to use the catalogs stored in the PuppetDB to make the puppet-catalog-diff tool faster (instead of recompiling). 

However, the catalogs are munged before being stored in the PuppetDB, so this does not work.

Is there a way to transform PuppetDB catalogs back to standard catalogs?



Regards,

Raphaël 

Ken Barber

unread,
Jul 2, 2015, 8:20:07 AM7/2/15
to puppe...@googlegroups.com
Nothing that we've ever written mate, maybe someone else might have
done something. The transformation starts here, so you can probably
reverse it: https://github.com/puppetlabs/puppetdb/blob/master/puppet/lib/puppet/indirector/catalog/puppetdb.rb#L12

In an ideal world both formats should be same/similar to avoid this altogether.

ken.

Luke Kanies

unread,
Jul 2, 2015, 12:21:47 PM7/2/15
to puppe...@googlegroups.com
The format Puppet uses for transferring catalogs has a lot of issues, and PuppetDB is optimizing out a lot of the data in it, so neither format is quite right.  We've got long-term goals of replacing both with a canonical format, but I think we're a ways away from that.


--

Raphaël Pinson

unread,
Jul 6, 2015, 5:55:21 AM7/6/15
to puppe...@googlegroups.com


On Thursday, July 2, 2015 at 2:20:07 PM UTC+2, Ken Barber wrote:
> I've been trying to use the catalogs stored in the PuppetDB to make the
> puppet-catalog-diff tool faster (instead of recompiling).
>
> However, the catalogs are munged before being stored in the PuppetDB, so
> this does not work.
>
> Is there a way to transform PuppetDB catalogs back to standard catalogs?

Nothing that we've ever written mate, maybe someone else might have
done something. The transformation starts here, so you can probably
reverse it: https://github.com/puppetlabs/puppetdb/blob/master/puppet/lib/puppet/indirector/catalog/puppetdb.rb#L12


Yes, I did find that code. It seems to me though that some of these changes might not be easily reversible.


Reply all
Reply to author
Forward
0 new messages