[ovs-git] [openvswitch/ovs] dbb5ec: ovs-lib: dont't purge corrupted DB

GitHub noreply at github.com
Fri Nov 3 21:49:58 UTC 2017


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: dbb5ecb4bed1e206ff7be9235a9bc7c6ea32b836
      https://github.com/openvswitch/ovs/commit/dbb5ecb4bed1e206ff7be9235a9bc7c6ea32b836
  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