[Ovirt-devel] [PATCH] generalized wait_for_service
Perry N. Myers
pmyers at redhat.com
Wed Jul 2 11:32:03 UTC 2008
Alan Pevec wrote:
> Jeff Schroeder wrote:
>> On Tue, Jul 1, 2008 at 2:56 PM, Alan Pevec <apevec at redhat.com> wrote:
>>> service (libvirtd in this case) was assumed to be ready immediately
>>> after
>>> startup, which wasn't guaranteed.
>>> I generalized waiting loop w/ timeout we had for postgres to a shell
>>> function, so it can be used where needed.
>>>
>>> SYNOPSIS: wait_for_service 'test command' n_retries
>>> seconds_to_sleep_between_retries
>>>
>>
>> We really need to decide on if bashisms are ok or not. Jim is against
>> them,
>> danpb is for them, I would prefer not to use them, and patches full of
>> them
>> are flying around. declare is bash specific as far as I know. Good
>> idea for
>> this patch and it looks solid.
>>
>> Either we allow patches with bashism or not. Which is it?
>
> The goal of my patch was to factor out the existing code, introducing
> minimal changes.
> In general, portability is a noble goal but in scripts which have
> #!/bin/bash bashism is correct, and bash is available everywhere -
> apt-get install bash :)
>
> It should be pragmatic not political decision whether it's worth it to
> replace all bashism we have and change the shebang shell or we have
> other things to do?
> IMO best way to proceed is to fix as we go: you, Jim and everybody else
> concerned about portability, keep an eye on new patches and NACK them if
> you spot non-portal construct.
> In this case, I'll gladly take Jim's fixed, portable version.
> As always, patches are welcome!
I agree with this approach. Portability is a concern, but since bash is
fairly prevalent we can fix as we go.
Perry
More information about the ovirt-devel
mailing list