From 2a9679e3b2c6fde74ddae362d88ba16db7fbfc38 Mon Sep 17 00:00:00 2001 From: Daniel Alvarez Date: Tue, 9 Jul 2019 12:16:30 +0200 Subject: ovsdb-server: drop all connections on read/write status change Prior to this patch, only db change aware connections were dropped on a read/write status change. However, current schema in OVN does not allow clients to monitor whether a particular DB changes this status. In order to accomplish this, we'd need to change the schema and adapting ovsdb-server and existing clients. Before tackling that, this patch is changing ovsdb-server to drop *all* the existing connections upon a read/write status change. This will force clients to reconnect and honor the change. Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2019-July/048981.html Signed-off-by: Daniel Alvarez Signed-off-by: Ben Pfaff --- ovsdb/jsonrpc-server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ovsdb') diff --git a/ovsdb/jsonrpc-server.c b/ovsdb/jsonrpc-server.c index 4dda63a9d..ddbbc2e94 100644 --- a/ovsdb/jsonrpc-server.c +++ b/ovsdb/jsonrpc-server.c @@ -365,7 +365,7 @@ ovsdb_jsonrpc_server_set_read_only(struct ovsdb_jsonrpc_server *svr, { if (svr->read_only != read_only) { svr->read_only = read_only; - ovsdb_jsonrpc_server_reconnect(svr, false, + ovsdb_jsonrpc_server_reconnect(svr, true, xstrdup(read_only ? "making server read-only" : "making server read/write")); -- cgit v1.2.1