[ovs-dev] [PATCH] ovsdb-cs: Avoid unnecessary re-connections when updating remotes.

Dumitru Ceara dceara at redhat.com
Tue Jun 29 11:45:06 UTC 2021

On 6/29/21 12:56 PM, Ilya Maximets wrote:
> If a new database server added to the cluster, or if one of the
> database servers changed its IP address or port, then you need to
> update the list of remotes for the client.  For example, if a new
> OVN_Southbound database server is added, you need to update the
> ovn-remote for the ovn-controller.
> However, in the current implementation, the ovsdb-cs module always
> closes the current connection and creates a new one.  This can lead
> to a storm of re-connections if all ovn-controllers will be updated
> simultaneously.  They can also start re-dowloading the database
> content, creating even more load on the database servers.
> Correct this by saving an existing connection if it is still in the
> list of remotes after the update.
> 'reconnect' module will report connection state updates, but that
> is OK since no real re-connection happened and we only updated the
> state of a new 'reconnect' instance.
> If required, re-connection can be forced after the update of remotes
> with ovsdb_cs_force_reconnect().
> Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
> ---

I tried it out and it works fine; the code looks OK to me:

Acked-by: Dumitru Ceara <dceara at redhat.com>


More information about the dev mailing list