- From: Erik Hollensbe <
>
- To: Steven Danna <
>
- Cc: <
>
- Subject: [chef-dev] Re: Re: Fwd: How do I know if my application has really been "provisioned"? a suggestion
- Date: Sun, 9 Dec 2012 11:50:39 -0800
On Dec 9, 2012, at 11:32 AM, Steven Danna
<
>
wrote:
>
-1 Internet for me. Apologies for the duplicate emails Bryan, sending
>
this to the whole list now.
>
>
On 12/9/12 11:14 AM, Bryan Berry wrote:
>
>
> I think that your example above could work for a lot of use cases and
>
> I could definitely could see myself using. However, it doesn't really
>
> apply to the specific use case I have in mind. I need chef to loop for
>
> a maximum specified timeout value, checking if a condition is true.
>
> For example, starting a JBoss instance that uses the standalone-full
>
> configuration will take around 20 seconds to start. A one-time check
>
> after an indeterminate period will not be sufficient for my needs.
>
>
I'm wondering if, rather than tying this to the service resource in
>
particular, a "lock" resource might be more useful. The API might look
>
something like:
>
>
lock "wait for foobar" do
>
until { some_ruby_code}
>
timeout 30 # default to nil to never timeout
>
end
>
>
lock "wait for wombats" do
>
until "some shell command"
>
end
>
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.
-Erik
Archive powered by MHonArc 2.6.16.