On 25.12.2018 20:51, Ilya Maximets wrote:
> If attempt to open non-blocking connection results with EINPROGRESS,
> further polling will trigger DISCONNECT action in case of failures.
> While handling this action, jsonrpc python library closes the
> connection but does not change the current remote. This leads to
> subsequent connection to the same remote. And the story starts from
> the beginning producing infinite attempts to connect to a single
> remote regardless of existense of others. Like this:
> 
>  reconnect | DBG | tcp:127.0.0.1:45932: entering BACKOFF
>  reconnect | INFO | tcp:127.0.0.1:45932: connecting...
>  reconnect | DBG | tcp:127.0.0.1:45932: entering CONNECTING
>  poller | DBG | 999-ms timeout
>  reconnect | INFO | tcp:127.0.0.1:45932: connection attempt timed out
>  reconnect | DBG | tcp:127.0.0.1:45932: entering BACKOFF
>  poller | DBG | 0-ms timeout
>  reconnect | INFO | tcp:127.0.0.1:45932: connecting...
>  <...>
>  reconnect | DBG | tcp:127.0.0.1:45932: entering CONNECTING
>  poller | DBG | 1999-ms timeout
>  reconnect | INFO | tcp:127.0.0.1:45932: connection attempt timed out
>  reconnect | INFO | tcp:127.0.0.1:45932: waiting 4 seconds before reconnect
>  reconnect | DBG | tcp:127.0.0.1:45932: entering BACKOFF
>  <...>
> 
> Fix that by always picking the new remote on disconnect.
> This mimics the behaviour of jsonrpc C library.
> 
> Fixes "multiple remotes" tests on FreeBSD.
> 
> CC: Numan Siddique <[email protected]>
> Fixes: 31e434fc985c ("python jsonrpc: Allow jsonrpc_session to have more than 
> one remote.")
> Signed-off-by: Ilya Maximets <[email protected]>
> ---

I re-sent this patch as part of the patch-set:
 https://mail.openvswitch.org/pipermail/ovs-dev/2018-December/354756.html

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to