diff mbox series

[ovs-dev] ovs-lib: Add timeout at ovs-check-dead-ifs.

Message ID 1566584892-2234-1-git-send-email-u9012063@gmail.com
State Superseded
Headers show
Series [ovs-dev] ovs-lib: Add timeout at ovs-check-dead-ifs. | expand

Commit Message

William Tu Aug. 23, 2019, 6:28 p.m. UTC
At SUSE12 SP3, we hit a case where ovs-check-dead-ifs tries to read
an entry in /proc/<pid>/fd/<some fd> but hangs forever.  The pid is
a qemu-system-x86_64 process and we suspect it's an issue related to
qemu, not ovs.  As a result, force-reload-kmod hangs and OVS bridge
never gets restarted. This patch adds a timeout of 5-seconds to
ovs-check-dead-ifs.

VMware-BZ: #2408059
Signed-off-by: William Tu <u9012063@gmail.com>
Cc: Ashish Varma <ashishvarma.ovs@gmail.com>
Cc: Gurucharan Shetty <guru@ovn.org>
---
 utilities/ovs-lib.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Gurucharan Shetty Aug. 27, 2019, 5:21 p.m. UTC | #1
On Fri, 23 Aug 2019 at 11:29, William Tu <u9012063@gmail.com> wrote:

> At SUSE12 SP3, we hit a case where ovs-check-dead-ifs tries to read
> an entry in /proc/<pid>/fd/<some fd> but hangs forever.  The pid is
> a qemu-system-x86_64 process and we suspect it's an issue related to
> qemu, not ovs.  As a result, force-reload-kmod hangs and OVS bridge
> never gets restarted. This patch adds a timeout of 5-seconds to
> ovs-check-dead-ifs.
>
> VMware-BZ: #2408059
> Signed-off-by: William Tu <u9012063@gmail.com>
> Cc: Ashish Varma <ashishvarma.ovs@gmail.com>
> Cc: Gurucharan Shetty <guru@ovn.org>
> ---
>  utilities/ovs-lib.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in
> index fa840ec637f5..4cdc2a6d5d22 100644
> --- a/utilities/ovs-lib.in
> +++ b/utilities/ovs-lib.in
> @@ -653,7 +653,7 @@ force_reload_kmod () {
>
>      restore_interfaces
>
> -    "$datadir/scripts/ovs-check-dead-ifs"
> +    timeout 5 "$datadir/scripts/ovs-check-dead-ifs"
>
If there is a timeout, the exit status of the "force-reload-kmod" command
will be non-zero. That may fail some installations.

How about:

action "Finding processes on dead interfaces" timeout 5
"$datadir/scripts/ovs-check-dead-ifs" || true

 }
>
>  ## ------- ##
> --
> 2.7.4
>
>
William Tu Aug. 27, 2019, 5:33 p.m. UTC | #2
On Tue, Aug 27, 2019 at 10:21 AM Guru Shetty <guru@ovn.org> wrote:
>
>
>
> On Fri, 23 Aug 2019 at 11:29, William Tu <u9012063@gmail.com> wrote:
>>
>> At SUSE12 SP3, we hit a case where ovs-check-dead-ifs tries to read
>> an entry in /proc/<pid>/fd/<some fd> but hangs forever.  The pid is
>> a qemu-system-x86_64 process and we suspect it's an issue related to
>> qemu, not ovs.  As a result, force-reload-kmod hangs and OVS bridge
>> never gets restarted. This patch adds a timeout of 5-seconds to
>> ovs-check-dead-ifs.
>>
>> VMware-BZ: #2408059
>> Signed-off-by: William Tu <u9012063@gmail.com>
>> Cc: Ashish Varma <ashishvarma.ovs@gmail.com>
>> Cc: Gurucharan Shetty <guru@ovn.org>
>> ---
>>  utilities/ovs-lib.in | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in
>> index fa840ec637f5..4cdc2a6d5d22 100644
>> --- a/utilities/ovs-lib.in
>> +++ b/utilities/ovs-lib.in
>> @@ -653,7 +653,7 @@ force_reload_kmod () {
>>
>>      restore_interfaces
>>
>> -    "$datadir/scripts/ovs-check-dead-ifs"
>> +    timeout 5 "$datadir/scripts/ovs-check-dead-ifs"
>
> If there is a timeout, the exit status of the "force-reload-kmod" command will be non-zero. That may fail some installations.
>
> How about:
>
> action "Finding processes on dead interfaces" timeout 5 "$datadir/scripts/ovs-check-dead-ifs" || true
>
OK, thanks!

I will send v2 with this change.
William

>>  }
>>
>>  ## ------- ##
>> --
>> 2.7.4
>>
diff mbox series

Patch

diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in
index fa840ec637f5..4cdc2a6d5d22 100644
--- a/utilities/ovs-lib.in
+++ b/utilities/ovs-lib.in
@@ -653,7 +653,7 @@  force_reload_kmod () {
 
     restore_interfaces
 
-    "$datadir/scripts/ovs-check-dead-ifs"
+    timeout 5 "$datadir/scripts/ovs-check-dead-ifs"
 }
 
 ## ------- ##