diff options
author | Daniel Alvarez <dalvarez@redhat.com> | 2019-07-09 12:16:30 +0200 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2019-07-10 13:05:56 -0700 |
commit | 2a9679e3b2c6fde74ddae362d88ba16db7fbfc38 (patch) | |
tree | d5bf4101c1e6f8ea94766ed78bc7cfe334f5ea50 /ovsdb | |
parent | 183b5bba434d7e1d8f3eef9565ad0ca06d28dfad (diff) | |
download | openvswitch-2a9679e3b2c6fde74ddae362d88ba16db7fbfc38.tar.gz |
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 <dalvarez@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ovsdb')
-rw-r--r-- | ovsdb/jsonrpc-server.c | 2 |
1 files changed, 1 insertions, 1 deletions
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")); |