On 3/3/21 2:19 PM, Frode Nordahl wrote:
<snip>
>>
>>> ---
>>> utilities/ovn-ctl | 20 +++++++++++++++++++-
>>> 1 file changed, 19 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/utilities/ovn-ctl b/utilities/ovn-ctl
>>> index c7cb42bc1..7285c0533 100755
>>> --- a/utilities/ovn-ctl
>>> +++ b/utilities/ovn-ctl
>>> @@ -284,7 +284,21 @@ $cluster_remote_port
>>> set "$@" --sync-from=`cat $active_conf_file`
>>> fi
>>>
>>> - "$@" "$file"
>>> + local run_ovsdb_in_bg="no"
>>> + local process_id=
>>> + if test X$detach = Xno && test $mode = cluster && test -z
>>> "$cluster_remote_addr" ; then
>>> + # When detach is no (for run_nb_ovsdb/run_sb_ovsdb commands)
>>> + # we want to run ovsdb-server in background rather than running it
>>> in
>>> + # foreground so that the OVN dbs are upgraded for the cluster mode.
>>> + # Otherwise, CMS has to take the responsibility of upgrading the
>>> dbs.
>>> + # Note: We run only the ovsdb-server in backgroud which created the
>>> + # cluster (i.e cluster_remote_addr is not set.).
>>> + run_ovsdb_in_bg="yes"
>>> + "$@" $file &
>>> + process_id=$!
>>> + else
>>> + start_wrapped_daemon "$wrapper" ovsdb-$db "" "$@" "$file"
This actually broke ovn-ctl on branches 20.03 and 20.06.
There is no such function as start_wrapped_daemon on these branches.
>>> + fi
>>>
>>> # Initialize the database if it's running standalone,
>>> # active-passive, or is the first server in a cluster.
>>> @@ -295,6 +309,10 @@ $cluster_remote_port
>>> if test $mode = cluster; then
>>> upgrade_cluster "$schema" "unix:$sock"
>>> fi
>>> +
>>> + if test $run_ovsdb_in_bg = yes; then
>>> + wait $process_id
>>> + fi
>>> }
>>>
>>> start_nb_ovsdb() {
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev