s/ n_bytes=0,//
s/ idle_age=[0-9]*,//
s/ hard_age=[0-9]*,//
+s/dp_hash=0x[0-9a-f]*\//dp_hash=0x0\//
+s/recirc_id=0x[0-9a-f]*,/recirc_id=0x0,/
'
}
# ovn_init_db DATABASE
#
-# Creates and initializes the given DATABASE (one of "ovn-sb" or "ovn-nb")
-# and starts its ovsdb-server instance.
+# Creates and initializes the given DATABASE (one of "ovn-sb" or "ovn-nb"),
+# starts its ovsdb-server instance, and sets the appropriate environment
+# variable (OVN_SB_DB or OVN_NB_DB) so that ovn-sbctl or ovn-nbctl uses the
+# database by default.
#
# Usually invoked from ovn_start.
ovn_init_db () {
: > "$d"/.$1.db.~lock~
as $1 ovsdb-tool create "$d"/$1.db "$abs_top_srcdir"/ovn/$1.ovsschema
as $1 start_daemon ovsdb-server --remote=punix:"$d"/$1.sock "$d"/$1.db
+ local var=`echo $1_db | tr a-z- A-Z_`
+ AS_VAR_SET([$var], [unix:$ovs_base/$1/$1.sock]); export $var
}
# ovn_start
#
# Creates and initializes ovn-sb and ovn-nb databases and starts their
-# ovsdb-server instance, and starts ovn-northd running against them.
+# ovsdb-server instance, sets appropriate environment variables so that
+# ovn-sbctl and ovn-nbctl use them by default, and starts ovn-northd running
+# against them.
ovn_start () {
ovn_init_db ovn-sb
ovn_init_db ovn-nb
- OVN_NB_DB=unix:$ovs_base/ovn-nb/ovn-nb.sock; export OVN_NB_DB
-
echo "starting ovn-northd"
mkdir "$ovs_base"/northd
as northd start_daemon ovn-northd \
ovs-vsctl \
-- set Open_vSwitch . external-ids:system-id=$sandbox \
-- set Open_vSwitch . external-ids:ovn-remote=unix:$ovs_base/ovn-sb/ovn-sb.sock \
- -- set Open_vSwitch . external-ids:ovn-encap-type=geneve \
+ -- set Open_vSwitch . external-ids:ovn-encap-type=geneve,vxlan \
-- set Open_vSwitch . external-ids:ovn-encap-ip=$ip \
-- add-br br-int \
-- set bridge br-int fail-mode=secure other-config:disable-in-band=true \