From 15eefe928ea2a51c7ad03356821f0665ca6abb6d Mon Sep 17 00:00:00 2001 From: Ilya Maximets Date: Thu, 21 Jan 2021 20:23:27 +0100 Subject: [PATCH] ovn-ctl: Add support for ovsdb-server --disable-file-column-diff. There is a change of a database file format in OVS version 2.15 that doesn't allow older versions of ovsdb-server to read the database file modified by the ovsdb-server version 2.15 or later. This also affects runtime communications between servers in active-backup and cluster service models. For the upgrade scenario OVS introduced special command line argument for ovsdb-server: --disable-file-column-diff. More datails in ovsdb(7) or here: https://docs.openvswitch.org/en/latest/ref/ovsdb.7/#upgrading-from-version-2-14-and-earlier-to-2-15-and-later In order to support upgrades of OVN databases introducing new option '--ovsdb-disable-file-column-diff' for ovn-ctl script that will pass aforementioned argument to ovsdb-server processes. To simplify upgrades for users, ovn-ctl will add requested argument to ovsdb-server only if ovsdb-server actually supports it. Signed-off-by: Ilya Maximets Acked-by: Han Zhou Signed-off-by: Numan Siddique (cherry-picked from upstream master commit 668b0d02aeff42d361bad36c2b247195c8d2c6f0) Change-Id: Id5a70bd76f24f13ab0357f8e3c40159f77bc3141 --- utilities/ovn-ctl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/utilities/ovn-ctl b/utilities/ovn-ctl index c44201ccf..211c764a6 100755 --- a/utilities/ovn-ctl +++ b/utilities/ovn-ctl @@ -251,6 +251,11 @@ $cluster_remote_port [ "$OVN_USER" != "" ] && set "$@" --user "$OVN_USER" + if test X"$OVSDB_DISABLE_FILE_COLUMN_DIFF" = Xyes; then + (ovsdb-server --help | grep -q disable-file-column-diff) \ + && set "$@" --disable-file-column-diff + fi + if test X"$detach" != Xno; then set "$@" --detach --monitor else @@ -715,6 +720,8 @@ set_defaults () { OVSDB_NB_WRAPPER= OVSDB_SB_WRAPPER= + OVSDB_DISABLE_FILE_COLUMN_DIFF=no + OVN_USER= OVN_CONTROLLER_LOG="-vconsole:emer -vsyslog:err -vfile:info" @@ -932,6 +939,11 @@ Options: --ovs-user="user[:group]" pass the --user flag to ovs daemons --ovsdb-nb-wrapper=WRAPPER run with a wrapper like valgrind for debugging --ovsdb-sb-wrapper=WRAPPER run with a wrapper like valgrind for debugging + --ovsdb-disable-file-column-diff=no|yes + Specifies whether or not ovsdb-server + processes should be started with + --disable-file-column-diff. + More details in ovsdb(7). (default: no) -h, --help display this help message File location options: -- 2.29.2