[ovs-git] [openvswitch/ovs] 7985a1: ovs-lib: dont't purge corrupted DB
GitHub
noreply at github.com
Fri Nov 3 21:50:31 UTC 2017
Branch: refs/heads/branch-2.8
Home: https://github.com/openvswitch/ovs
Commit: 7985a1709b24a732f96c4f616ea025d2e12fb714
https://github.com/openvswitch/ovs/commit/7985a1709b24a732f96c4f616ea025d2e12fb714
Author: Matteo Croce <mcroce at redhat.com>
Date: 2017-11-03 (Fri, 03 Nov 2017)
Changed paths:
M utilities/ovs-lib.in
Log Message:
-----------
ovs-lib: dont't purge corrupted DB
In ovs-lib there is a function named upgrade_db which tries to convert a
database after OVS {up,down}grades. This function uses ovsdb-tool to
check if the DB needs to be upgraded. If the upgrade fails,
it purges the DB and create an empty one.
ovsdb-tool returns "yes" or "no" to indicate if the DB needs upgrading,
but if the DB is corrupted it returns a list of errors.
Change a condition from "!= no" to "= yes" because in case of DB
corruption upgrade_db would purge the existing DB without writing
anything in the logs.
Signed-off-by: Matteo Croce <mcroce at redhat.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>
Acked-by: Mark Michelson <mmichels at redhat.com>
More information about the git
mailing list