[Ovirt-devel] [PATCH] Fix bug in host-status.

Perry N. Myers pmyers at redhat.com
Wed Jul 30 21:13:39 UTC 2008


Ian Main wrote:
> This patch fixes a bug in host-status that can cause it to backtrace and die.
> If the number of processes forked was low enough it would wait for a process that
> was never fork'd and die.

ACK

> Signed-off-by: Ian Main <imain at redhat.com>
> ---
>  wui/src/host-status/host-status.rb |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/wui/src/host-status/host-status.rb b/wui/src/host-status/host-status.rb
> index 7908da7..d28f46f 100755
> --- a/wui/src/host-status/host-status.rb
> +++ b/wui/src/host-status/host-status.rb
> @@ -210,6 +210,11 @@ loop do
>  
>      p_count += 1
>  
> +    fork do
> +      check_status(host)
> +      exit 0
> +    end
> +
>      # Only allow up to n_hosts / 5 processes running at a time.  If we go above this
>      # Then we wait for one to exit before continuing.  This guarantees it will take
>      # at most 5 timeouts to check all hosts.
> @@ -218,11 +223,6 @@ loop do
>        p_count -= 1
>      end
>  
> -    fork do
> -      check_status(host)
> -      exit 0
> -    end
> -
>    end
>  
>    while p_count > 0

-- 
|=-        Red Hat, Engineering, Emerging Technologies, Boston        -=|
|=-                     Email: pmyers at redhat.com                      -=|
|=-         Office: +1 412 474 3552   Mobile: +1 703 362 9622         -=|
|=- GnuPG: E65E4F3D 88F9 F1C9 C2F3 1303 01FE 817C C5D2 8B91 E65E 4F3D -=|




More information about the ovirt-devel mailing list