[chef] Re: Re: wait attribute for execute resource


Chronological Thread 
  • From: Daneel Yaitskov < >
  • To:
  • Subject: [chef] Re: Re: wait attribute for execute resource
  • Date: Sat, 30 Nov 2013 00:14:18 +0400

I'm not good at English. I used analogy with not_if.
Execute resource already have timeout attribute.


On Fri, Nov 29, 2013 at 11:34 PM, Adam Jacob < " target="_blank"> > wrote:

Maybe wait_for rather than if? Also, going to need to control timeout for the wait to avoid deadlocks.

On Nov 29, 2013 11:27 AM, "Daneel Yaitskov" < " target="_blank"> > wrote:
Hi,

What do you think about another attribute for the execute resource?
It's wait or while.

Some processes as virsh start is async.
Using second execute resource is not short.

Example:

execute "virsh shutdown #{ name }" do
   only_if "virsh domstate #{ name } | grep -c running"
end

execute "while virsh domstate #{ name } | grep -q running ; do : ; done"

but with new attribute it could be

execute "virsh shutdown #{ name }" do
   only_if "virsh domstate #{ name } | grep -c running"
   wait_if  "virsh domstate #{ name } | grep -q running"
end




--
Daneel S. Yaitskov



--
Daneel S. Yaitskov



Archive powered by MHonArc 2.6.16.

§