summaryrefslogtreecommitdiff
path: root/ovsdb/ovsdb-server.c
diff options
context:
space:
mode:
authorAndy Zhou <azhou@ovn.org>2017-02-07 19:38:13 -0800
committerAndy Zhou <azhou@ovn.org>2017-02-13 12:01:10 -0800
commitac5d315cd83a1b6a3610c0ddf2ffc847250b783d (patch)
treea8bf50867d3436ed124e588d734fa74b2185a8d1 /ovsdb/ovsdb-server.c
parent65121e65a7ea88432e3a8e6f02e8c3d4c1b5ce37 (diff)
downloadopenvswitch-ac5d315cd83a1b6a3610c0ddf2ffc847250b783d.tar.gz
ovsdb: Gracefully handle replication errors.
Sometimes replication session can fail mostly due to replication configurations. i.e. replicating from a database with a different version of the schema. Currently, those errors are treated as fatal errors, and stops the OVSDB server. A better way to handle those error may be to stop only the replication session, and leave the OVSDB server up, so that the replication can be restarted, may be with a different configuration, at a later time. Signed-off-by: Andy Zhou <azhou@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ovsdb/ovsdb-server.c')
-rw-r--r--ovsdb/ovsdb-server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c
index 1b0060bff..9b669c90a 100644
--- a/ovsdb/ovsdb-server.c
+++ b/ovsdb/ovsdb-server.c
@@ -199,8 +199,8 @@ main_loop(struct ovsdb_jsonrpc_server *jsonrpc, struct shash *all_dbs,
if (*is_backup) {
replication_run();
if (!replication_is_alive()) {
- int retval = replication_get_last_error();
- ovs_fatal(retval, "replication connection failed");
+ disconnect_active_server();
+ *is_backup = false;
}
}