On 1/25/21 3:11 AM, Han Zhou wrote:
> 
> 
> On Thu, Jan 21, 2021 at 11:23 AM Ilya Maximets <[email protected] 
> <mailto:[email protected]>> wrote:
>>
>> 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
>>  
>> <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 <[email protected] <mailto:[email protected]>>
>> ---
>>  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) \
> 
> Do we really need this above line? The ovs-ctl tool is part of the OVS 
> release, so there shouldn't be a situation that ovs-ctl supports this new 
> option while the ovsdb-server doesn't, right? Of course it is not harmful 
> either, but we don't handle other options this way.

That is true for ovs-ctl, but this change is for ovN-ctl which is part of
OVN distribution and could be used with different versions of OVS, e.g
with 2.13 LTS that doesn't support this option and doesn't need it for
the upgrade scenario.

> Other than this:
> Acked-by: Han Zhou <[email protected] <mailto:[email protected]>>
> 
>> +            && 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
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to