Re: [ovs-dev] [PATCH v1] Enable manager_option configuation for NB and SB
On Thu, Jul 28, 2016 at 01:14:37PM -0700, Amitabha Biswas wrote: > So v2 of this patch will contain Manager Table in the NB and SB > database. Does that sounds reasonable? Yes, that sounds OK to me. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [PATCH v1] Enable manager_option configuation for NB and SB
Hi Ben, No there is no advantage for having a separate database, we can incorporate a Manager Table into the Northbound and Southbound database. This was an initial hack (with minimal code and schema change) to verify the efficacy of disabling the probe timer on our cloud setups and get some feedback from the community. I think our cloud deployment team has come to the conclusion that we do need the ability to modify the probe timer values in the ovsdb-servers that manage the NB and SB databases. So v2 of this patch will contain Manager Table in the NB and SB database. Does that sounds reasonable? Thanks Amitabha > On Jul 27, 2016, at 11:45 AM, Ben Pfaffwrote: > > On Mon, Jul 18, 2016 at 10:21:09PM -0700, Amitabha Biswas wrote: >> NB and SB dbs are handled by separate ovsdb-server processes. The >> ovsdb-server processes manage dbs based on the schemas for OVN NorthBound >> and SouthBound. These schemas do not have any Manager Options similar >> to the Open_vSwitch schema. As a result, for e.g., the frequency of >> inactivity probes sent to clients from the ovsdb-server cannot be >> modified. >> >> This patch addresses the above problem by creating independent >> "conf.db"s for NB and SB. The ovsdb-server process which handles >> the NB will handle a NB_conf.db as well, ditto for the ovsdb-server >> that handles the SB. >> >> A similar result can be obtained by adding a Manager Table to the >> NorthBound and SouthBound DBs as well. In such case there would >> not be a need for a separate "config" database. I'm willing to >> consider this solution as well pending feedback. > > Is there an advantage to having a separate database for this purpose? > It strikes me as an odd design. > > The vtep schema also in the OVS tree (vtep/vtep.ovsschema) has its own > Manager table. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [PATCH v1] Enable manager_option configuation for NB and SB
On Mon, Jul 18, 2016 at 10:21:09PM -0700, Amitabha Biswas wrote: > NB and SB dbs are handled by separate ovsdb-server processes. The > ovsdb-server processes manage dbs based on the schemas for OVN NorthBound > and SouthBound. These schemas do not have any Manager Options similar > to the Open_vSwitch schema. As a result, for e.g., the frequency of > inactivity probes sent to clients from the ovsdb-server cannot be > modified. > > This patch addresses the above problem by creating independent > "conf.db"s for NB and SB. The ovsdb-server process which handles > the NB will handle a NB_conf.db as well, ditto for the ovsdb-server > that handles the SB. > > A similar result can be obtained by adding a Manager Table to the > NorthBound and SouthBound DBs as well. In such case there would > not be a need for a separate "config" database. I'm willing to > consider this solution as well pending feedback. Is there an advantage to having a separate database for this purpose? It strikes me as an odd design. The vtep schema also in the OVS tree (vtep/vtep.ovsschema) has its own Manager table. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [PATCH v1] Enable manager_option configuation for NB and SB
On Tue, Jul 19, 2016 at 12:21 AM, Amitabha Biswaswrote: > NB and SB dbs are handled by separate ovsdb-server processes. The > ovsdb-server processes manage dbs based on the schemas for OVN NorthBound > and SouthBound. These schemas do not have any Manager Options similar > to the Open_vSwitch schema. As a result, for e.g., the frequency of > inactivity probes sent to clients from the ovsdb-server cannot be > modified. > > This patch addresses the above problem by creating independent > "conf.db"s for NB and SB. The ovsdb-server process which handles > the NB will handle a NB_conf.db as well, ditto for the ovsdb-server > that handles the SB. > > A similar result can be obtained by adding a Manager Table to the > NorthBound and SouthBound DBs as well. In such case there would > not be a need for a separate "config" database. I'm willing to > consider this solution as well pending feedback. > > Sample Calls for modifying the inactivity probe timeout value: > > ovs-appctl -t /usr/local/var/run/openvswitch/ovnnb_db.ctl vlog/set any:any:dbg > ovs-appctl -t /usr/local/var/run/openvswitch/ovnnb_db.ctl > ovsdb-server/list-remotes > > manager_ip=`ovs-appctl -t /usr/local/var/run/openvswitch/ovnnb_db.ctl > ovsdb-server/list-remotes | grep ptcp | awk -F\: '{print $3}'` > manager_port=`ovs-appctl -t /usr/local/var/run/openvswitch/ovnnb_db.ctl > ovsdb-server/list-remotes | grep ptcp | awk -F\: '{print $2}'` > > ovs-vsctl --db=unix:/usr/local/var/run/openvswitch/ovnnb_db.sock --no-wait > set-manager ptcp:$manager_port:$manager_ip > ovs-vsctl --db=unix:/usr/local/var/run/openvswitch/ovnnb_db.sock list Manager > manager_uuid=`ovs-vsctl > --db=unix:/usr/local/var/run/openvswitch/ovnnb_db.sock list Manager | grep > _uuid | awk -F\: '{print $2}'` > manager_uuid=${manager_uuid//[[:blank:]]/} > ovs-vsctl --db=unix:/usr/local/var/run/openvswitch/ovnnb_db.sock --no-wait > set Manager $manager_uuid inactivity_probe=0 > ovs-vsctl --db=unix:/usr/local/var/run/openvswitch/ovnnb_db.sock list Manager > > ovs-vsctl --db=unix:/usr/local/var/run/openvswitch/ovnnb_db.sock --no-wait > set Manager $manager_uuid inactivity_probe=5 > > Signed-off-by: Amitabha Biswas Thanks for pushing this out! This addresses a concern we've seen when overwhelming the NB DB with Neutron and getting timeouts, and being able to configure the probe timeout value like this would help us to fine tune it in a running system. This version looks ok, but before Acking, I think the broader community should discuss if this approach is better vs. adding the "Manager Table" to the NB and SB DBs. Thanks, Kyle > --- > ovn/utilities/ovn-ctl | 21 + > ovn/utilities/ovn-ctl.8.xml | 2 ++ > 2 files changed, 19 insertions(+), 4 deletions(-) > > diff --git a/ovn/utilities/ovn-ctl b/ovn/utilities/ovn-ctl > index dad6db6..384d876 100755 > --- a/ovn/utilities/ovn-ctl > +++ b/ovn/utilities/ovn-ctl > @@ -49,22 +49,30 @@ start_ovsdb () { > # Check and eventually start ovsdb-server for Northbound DB > if ! pidfile_is_running $DB_NB_PID; then > upgrade_db "$DB_NB_FILE" "$DB_NB_SCHEMA" 1>/dev/null 2>/dev/null > +upgrade_db "$DB_NB_CONF" "$DB_CONF_SCHEMA" 1>/dev/null 2>/dev/null > > set ovsdb-server > > -set "$@" --detach $OVN_NB_LOG --log-file=$OVN_NB_LOGFILE > --remote=punix:$DB_NB_SOCK --remote=ptcp:$DB_NB_PORT:$DB_NB_ADDR > --pidfile=$DB_NB_PID --unixctl=ovnnb_db.ctl > +set "$@" --detach $OVN_NB_LOG --log-file=$OVN_NB_LOGFILE \ > +--remote=db:Open_vSwitch,Open_vSwitch,manager_options \ > +--remote=punix:$DB_NB_SOCK --remote=ptcp:$DB_NB_PORT:$DB_NB_ADDR > \ > +--pidfile=$DB_NB_PID --unixctl=ovnnb_db.ctl > > -$@ $DB_NB_FILE > +$@ $DB_NB_FILE $DB_NB_CONF > fi > > # Check and eventually start ovsdb-server for Southbound DB > if ! pidfile_is_running $DB_SB_PID; then > upgrade_db "$DB_SB_FILE" "$DB_SB_SCHEMA" 1>/dev/null 2>/dev/null > +upgrade_db "$DB_SB_CONF" "$DB_CONF_SCHEMA" 1>/dev/null 2>/dev/null > > set ovsdb-server > > -set "$@" --detach $OVN_SB_LOG --log-file=$OVN_SB_LOGFILE > --remote=punix:$DB_SB_SOCK --remote=ptcp:$DB_SB_PORT:$DB_SB_ADDR > --pidfile=$DB_SB_PID --unixctl=ovnsb_db.ctl > -$@ $DB_SB_FILE > +set "$@" --detach $OVN_SB_LOG --log-file=$OVN_SB_LOGFILE \ > +--remote=db:Open_vSwitch,Open_vSwitch,manager_options \ > +--remote=punix:$DB_SB_SOCK --remote=ptcp:$DB_SB_PORT:$DB_SB_ADDR > \ > +--pidfile=$DB_SB_PID --unixctl=ovnsb_db.ctl > +$@ $DB_SB_FILE $DB_SB_CONF > fi > } > > @@ -159,17 +167,20 @@ set_defaults () { > DB_NB_SOCK=$rundir/ovnnb_db.sock > DB_NB_PID=$rundir/ovnnb_db.pid > DB_NB_FILE=$dbdir/ovnnb_db.db > +DB_NB_CONF=$dbdir/ovnnb_conf.db > DB_NB_ADDR=0.0.0.0 > DB_NB_PORT=6641 > > DB_SB_SOCK=$rundir/ovnsb_db.sock >
[ovs-dev] [PATCH v1] Enable manager_option configuation for NB and SB
NB and SB dbs are handled by separate ovsdb-server processes. The ovsdb-server processes manage dbs based on the schemas for OVN NorthBound and SouthBound. These schemas do not have any Manager Options similar to the Open_vSwitch schema. As a result, for e.g., the frequency of inactivity probes sent to clients from the ovsdb-server cannot be modified. This patch addresses the above problem by creating independent "conf.db"s for NB and SB. The ovsdb-server process which handles the NB will handle a NB_conf.db as well, ditto for the ovsdb-server that handles the SB. A similar result can be obtained by adding a Manager Table to the NorthBound and SouthBound DBs as well. In such case there would not be a need for a separate "config" database. I'm willing to consider this solution as well pending feedback. Sample Calls for modifying the inactivity probe timeout value: ovs-appctl -t /usr/local/var/run/openvswitch/ovnnb_db.ctl vlog/set any:any:dbg ovs-appctl -t /usr/local/var/run/openvswitch/ovnnb_db.ctl ovsdb-server/list-remotes manager_ip=`ovs-appctl -t /usr/local/var/run/openvswitch/ovnnb_db.ctl ovsdb-server/list-remotes | grep ptcp | awk -F\: '{print $3}'` manager_port=`ovs-appctl -t /usr/local/var/run/openvswitch/ovnnb_db.ctl ovsdb-server/list-remotes | grep ptcp | awk -F\: '{print $2}'` ovs-vsctl --db=unix:/usr/local/var/run/openvswitch/ovnnb_db.sock --no-wait set-manager ptcp:$manager_port:$manager_ip ovs-vsctl --db=unix:/usr/local/var/run/openvswitch/ovnnb_db.sock list Manager manager_uuid=`ovs-vsctl --db=unix:/usr/local/var/run/openvswitch/ovnnb_db.sock list Manager | grep _uuid | awk -F\: '{print $2}'` manager_uuid=${manager_uuid//[[:blank:]]/} ovs-vsctl --db=unix:/usr/local/var/run/openvswitch/ovnnb_db.sock --no-wait set Manager $manager_uuid inactivity_probe=0 ovs-vsctl --db=unix:/usr/local/var/run/openvswitch/ovnnb_db.sock list Manager ovs-vsctl --db=unix:/usr/local/var/run/openvswitch/ovnnb_db.sock --no-wait set Manager $manager_uuid inactivity_probe=5 Signed-off-by: Amitabha Biswas--- ovn/utilities/ovn-ctl | 21 + ovn/utilities/ovn-ctl.8.xml | 2 ++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/ovn/utilities/ovn-ctl b/ovn/utilities/ovn-ctl index dad6db6..384d876 100755 --- a/ovn/utilities/ovn-ctl +++ b/ovn/utilities/ovn-ctl @@ -49,22 +49,30 @@ start_ovsdb () { # Check and eventually start ovsdb-server for Northbound DB if ! pidfile_is_running $DB_NB_PID; then upgrade_db "$DB_NB_FILE" "$DB_NB_SCHEMA" 1>/dev/null 2>/dev/null +upgrade_db "$DB_NB_CONF" "$DB_CONF_SCHEMA" 1>/dev/null 2>/dev/null set ovsdb-server -set "$@" --detach $OVN_NB_LOG --log-file=$OVN_NB_LOGFILE --remote=punix:$DB_NB_SOCK --remote=ptcp:$DB_NB_PORT:$DB_NB_ADDR --pidfile=$DB_NB_PID --unixctl=ovnnb_db.ctl +set "$@" --detach $OVN_NB_LOG --log-file=$OVN_NB_LOGFILE \ +--remote=db:Open_vSwitch,Open_vSwitch,manager_options \ +--remote=punix:$DB_NB_SOCK --remote=ptcp:$DB_NB_PORT:$DB_NB_ADDR \ +--pidfile=$DB_NB_PID --unixctl=ovnnb_db.ctl -$@ $DB_NB_FILE +$@ $DB_NB_FILE $DB_NB_CONF fi # Check and eventually start ovsdb-server for Southbound DB if ! pidfile_is_running $DB_SB_PID; then upgrade_db "$DB_SB_FILE" "$DB_SB_SCHEMA" 1>/dev/null 2>/dev/null +upgrade_db "$DB_SB_CONF" "$DB_CONF_SCHEMA" 1>/dev/null 2>/dev/null set ovsdb-server -set "$@" --detach $OVN_SB_LOG --log-file=$OVN_SB_LOGFILE --remote=punix:$DB_SB_SOCK --remote=ptcp:$DB_SB_PORT:$DB_SB_ADDR --pidfile=$DB_SB_PID --unixctl=ovnsb_db.ctl -$@ $DB_SB_FILE +set "$@" --detach $OVN_SB_LOG --log-file=$OVN_SB_LOGFILE \ +--remote=db:Open_vSwitch,Open_vSwitch,manager_options \ +--remote=punix:$DB_SB_SOCK --remote=ptcp:$DB_SB_PORT:$DB_SB_ADDR \ +--pidfile=$DB_SB_PID --unixctl=ovnsb_db.ctl +$@ $DB_SB_FILE $DB_SB_CONF fi } @@ -159,17 +167,20 @@ set_defaults () { DB_NB_SOCK=$rundir/ovnnb_db.sock DB_NB_PID=$rundir/ovnnb_db.pid DB_NB_FILE=$dbdir/ovnnb_db.db +DB_NB_CONF=$dbdir/ovnnb_conf.db DB_NB_ADDR=0.0.0.0 DB_NB_PORT=6641 DB_SB_SOCK=$rundir/ovnsb_db.sock DB_SB_PID=$rundir/ovnsb_db.pid DB_SB_FILE=$dbdir/ovnsb_db.db +DB_SB_CONF=$dbdir/ovnsb_conf.db DB_SB_ADDR=0.0.0.0 DB_SB_PORT=6642 DB_NB_SCHEMA=$datadir/ovn-nb.ovsschema DB_SB_SCHEMA=$datadir/ovn-sb.ovsschema +DB_CONF_SCHEMA=$datadir/vswitch.ovsschema DB_SOCK=$rundir/db.sock DB_CONF_FILE=$dbdir/conf.db @@ -245,7 +256,9 @@ Options: File location options: --db-sock=SOCKET JSON-RPC socket name (default: $DB_SOCK) --db-nb-file=FILEOVN_Northbound db file (default: $DB_NB_FILE) + --db-nb-conf=FILENB Open_vSwitch conf file (default: $DB_NB_CONF) --db-sb-file=FILEOVN_Southbound db file (default: $DB_SB_FILE) + --db-sb-conf=FILE