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


Chronological Thread 
  • From: Bryan Berry < >
  • To: Erik Hollensbe < >
  • Cc: Steven Danna < >,
  • Subject: [chef-dev] Re: Re: Re: Fwd: How do I know if my application has really been "provisioned"? a suggestion
  • Date: Sun, 9 Dec 2012 21:38:16 +0100

Dear PeterD,

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.

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.

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
manage the possibility of trying to run several superslow J2EE recipes
on a single machine.  This might be premature optimization but the
extra engineering effort to write a wait_handler isn't that
significant.

On Sun, Dec 9, 2012 at 9:08 PM, Erik Hollensbe 
< >
 wrote:
>
> On Dec 9, 2012, at 11:57 AM, Steven Danna 
> < >
>  wrote:
>
>> On 12/9/12 11:50 AM, Erik Hollensbe wrote:
>>
>>>
>>> This isn't really a lock though -- nothing's setting a lock and nothing's 
>>> waiting for a set lock.
>>>
>>> This would work fine if it was named 'wait' or 'timeout' though, as it 
>>> communicates what you're actually doing.
>>
>> Completely agree.  'Lock' is the wrong name, 'wait' makes more sense.
>
> Here ya go -- untested, but the resource is called 'wait_until' and should 
> work because all it really does is wrap timeout.
>
> https://github.com/erikh/chef-wait



Archive powered by MHonArc 2.6.16.

§