2
0
mirror of https://github.com/openvswitch/ovs synced 2025-09-05 00:35:33 +00:00

python: idl: Allow retry even when using a single remote.

As described in commit [1], it's possible that remote IP is backed by
a load-balancer and re-connection to this same IP will lead to
connection to a different server.  This case is supported for C version
of IDL and should be supported in a same way for python implementation.

[1] ca367fa5f8 ("ovsdb-idl.c: Allows retry even when using a single remote.")

Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Acked-by: Dumitru Ceara <dceara@redhat.com>
This commit is contained in:
Ilya Maximets
2021-06-10 18:47:14 +02:00
parent 04f8881f57
commit c5a58ec155
3 changed files with 14 additions and 5 deletions

View File

@@ -777,8 +777,7 @@ class Idl(object):
% (session_name, self._db.name))
return False
if (database.model == CLUSTERED and
self._session.get_num_of_remotes() > 1):
if database.model == CLUSTERED:
if not database.schema:
vlog.info('%s: clustered database server has not yet joined '
'cluster; trying another server' % session_name)