On Tuesday, July 17, 2012 12:35:34 PM UTC-5, Jo wrote:
>
> On Jul 17, 2012, at 6:30 AM, jcbollinger wrote:
>
> Apparently so.  I don't want to drag this thread off into a rehash of the 
> constraints idea, but one of the central ideas is that it allows 
> cooperative specification of resource properties.  Constraints -- as I 
> envision them -- are not a dynamic validation feature, but rather an 
> indirect, deferred declaration feature.  In many cases, explicit resource 
> declarations could be replaced by one or more constraints on the same 
> resource, which could appear anywhere in the manifest set.  Everything gets 
> resolved after all resources are compiled.
>
>
> Sounds like treating hiera data as virtualized to me (and sounds like a 
> functional way to deal with the issues we are discussing).  How would you 
> implement this today?
>

And now I'm breaking my promise, but it *is* your thread... 

The resource constraints idea has no direct relationship to hiera.  There's 
no reason why the two shouldn't interoperate, but neither depends on the 
other.

I am not at all sure there is a clean way to build it on the (intended) 
extension points available today, however.  As I conceive it, it involves a 
catalog tweaking step between initial compilation and delivery to the 
agent, and as such it would require modifications to the Puppet core.  
Perhaps one could approximate it, however.  The most likely way I can think 
of to do that involves custom functions.

At least two functions would be needed: one to cache data somewhere in the 
master (invoked potentially many times) and one to read back and apply that 
data (probably called fewer times, and very late in the compilation -- such 
as in a final run stage).  I apologize for how abstract and vague that 
description is, but there is a great deal more design effort needed than I 
am prepared to exert at the moment.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/TQBINg-GU4MJ.
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