[chef-dev] Re: Re: Re: Re: Fwd: How do I know if my application has really been "provisioned"? a suggestion


Chronological Thread 
  • From: Peter Donald < >
  • Cc:
  • Subject: [chef-dev] Re: Re: Re: Re: Fwd: How do I know if my application has really been "provisioned"? a suggestion
  • Date: Mon, 10 Dec 2012 07:59:21 +1100

Hi,

On Mon, Dec 10, 2012 at 7:38 AM, Bryan Berry < " target="_blank"> > wrote:
I have to disagree w/ the approach to change the init script to block
until the satisfied condition has been reached.  99% of the time I
want a call to restart a service to return quickly. Only 1% of the
time, usually during some kind of orchestration activity or testing
activity, that I want to block for desired state that indicates the
action is fully completed.

I guess it depends on your use case. In most of the scenarios where we have implemented this "wait til up for some definition of up" behaviour it is because it is expected that chef will interact with the underlying service again. i.e. When we bring up a glassfish domain, we immediately configure it with LWRPs and these LWRPs talk across the wire using a custom admin protocol - thus if glassfish is not up, the LWRP would fail. 

For other services where this is not a requirement we don't bother waiting after starting the service. 

Even more so, I don't want to actually block all of Chef until this
desired state is reached. there may be additional resources that i
want to continue to be processed after the service is started. for
example, cron tasks to clean up log files and collectd plugins to be
configured to monitor my giant, slow-ass J2EE service.  checking for
the :until condition to be met should be deferred until the end of the
chef run or at least b4 other handlers run, like
minitest-chef-handler. A chef_handler is the correct place for them to
live.

It would be nice if chef allowed to to converge recipes/resources in parallel where possible and even the possibility of futures to join against when you wanted to wait between resources however that would significantly increase the complexity of chef.
 
erikh's wait lwrp might do the job. However, I want there to be the
possibility to have multiple wait resources in chef run. I can easily

We do this aswell ... and use similar terminology  ;)


It ultimately depends on how you interact with the service within the chef converge phase.

--
Cheers,

Peter Donald



Archive powered by MHonArc 2.6.16.

§