[ovs-dev] [PATCH ovn] ovn-ctl: Add support for ovsdb-server --disable-file-column-diff.

Ilya Maximets i.maximets at ovn.org
Thu Jan 21 19:23:27 UTC 2021


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 <i.maximets at ovn.org>
---
 NEWS              |  3 +++
 utilities/ovn-ctl | 12 ++++++++++++
 2 files changed, 15 insertions(+)

diff --git a/NEWS b/NEWS
index e89c5f408..d4619dd74 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,9 @@ Post-v20.12.0
     "ovn-installed".  This external-id is set by ovn-controller only after all
     openflow operations corresponding to the OVS interface being added have
     been processed.
+  - ovn-ctl: Added new command line argument '--ovsdb-disable-file-column-diff'
+    to support ovsdb-server upgrades from version 2.14 and earlier to
+    2.15 and later.  See ovsdb(7) for more details.
 
 OVN v20.12.0 - 18 Dec 2020
 --------------------------
diff --git a/utilities/ovn-ctl b/utilities/ovn-ctl
index 111930886..967db6d6c 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.26.2



More information about the dev mailing list