Re: [ovs-dev] [PATCH v4 2/7] ovn: l3ha, NBDB and SBDB changes and documentation
Super nit comments while trying to go through the code. Very good work btw! Thanks a lot Miguel and Anil! On Wed, Jul 12, 2017 at 3:12 PM, Miguel Angel Ajowrote: > From: "majop...@redhat.com" > > This commit introduces the north and south db changes necessary for > the l3ha router implementation. > > It defines a new Table in both NBDB and SBDB. > > The Gateway_Chassis table is created, with a tiny difference between > NBDB and SBDB, NBDB references the chassis via it's name (chassis_name) > s/it's/its > and SBDB references the chassis via reference (chassis) to the Chassis > table. > > In NBDB a new column (gateway_chassis) is added to Logical_Router_Ports > with a list of Gateway_Chassis which can be empty. > > In SBDB a new column (gateway_chassis) is added to Port_Binding with > the same list, this column will be used for ports of type chassis-redirect. > > Bump minor version since we've added new backwards compatible features. > > Co-authored-by: Russell Bryant > Signed-off-by: Miguel Angel Ajo > Signed-off-by: Russell Bryant > --- > ovn/ovn-nb.ovsschema | 28 +++-- > ovn/ovn-nb.xml | 88 ++ > +- > ovn/ovn-sb.ovsschema | 30 -- > ovn/ovn-sb.xml | 51 ++ > 4 files changed, 190 insertions(+), 7 deletions(-) > > diff --git a/ovn/ovn-nb.ovsschema b/ovn/ovn-nb.ovsschema > index c6a1417..d85a3fe 100644 > --- a/ovn/ovn-nb.ovsschema > +++ b/ovn/ovn-nb.ovsschema > @@ -1,7 +1,7 @@ > { > "name": "OVN_Northbound", > -"version": "5.6.0", > -"cksum": "2552205612 15123", > +"version": "5.7.0", > +"cksum": "3754583060 16164", > "tables": { > "NB_Global": { > "columns": { > @@ -196,6 +196,12 @@ > "Logical_Router_Port": { > "columns": { > "name": {"type": "string"}, > +"gateway_chassis": { > +"type": {"key": {"type": "uuid", > + "refTable": "Gateway_Chassis", > + "refType": "strong"}, > + "min": 0, > + "max": "unlimited"}}, > "options": { > "type": {"key": "string", > "value": "string", > @@ -293,4 +299,20 @@ >"value": "string", >"min": 0, >"max": "unlimited"}}}, > -"maxRows": 1}}} > +"maxRows": 1}, > +"Gateway_Chassis": { > +"columns": { > +"name": {"type": "string"}, > +"chassis_name": {"type": "string"}, > +"priority": {"type": {"key": {"type": "integer", > + "minInteger": 0, > + "maxInteger": 32767}}}, > +"external_ids": { > +"type": {"key": "string", "value": "string", > + "min": 0, "max": "unlimited"}}, > +"options": { > +"type": {"key": "string", "value": "string", > + "min": 0, "max": "unlimited"}}}, > +"indexes": [["name"]], > +"isRoot": false}} > +} > diff --git a/ovn/ovn-nb.xml b/ovn/ovn-nb.xml > index 32c10c1..1e73465 100644 > --- a/ovn/ovn-nb.xml > +++ b/ovn/ovn-nb.xml > @@ -179,7 +179,7 @@ > > Set this to an IPv4 subnet, e.g. 192.168.0.0/24, to > enable > ovn-northd to automatically assign IP addresses > within > -that subnet. > +that subnet. > Whitespace? > > > @@ -1250,6 +1250,34 @@ > > > > + > + > +If set, this indicates that this logical router port represents > +a distributed gateway port that connects this router to a logical > +switch with a localnet port. There may be at most one such > +logical router port on each logical router. > + > + > + > +Several can be referenced for a > given > +logical router port. A single is > +functionally equivalent to setting > +. Refer to the > +description of > +for additional details on gateway handling. > + > + > + > +Defining more than one will enable > +gateway high availability. Only one gateway will be active at a > +time. OVN chassis will use BFD to monitor connectivity to a > +gateway. If connectivity to the active gateway is interrupted, > +another gateway will become active. > +The column > +specifies the order that gateways will be chosen by OVN. > + > + > + > > > The IP
[ovs-dev] [PATCH v4 2/7] ovn: l3ha, NBDB and SBDB changes and documentation
From: "majop...@redhat.com"This commit introduces the north and south db changes necessary for the l3ha router implementation. It defines a new Table in both NBDB and SBDB. The Gateway_Chassis table is created, with a tiny difference between NBDB and SBDB, NBDB references the chassis via it's name (chassis_name) and SBDB references the chassis via reference (chassis) to the Chassis table. In NBDB a new column (gateway_chassis) is added to Logical_Router_Ports with a list of Gateway_Chassis which can be empty. In SBDB a new column (gateway_chassis) is added to Port_Binding with the same list, this column will be used for ports of type chassis-redirect. Bump minor version since we've added new backwards compatible features. Co-authored-by: Russell Bryant Signed-off-by: Miguel Angel Ajo Signed-off-by: Russell Bryant --- ovn/ovn-nb.ovsschema | 28 +++-- ovn/ovn-nb.xml | 88 +++- ovn/ovn-sb.ovsschema | 30 -- ovn/ovn-sb.xml | 51 ++ 4 files changed, 190 insertions(+), 7 deletions(-) diff --git a/ovn/ovn-nb.ovsschema b/ovn/ovn-nb.ovsschema index c6a1417..d85a3fe 100644 --- a/ovn/ovn-nb.ovsschema +++ b/ovn/ovn-nb.ovsschema @@ -1,7 +1,7 @@ { "name": "OVN_Northbound", -"version": "5.6.0", -"cksum": "2552205612 15123", +"version": "5.7.0", +"cksum": "3754583060 16164", "tables": { "NB_Global": { "columns": { @@ -196,6 +196,12 @@ "Logical_Router_Port": { "columns": { "name": {"type": "string"}, +"gateway_chassis": { +"type": {"key": {"type": "uuid", + "refTable": "Gateway_Chassis", + "refType": "strong"}, + "min": 0, + "max": "unlimited"}}, "options": { "type": {"key": "string", "value": "string", @@ -293,4 +299,20 @@ "value": "string", "min": 0, "max": "unlimited"}}}, -"maxRows": 1}}} +"maxRows": 1}, +"Gateway_Chassis": { +"columns": { +"name": {"type": "string"}, +"chassis_name": {"type": "string"}, +"priority": {"type": {"key": {"type": "integer", + "minInteger": 0, + "maxInteger": 32767}}}, +"external_ids": { +"type": {"key": "string", "value": "string", + "min": 0, "max": "unlimited"}}, +"options": { +"type": {"key": "string", "value": "string", + "min": 0, "max": "unlimited"}}}, +"indexes": [["name"]], +"isRoot": false}} +} diff --git a/ovn/ovn-nb.xml b/ovn/ovn-nb.xml index 32c10c1..1e73465 100644 --- a/ovn/ovn-nb.xml +++ b/ovn/ovn-nb.xml @@ -179,7 +179,7 @@ Set this to an IPv4 subnet, e.g. 192.168.0.0/24, to enable ovn-northd to automatically assign IP addresses within -that subnet. +that subnet. @@ -1250,6 +1250,34 @@ + + +If set, this indicates that this logical router port represents +a distributed gateway port that connects this router to a logical +switch with a localnet port. There may be at most one such +logical router port on each logical router. + + + +Several can be referenced for a given +logical router port. A single is +functionally equivalent to setting +. Refer to the +description of +for additional details on gateway handling. + + + +Defining more than one will enable +gateway high availability. Only one gateway will be active at a +time. OVN chassis will use BFD to monitor connectivity to a +gateway. If connectivity to the active gateway is interrupted, +another gateway will become active. +The column +specifies the order that gateways will be chosen by OVN. + + + The IP addresses and netmasks of the router. For example, @@ -1319,6 +1347,14 @@ table="Logical_Switch_Port"/> should be set to router. + + + While is still + supported for backwards compatibility, it is now preferred to + specify one or more instead. + It is functionally equivalent, but allows you to specify multiple + chassis to enable high availability. + @@