On Friday, February 7, 2014 3:57:00 AM UTC-6, Brice Figureau wrote: > > In this specific bug, I'm wondering if we really need to have those > defined type as resources in the RAL catalog (I believe it might be used > for relationship or event propagation). >
I suspect that defined type instances could be removed from the catalog by replacing them with the collections of resources the represent (recursively). However, I would expect that to cause an explosion in the number of relationships (both signaling and non-signaling) that must appear in the catalog. > If we really do, we might be able to flag those as "defined type" and > then skip compound parsing title (because compound titles can only > happen on ruby/builtins types and is the root cause of trying to find > the 'defined type' type). > I think marking resources of defined type is a fine idea. I particularly like that it closes a potential vulnerability wherein Puppet could be induced to load a native plugin (or anything else if the name and location were right) instead of the intended type. I am uncertain whether this would require an incompatible change to the catalog format. At first I thought so, but now I'm leaning the other way. > This would allow us to prevent calling P::R#resource_type in the agent, > at the expense of having a new flag in the resource (which also means > more information in the transferred catalog and incompatibilities and so > on). > > Any more ideas on how to solve this issue? > > Even without marking defined type instances in the catalog, couldn't Puppet be made to enter each un-found type into known_resource_types as a defined type? At least when running as the agent? Combined with reordering the tests as suggested, that could improve the situation for the agent by avoiding searching multiple times for any type, similar to how a separate negative cache could do. John -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/c0622e0c-2241-4927-93b1-5413f00ee5d2%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.