From patchwork Thu Jul 13 17:02:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miguel Angel Ajo X-Patchwork-Id: 787921 X-Patchwork-Delegate: rbryant@redhat.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3x7hwV62jdz9t2S for ; Fri, 14 Jul 2017 03:03:22 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 70082B69; Thu, 13 Jul 2017 17:02:50 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id F1959B59 for ; Thu, 13 Jul 2017 17:02:49 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id C8718CD for ; Thu, 13 Jul 2017 17:02:48 +0000 (UTC) Received: by mail-wm0-f48.google.com with SMTP id 70so5027529wmo.1 for ; Thu, 13 Jul 2017 10:02:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=j8eclqwqFyR7UShrUx6PelKO0pudyum5FYBJEXpHFnA=; b=KRKETXszntXaz2U1f2jnehJdDcetnvdDZwfhETs8Arg/yOocInA7PMiry+URoSk+r0 V1VdbZSEA9+iTlSA+bDer6ApwJh8kzxA6/AspA8ur7lRtvznBecWKDwNRRWYK0/Yru/X UDm8PlDxGZpRTkoTbnpvOkFfHeyB9owyoFqxzedniNOOQPpCSk+oUKnw+3dfcdFwDDLc KFDYL2pQj/RiAg8GOPR7AkOQEbOH1TXGElh4AattfFEKX5eqNmQRBQrD6xq7lK7Prx/Y 8QlY+heBx4+H6QX3jDNFVdS+Xdu5O2By+9SVDE060ssX6T1vfe5sEGPKdzuqIBIa6ywY AWUw== X-Gm-Message-State: AIVw112e8Eu7CY6DF2eKMkNLWq1MlypiTHlxEH1lAKiuVx0sAjEOeJ0T mG1bsF8uVplxMslSvIL8PA== X-Received: by 10.28.223.86 with SMTP id w83mr2875553wmg.9.1499965366855; Thu, 13 Jul 2017 10:02:46 -0700 (PDT) Received: from ctl.localdomain (111.148.134.37.dynamic.jazztel.es. [37.134.148.111]) by smtp.gmail.com with ESMTPSA id 46sm7134176wrz.8.2017.07.13.10.02.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jul 2017 10:02:45 -0700 (PDT) From: Miguel Angel Ajo To: dev@openvswitch.org Date: Thu, 13 Jul 2017 17:02:35 +0000 Message-Id: <1499965361-32021-2-git-send-email-majopela@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1499965361-32021-1-git-send-email-majopela@redhat.com> References: <1496930708-15441-1-git-send-email-majopela@redhat.com> <1499965361-32021-1-git-send-email-majopela@redhat.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: "majopela@redhat.com" Subject: [ovs-dev] [PATCH v5 2/8] ovn: l3ha, NBDB and SBDB changes and documentation X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org From: "majopela@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. +

@@ -2111,4 +2147,54 @@ + +

+ Association of one or more chassis to a logical router port. The traffic + going out through an specific router port will be redirected to a + chassis, or a set of them in high availability configurations. + A single is equivalent to setting + . Using + allows associating multiple prioritized + chassis with a single logical router port. +

+ + +

+ Name of the . +

+

+ A suggested, but not required naming convention is + ${port_name}_${chassis_name}. +

+
+ + +

+ Name of the chassis that we want to redirect traffic through for the + associated logical router port. The value must match the + column + of the table in the + database. +

+
+ + +

+ This is the priority of a chassis among all + belonging to the same logical router + port. +

+
+ + + Reserved for future use. + + + + + See External IDs at the beginning of this document. + + +
+ diff --git a/ovn/ovn-sb.ovsschema b/ovn/ovn-sb.ovsschema index 8a68e7c..2643640 100644 --- a/ovn/ovn-sb.ovsschema +++ b/ovn/ovn-sb.ovsschema @@ -1,7 +1,7 @@ { "name": "OVN_Southbound", - "version": "1.13.0", - "cksum": "3451836240 12038", + "version": "1.14.0", + "cksum": "3613553908 13275", "tables": { "SB_Global": { "columns": { @@ -104,6 +104,12 @@ "columns": { "logical_port": {"type": "string"}, "type": {"type": "string"}, + "gateway_chassis": { + "type": {"key": {"type": "uuid", + "refTable": "Gateway_Chassis", + "refType": "strong"}, + "min": 0, + "max": "unlimited"}}, "options": { "type": {"key": "string", "value": "string", @@ -244,4 +250,22 @@ "update" : {"type": {"key": "string", "min": 0, "max": "unlimited"}}}, - "isRoot": true}}} + "isRoot": true}, + "Gateway_Chassis": { + "columns": { + "name": {"type": "string"}, + "chassis": {"type": {"key": {"type": "uuid", + "refTable": "Chassis", + "refType": "weak"}, + "min": 0, "max": 1}}, + "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-sb.xml b/ovn/ovn-sb.xml index b22d1ac..c1731d2 100644 --- a/ovn/ovn-sb.xml +++ b/ovn/ovn-sb.xml @@ -1837,6 +1837,18 @@ tcp.flags = RST;
+ +

+ A list of . +

+

+ This should only be populated for ports with + set to chassisredirect. + This column defines the list of chassis used as gateways where + traffic will be redirected through. +

+
+

A number that represents the logical port in the key (e.g. STT key or @@ -2883,4 +2895,43 @@ tcp.flags = RST; clients are allowed to modify. + +

+ Association of rows of + chassisredirect to + a . The traffic going out through a specific + chassisredirect port will be redirected to a chassis, + or a set of them in high availability configurations. +

+ + +

+ Name of the . +

+

+ A suggested, but not required naming convention is + ${port_name}_${chassis_name}. +

+
+ + + The to which we send the traffic. + + + + This is the priority the specific among all + Gateway_Chassis belonging to the same . + + + + Reserved for future use. + + + + The overall purpose of these columns is described under Common + Columns at the beginning of this document. + + + +