Ordinarily the IDL finds out in advance whether a particular database is on its server, or it finds out via notifications. But it's also a good idea to adopt a belt-and-suspenders approach so that, if the IDL does receive an "unknown database" error, we treat it as a "soft" error that can be fixed by reconnecting to another server, rather than a "hard" error that should cause an immediate abort.
Signed-off-by: Ben Pfaff <[email protected]> --- lib/ovsdb-idl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c index a1f246d6f7b7..a7274dea2a8b 100644 --- a/lib/ovsdb-idl.c +++ b/lib/ovsdb-idl.c @@ -4686,6 +4686,10 @@ ovsdb_idl_db_txn_process_reply(struct ovsdb_idl_db *db, if (error->type == JSON_STRING) { if (!strcmp(error->string, "timed out")) { soft_errors++; + } else if (!strcmp(error->string, + "unknown database")) { + ovsdb_idl_retry(db->idl); + soft_errors++; } else if (!strcmp(error->string, "not owner")) { lock_errors++; } else if (!strcmp(error->string, "not allowed")) { -- 2.16.1 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
