On Tue, Oct 15, 2013 at 1:50 PM, Nick Lewis <n...@puppetlabs.com> wrote:

> If, in the course of implementing this, you happen to find it easy to
> implement an easy way to delay resources that might not be "ready", that
> would be awesome, too.  That is, if there were a hook similar to those
> below that could be used to see if a resource is ready to run, then
> resources that aren't ready could be put into the back of the queue.  This
> would be useful for things like waiting to bring up services until a remote
> required service is ready.
>
> Assuming I'm understanding correctly, this actually already basically
> happens. Resources have a "suitable?" method, which currently just checks
> whether the resource has a provider available. If the next unblocked (all
> dependencies evaluated) resource in the list isn't suitable, it will be
> deferred until the rest of the resources have been processed. Once there
> are no more unblocked resources to process, the deferred resources are
> queued up again. Repeat until we're either done or don't make progress in
> an iteration (in which case we fail).
>

The main difference is we currently expect readiness to be resolved simply
by applying resources. If we end up in a state where there are no ready
resources left we can say that you made some sort of mistake and the
catalog failed. If checking for readiness involves waiting on something
external then we have timeouts and external state dependencies and we have
to answer some harder questions about when to fail.

-- 
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 post to this group, send email to puppet-dev@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-dev.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to