• Matteo Croce's avatar
    ovs-lib: dont't purge corrupted DB · dbb5ecb4
    Matteo Croce authored
    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: default avatarMatteo Croce <mcroce@redhat.com>
    Signed-off-by: default avatarBen Pfaff <blp@ovn.org>
    Acked-by: default avatarMark Michelson <mmichels@redhat.com>
    dbb5ecb4
ovs-lib.in 13.8 KB