From patchwork Tue Mar 31 17:44:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Numan Siddique X-Patchwork-Id: 1264862 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48sGtX5zVqz9sRN for ; Wed, 1 Apr 2020 04:44:52 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 9F48A87D45; Tue, 31 Mar 2020 17:44:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 79quiXI0jJ0e; Tue, 31 Mar 2020 17:44:43 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 5E57186EA7; Tue, 31 Mar 2020 17:44:43 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 46AA4C1AE8; Tue, 31 Mar 2020 17:44:43 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id C137EC07FF for ; Tue, 31 Mar 2020 17:44:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id BDF8985B2F for ; Tue, 31 Mar 2020 17:44:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XcZOGNBMQ3cW for ; Tue, 31 Mar 2020 17:44:39 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 6645385AD6 for ; Tue, 31 Mar 2020 17:44:39 +0000 (UTC) X-Originating-IP: 115.99.222.43 Received: from nummac.local (unknown [115.99.222.43]) (Authenticated sender: numans@ovn.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 71539C0003; Tue, 31 Mar 2020 17:44:34 +0000 (UTC) From: numans@ovn.org To: dev@openvswitch.org Date: Tue, 31 Mar 2020 23:14:16 +0530 Message-Id: <20200331174416.950425-1-numans@ovn.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200331174348.950311-1-numans@ovn.org> References: <20200331174348.950311-1-numans@ovn.org> MIME-Version: 1.0 Subject: [ovs-dev] [PATCH ovn 1/2] Rename "VTEP switch" to "ramp switch". X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" From: Ben Pfaff The term "VTEP" is a poor choice because a VTEP is just a VXLAN Tunnel Endpoint, which is a generic term not specific to OVN. When we talk about "VTEP switches" and "VTEP gateways", therefore, it's somewhat confusing. This commit introduces the term "ramp", which uses the metaphor of one of these switches as an on-ramp and an off-ramp to an OVN logical network, and substitutes it wherever it can be in the documentation. Bits of the OVN database are harder to change, since changing them would cause backward compatibility problems, so this commit doesn't try. It might be a good idea to change some program names (e.g. ovn-controller-vtep), some distro package names, and so on. This commit does not do that. CC: Ihar Hrachyshka Signed-off-by: Ben Pfaff Acked-by: Numan Siddique Signed-off-by: Numan Siddique --- Documentation/faq/general.rst | 10 +-- Documentation/topics/high-availability.rst | 10 +-- Documentation/tutorials/ovn-openstack.rst | 2 +- NEWS | 2 + controller/physical.c | 15 ++-- include/ovn/logical-fields.h | 10 ++- northd/ovn-northd.c | 13 ++-- ovn-architecture.7.xml | 84 ++++++++++++---------- ovn-nb.xml | 12 ++-- ovn-sb.xml | 19 ++--- utilities/ovn-nbctl.8.xml | 2 +- 11 files changed, 97 insertions(+), 82 deletions(-) diff --git a/Documentation/faq/general.rst b/Documentation/faq/general.rst index 831ca0445..c1b0a6907 100644 --- a/Documentation/faq/general.rst +++ b/Documentation/faq/general.rst @@ -108,10 +108,12 @@ Q: Why does OVN use STT and Geneve instead of VLANs or VXLAN (or GRE)? may need to allocate more bits to the datapath or egress port identifiers. - As a side note, OVN does support VXLAN for use with ASIC-based top of rack - switches, using ``ovn-controller-vtep(8)`` and the OVSDB VTEP schema - described in ``vtep(5)``, but this limits the features available from OVN - to the subset available from the VTEP schema. + As a side note, OVN does support VXLAN for use with "ramp + gateways" that allow ASIC-based top of rack switches to act as + on-ramp from a physical network into an OVN logical network. Ramp + switches use ``ovn-controller-vtep(8)`` and the OVSDB VTEP schema + described in ``vtep(5)``. This limits the features available from + OVN to the subset available from the VTEP schema. Q: How can I contribute to the OVN Community? diff --git a/Documentation/topics/high-availability.rst b/Documentation/topics/high-availability.rst index c3c962c1d..9f1d94722 100644 --- a/Documentation/topics/high-availability.rst +++ b/Documentation/topics/high-availability.rst @@ -52,11 +52,11 @@ OVN Gateway High Availability Plan The OVN gateway is responsible for shuffling traffic between the tunneled overlay network (governed by ovn-northd), and the legacy physical network. In -a naive implementation, the gateway is a single x86 server, or hardware VTEP. -For most deployments, a single system has enough forwarding capacity to service -the entire virtualized network, however, it introduces a single point of -failure. If this system dies, the entire OVN deployment becomes unavailable. -To mitigate this risk, an HA solution is critical -- by spreading +a naive implementation, the gateway is a single x86 server or a hardware ToR +switch. For most deployments, a single system has enough forwarding capacity +to service the entire virtualized network, however, it introduces a single +point of failure. If this system dies, the entire OVN deployment becomes +unavailable. To mitigate this risk, an HA solution is critical -- by spreading responsibility across multiple systems, no single server failure can take down the network. diff --git a/Documentation/tutorials/ovn-openstack.rst b/Documentation/tutorials/ovn-openstack.rst index 2e4f63404..e5356dad6 100644 --- a/Documentation/tutorials/ovn-openstack.rst +++ b/Documentation/tutorials/ovn-openstack.rst @@ -1959,4 +1959,4 @@ explore some of these directions: * Other kinds of gateways. In addition to floating IPs with NAT, OVN supports directly attaching VMs to a physical network and connecting - logical switches to VTEP hardware. + logical switches to hardware top-of-rack switches. diff --git a/NEWS b/NEWS index 393721d70..cb322d03e 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,7 @@ Post-v20.03.0 -------------------------- + - "VTEP" gateways and switches have been renamed "ramp" gateways and + switches, to better distinguish them from everyday use of VXLAN. OVN v20.03.0 - xx xxx xxxx diff --git a/controller/physical.c b/controller/physical.c index 144aeb7bd..f33292275 100644 --- a/controller/physical.c +++ b/controller/physical.c @@ -1668,9 +1668,8 @@ physical_run(struct physical_ctx *p_ctx, ofpbuf_clear(&ofpacts); put_move(MFF_TUN_ID, 0, MFF_LOG_DATAPATH, 0, 24, &ofpacts); put_load(binding->tunnel_key, MFF_LOG_INPORT, 0, 15, &ofpacts); - /* For packets received from a vxlan tunnel, set a flag to that - * effect. */ - put_load(1, MFF_LOG_FLAGS, MLF_RCV_FROM_VXLAN_BIT, 1, &ofpacts); + /* Packets received from a VXLAN tunnel lack an egress port. */ + put_load(1, MFF_LOG_FLAGS, MLF_NO_EGRESS_PORT_BIT, 1, &ofpacts); put_resubmit(OFTABLE_LOG_INGRESS_PIPELINE, &ofpacts); ofctrl_add_flow(flow_table, OFTABLE_PHY_TO_LOG, 100, @@ -1682,15 +1681,15 @@ physical_run(struct physical_ctx *p_ctx, /* Table 32, priority 150. * ======================= * - * Handles packets received from a VXLAN tunnel which get resubmitted to - * OFTABLE_LOG_INGRESS_PIPELINE due to lack of needed metadata in VXLAN, - * explicitly skip sending back out any tunnels and resubmit to table 33 - * for local delivery. + * For packets received without an egress port (e.g. from a VXLAN tunnel), + * resubmit them to OFTABLE_LOG_INGRESS_PIPELINE to rediscover the egress + * port, but explicitly skip sending back out any tunnels and resubmit to + * table 33 for local delivery. */ struct match match; match_init_catchall(&match); match_set_reg_masked(&match, MFF_LOG_FLAGS - MFF_REG0, - MLF_RCV_FROM_VXLAN, MLF_RCV_FROM_VXLAN); + MLF_NO_EGRESS_PORT, MLF_NO_EGRESS_PORT); /* Resubmit to table 33. */ ofpbuf_clear(&ofpacts); diff --git a/include/ovn/logical-fields.h b/include/ovn/logical-fields.h index c7bd2dba9..d210edf69 100644 --- a/include/ovn/logical-fields.h +++ b/include/ovn/logical-fields.h @@ -51,7 +51,7 @@ void ovn_init_symtab(struct shash *symtab); /* MFF_LOG_FLAGS_REG bit assignments */ enum mff_log_flags_bits { MLF_ALLOW_LOOPBACK_BIT = 0, - MLF_RCV_FROM_VXLAN_BIT = 1, + MLF_NO_EGRESS_PORT_BIT = 1, MLF_FORCE_SNAT_FOR_DNAT_BIT = 2, MLF_FORCE_SNAT_FOR_LB_BIT = 3, MLF_LOCAL_ONLY_BIT = 4, @@ -64,11 +64,9 @@ enum mff_log_flags { /* Allow outputting back to inport. */ MLF_ALLOW_LOOPBACK = (1 << MLF_ALLOW_LOOPBACK_BIT), - /* Indicate that a packet was received from a VXLAN tunnel to - * compensate for the lack of egress port information available in - * VXLAN encapsulation. Egress port information is available for - * Geneve and STT tunnel types. */ - MLF_RCV_FROM_VXLAN = (1 << MLF_RCV_FROM_VXLAN_BIT), + /* Indicate that a packet was received without egress port information, + * which is not available, e.g., in packets received from ramp switches. */ + MLF_NO_EGRESS_PORT = (1 << MLF_NO_EGRESS_PORT_BIT), /* Indicate that a packet needs a force SNAT in the gateway router when * DNAT has taken place. */ diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c index 076278197..b4fb67d3d 100644 --- a/northd/ovn-northd.c +++ b/northd/ovn-northd.c @@ -225,7 +225,7 @@ enum ovn_stage { #define REG_ECMP_GROUP_ID "reg8[0..15]" #define REG_ECMP_MEMBER_ID "reg8[16..31]" -#define FLAGBIT_NOT_VXLAN "flags[1] == 0" +#define FLAGBIT_HAS_EGRESS_PORT "flags[1] == 0" /* Returns an "enum ovn_stage" built from the arguments. */ static enum ovn_stage @@ -5894,12 +5894,13 @@ build_lswitch_rport_arp_req_flow_for_ip(struct sset *ips, struct ds match = DS_EMPTY_INITIALIZER; struct ds actions = DS_EMPTY_INITIALIZER; - /* Packets received from VXLAN tunnels have already been through the - * router pipeline so we should skip them. Normally this is done by the - * multicast_group implementation (VXLAN packets skip table 32 which - * delivers to patch ports) but we're bypassing multicast_groups. + /* Packets that have an egress port have already been through the router + * pipeline so we should skip them. Normally this is done by the + * multicast_group implementation (packets lacking an egress port skip + * table 32 which delivers to patch ports) but we're bypassing + * multicast_groups. */ - ds_put_cstr(&match, FLAGBIT_NOT_VXLAN " && "); + ds_put_cstr(&match, FLAGBIT_HAS_EGRESS_PORT" && "); if (addr_family == AF_INET) { ds_put_cstr(&match, "arp.op == 1 && arp.tpa == { "); diff --git a/ovn-architecture.7.xml b/ovn-architecture.7.xml index 533ae716d..a415ad0e4 100644 --- a/ovn-architecture.7.xml +++ b/ovn-architecture.7.xml @@ -77,8 +77,8 @@ logical network into a physical network by bidirectionally forwarding packets between tunnels and a physical Ethernet port. This allows non-virtualized machines to participate in logical networks. A gateway - may be a physical host, a virtual machine, or an ASIC-based hardware - switch that supports the vtep(5) schema. + may be a physical host, a virtual machine, or a hardware switch (see + Ramp Gateways, below).

@@ -529,20 +529,27 @@ ones. OVN support multiple kinds of gateways.

-

VTEP Gateways

+

Ramp Gateways

- A ``VTEP gateway'' connects an OVN logical network to a physical (or - virtual) switch that implements the OVSDB VTEP schema that accompanies Open - vSwitch. (The ``VTEP gateway'' term is a misnomer, since a VTEP is just a - VXLAN Tunnel Endpoint, but it is a well established name.) See Life - Cycle of a VTEP gateway, below, for more information. + A ``ramp gateway'' acts like an on-ramp to an OVN logical network from a + physical (or virtual) switch, called a ``ramp switch'', that implements the + OVSDB VTEP schema that accompanies Open vSwitch. See Life Cycle of a + ramp gateway, below, for more information.

- The main intended use case for VTEP gateways is to attach physical servers - to an OVN logical network using a physical top-of-rack switch that supports - the OVSDB VTEP schema. + The main intended use case for ramp gateways is to attach physical servers + to an OVN logical network using a physical top-of-rack switch instead of a + server. Reasons to do this include convenience (the switch is already + there and supports this feature) or density (the switch has 40 ports and + it's difficult to add that many to a server). +

+ +

+ Previous versions of OVN referred to ramp gateways and ramp switches as + ``VTEP gateways'' and ``VTEP switches,'' respectively, but these terms are + misnomers, since a VTEP is just a VXLAN Tunnel Endpoint.

L2 Gateways

@@ -568,7 +575,7 @@ the transport between hypervisors. With an L2 gateway, packets are still transported between hypervisors over tunnels and the l2gateway port is only used for the packets that are on the physical network. The - application for L2 gateways is similar to that for VTEP gateways, e.g. to + application for L2 gateways is similar to that for ramp gateways, e.g. to add non-virtualized machines to a logical network, but L2 gateways do not require special support from top-of-rack hardware switches.

@@ -1134,7 +1141,7 @@

Geneve and STT tunnels pass this field as part of the tunnel key. Although VXLAN tunnels do not explicitly carry a logical input port, - OVN only uses VXLAN to communicate with gateways that from OVN's + OVN only uses VXLAN to communicate with ramp gateways, which from OVN's perspective consist of only a single logical port, so that OVN can set the logical input port field to this one on ingress to the OVN logical pipeline. @@ -1160,7 +1167,7 @@ an OVN hypervisor, the packet is resubmitted to table 8 to determine the output port(s); when the packet reaches table 32, these packets are resubmitted to table 33 for local delivery by - checking a MLF_RCV_FROM_VXLAN flag, which is set when the packet + checking a MLF_NO_EGRESS_PORT flag, which is set when the packet arrives from a VXLAN tunnel.

@@ -1399,12 +1406,12 @@
  • - A higher-priority rule to match packets received from VXLAN tunnels, - based on flag MLF_RCV_FROM_VXLAN, and resubmit these packets to table - 33 for local delivery. Packets received from VXLAN tunnels reach - here because of a lack of logical output port field in the tunnel key - and thus these packets needed to be submitted to table 8 to - determine the output port. + A higher-priority rule to match packets that were received without + egress port metadata, based on flag MLF_NO_EGRESS_PORT. The actions + resubmit these packets to table 33 for local delivery. This catches + packets received from VXLAN tunnels because of a lack of logical + output port field in the tunnel key and thus these packets needed to + be submitted to table 8 to determine the output port.
  • A higher-priority rule to match packets received from ports of type @@ -2062,12 +2069,15 @@ -

    Life Cycle of a VTEP gateway

    +

    Life Cycle of a ramp gateway

    - A gateway is a chassis that forwards traffic between the OVN-managed - part of a logical network and a physical VLAN, extending a - tunnel-based logical network into a physical network. + A gateway is a chassis that forwards traffic between the OVN-managed part + of a logical network and a physical VLAN, extending a tunnel-based logical + network into a physical network. A ``ramp gateway'' acts like an on-ramp + to an OVN logical network from a physical (or virtual) switch, called a + ``ramp switch'', that implements the OVSDB VTEP schema that accompanies + Open vSwitch. See Ramp Gateways, above, for more information.

    @@ -2079,19 +2089,19 @@

    1. - A VTEP gateway's life cycle begins with the administrator registering - the VTEP gateway as a Physical_Switch table entry in the + A ramp gateway's life cycle begins with the administrator registering + the ramp gateway as a Physical_Switch table entry in the VTEP database. The ovn-controller-vtep - connected to this VTEP database, will recognize the new VTEP gateway + connected to this VTEP database, will recognize the new ramp gateway and create a new Chassis table entry for it in the OVN_Southbound database.
    2. The administrator can then create a new Logical_Switch - table entry, and bind a particular vlan on a VTEP gateway's port to + table entry, and bind a particular vlan on a ramp gateway's port to any VTEP logical switch. Once a VTEP logical switch is bound to - a VTEP gateway, the ovn-controller-vtep will detect + a ramp gateway, the ovn-controller-vtep will detect it and add its name to the vtep_logical_switches column of the Chassis table in the OVN_Southbound database. Note, the tunnel_key @@ -2108,7 +2118,7 @@ of this entry must be set to "vtep". Next, the vtep-logical-switch and vtep-physical-switch keys in the options column must also be specified, since - multiple VTEP gateways can attach to the same VTEP logical switch. + multiple ramp gateways can attach to the same VTEP logical switch.
    3. @@ -2116,14 +2126,14 @@ database and its configuration will be passed down to the OVN_Southbound database as a new Port_Binding table entry. The ovn-controller-vtep will recognize the - change and bind the logical port to the corresponding VTEP gateway + change and bind the logical port to the corresponding ramp gateway chassis. Configuration of binding the same VTEP logical switch to a different OVN logical networks is not allowed and a warning will be generated in the log.
    4. - Beside binding to the VTEP gateway chassis, the + Beside binding to the ramp gateway chassis, the ovn-controller-vtep will update the tunnel_key column of the VTEP logical switch to the corresponding Datapath_Binding table entry's tunnel_key for the @@ -2135,13 +2145,13 @@ configuration change in the Port_Binding in the OVN_Northbound database, and updating the Ucast_Macs_Remote table in the VTEP database. - This allows the VTEP gateway to understand where to forward the unicast + This allows the ramp gateway to understand where to forward the unicast traffic coming from the extended external network.
    5. - Eventually, the VTEP gateway's life cycle ends when the administrator - unregisters the VTEP gateway from the VTEP database. + Eventually, the ramp gateway's life cycle ends when the administrator + unregisters the ramp gateway from the VTEP database. The ovn-controller-vtep will recognize the event and remove all related configurations (Chassis table entry and port bindings) in the OVN_Southbound database. @@ -2151,7 +2161,7 @@ When the ovn-controller-vtep is terminated, all related configurations in the OVN_Southbound database and the VTEP database will be cleaned, including - Chassis table entries for all registered VTEP gateways + Chassis table entries for all registered ramp gateways and their port bindings, and all Ucast_Macs_Remote table entries and the Logical_Switch tunnel keys.
    6. @@ -2658,7 +2668,7 @@

      - For connecting to gateways, in addition to Geneve and STT, OVN supports + For connecting to ramp gateways, in addition to Geneve and STT, OVN supports VXLAN, because only VXLAN support is common on top-of-rack (ToR) switches. Currently, gateways have a feature set that matches the capabilities as defined by the VTEP schema, so fewer bits of metadata are necessary. In diff --git a/ovn-nb.xml b/ovn-nb.xml index 541ec20c1..97d8890ff 100644 --- a/ovn-nb.xml +++ b/ovn-nb.xml @@ -549,7 +549,7 @@

      vtep
      - A port to a logical switch on a VTEP gateway. + A port to a logical switch on a ramp gateway.
      external
      @@ -746,17 +746,19 @@ - +

      - These options apply when is vtep. + These options apply when is vtep, + that is, when the port is used to attach a ramp gateway to an OVN + logical switch.

      - Required. The name of the VTEP gateway. + Required. The name of the ramp gateway. - Required. A logical switch name connected by the VTEP gateway. + Required. A logical switch name connected by the ramp gateway.
      diff --git a/ovn-sb.xml b/ovn-sb.xml index 3ae9d4f92..98d3ba007 100644 --- a/ovn-sb.xml +++ b/ovn-sb.xml @@ -354,7 +354,7 @@

      - Stores all VTEP logical switch names connected by this gateway + Stores all ramp logical switch names connected by this gateway chassis. The table entry with :vtep-physical-switch equal , and @@ -417,7 +417,7 @@

      Not all devices see such a benefit. The most notable exception is - hardware VTEPs. These devices are designed to not buffer entire + ramp switches. These devices are designed to not buffer entire packets in their switching engines and are therefore unable to efficiently compute or validate full packet checksums. In addition certain versions of the Linux kernel are not able to fully take @@ -428,7 +428,7 @@

      - csum defaults to false for hardware VTEPs and + csum defaults to false for ramp switches and true for all other cases.

      @@ -2494,7 +2494,7 @@ tcp.flags = RST;
      vtep
      - The physical location of the hardware_vtep gateway. To successfully + The physical location of the ramp gateway. To successfully identify a chassis, this column must be a record. This is populated by ovn-controller-vtep.
      @@ -2631,7 +2631,7 @@ tcp.flags = RST;
      vtep
      - A port to a logical switch on a VTEP gateway chassis. In order to + A port to a logical switch on a ramp gateway chassis. In order to get this port correctly recognized by the OVN controller, the :vtep-physical-switch and - +

      These options apply to logical ports with of - vtep. + vtep, that is, ports that attach a ramp gateway to an OVN + logical switch.

      - Required. The name of the VTEP gateway. + Required. The name of the ramp gateway. - Required. A logical switch name connected by the VTEP gateway. Must + Required. A logical switch name connected by the ramp gateway. Must be set when is vtep.
      diff --git a/utilities/ovn-nbctl.8.xml b/utilities/ovn-nbctl.8.xml index d973be259..7a734a494 100644 --- a/utilities/ovn-nbctl.8.xml +++ b/utilities/ovn-nbctl.8.xml @@ -429,7 +429,7 @@
      vtep
      - A port to a logical switch on a VTEP gateway. + A port to a logical switch on a ramp gateway.
      From patchwork Tue Mar 31 17:44:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Numan Siddique X-Patchwork-Id: 1264863 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48sGtt41yfz9sQt for ; Wed, 1 Apr 2020 04:45:10 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 3335B888BA; Tue, 31 Mar 2020 17:45:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kUUk9KmqmF7w; Tue, 31 Mar 2020 17:45:02 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id 8FB5A88890; Tue, 31 Mar 2020 17:45:02 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 78BDFC1AE8; Tue, 31 Mar 2020 17:45:02 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id A355CC07FF for ; Tue, 31 Mar 2020 17:45:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 9372686B94 for ; Tue, 31 Mar 2020 17:45:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9gtHfibQUjFA for ; Tue, 31 Mar 2020 17:44:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by whitealder.osuosl.org (Postfix) with ESMTPS id 8E75687D4B for ; Tue, 31 Mar 2020 17:44:56 +0000 (UTC) X-Originating-IP: 115.99.222.43 Received: from nummac.local (unknown [115.99.222.43]) (Authenticated sender: numans@ovn.org) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 69AC8240006; Tue, 31 Mar 2020 17:44:50 +0000 (UTC) From: numans@ovn.org To: dev@openvswitch.org Date: Tue, 31 Mar 2020 23:14:43 +0530 Message-Id: <20200331174443.950530-1-numans@ovn.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200331174348.950311-1-numans@ovn.org> References: <20200331174348.950311-1-numans@ovn.org> MIME-Version: 1.0 Subject: [ovs-dev] [PATCH ovn 2/2] Rename "ovn-controller-vtep" to "ovn-controller-ramp" X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" From: Numan Siddique The previous patch in this series, introduced the term "ramp" which subsituted for the usage of "vtep" in the documentation and other places. This patch renames the program name "ovn-controller-vtep" to "ovn-controller-ramp" and also attemps to rename the usage of term "vtep" to "ramp" in the code base. This patch doesn't attemp to rename in the places where it is hard. This could be addressed as follow up patches. Signed-off-by: Numan Siddique --- Makefile.am | 2 +- NEWS | 1 + controller-ramp/.gitignore | 2 + controller-ramp/automake.mk | 14 ++++ .../binding.c | 6 +- .../binding.h | 6 +- .../gateway.c | 10 +-- .../gateway.h | 6 +- .../ovn-controller-ramp.8.xml | 14 ++-- .../ovn-controller-ramp.c | 18 ++--- .../ovn-controller-ramp.h | 2 +- .../vtep.c => controller-ramp/ramp.c | 10 +-- .../vtep.h => controller-ramp/ramp.h | 6 +- controller-vtep/.gitignore | 2 - controller-vtep/automake.mk | 14 ---- rhel/automake.mk | 2 +- rhel/ovn-fedora.spec.in | 75 +++---------------- ...ystemd_system_ovn-controller-ramp.service} | 22 +++--- tests/automake.mk | 4 +- ...troller-vtep.at => ovn-controller-ramp.at} | 70 ++++++++--------- tests/ovn-macros.at | 4 +- tests/ovn.at | 6 +- tests/testsuite.at | 2 +- 23 files changed, 122 insertions(+), 176 deletions(-) create mode 100644 controller-ramp/.gitignore create mode 100644 controller-ramp/automake.mk rename {controller-vtep => controller-ramp}/binding.c (98%) rename {controller-vtep => controller-ramp}/binding.h (84%) rename {controller-vtep => controller-ramp}/gateway.c (97%) rename {controller-vtep => controller-ramp}/gateway.h (84%) rename controller-vtep/ovn-controller-vtep.8.xml => controller-ramp/ovn-controller-ramp.8.xml (85%) rename controller-vtep/ovn-controller-vtep.c => controller-ramp/ovn-controller-ramp.c (94%) rename controller-vtep/ovn-controller-vtep.h => controller-ramp/ovn-controller-ramp.h (97%) rename controller-vtep/vtep.c => controller-ramp/ramp.c (99%) rename controller-vtep/vtep.h => controller-ramp/ramp.h (85%) delete mode 100644 controller-vtep/.gitignore delete mode 100644 controller-vtep/automake.mk rename rhel/{usr_lib_systemd_system_ovn-controller-vtep.service => usr_lib_systemd_system_ovn-controller-ramp.service} (67%) rename tests/{ovn-controller-vtep.at => ovn-controller-ramp.at} (92%) diff --git a/Makefile.am b/Makefile.am index af3fa1ed3..2c4e14712 100644 --- a/Makefile.am +++ b/Makefile.am @@ -503,7 +503,7 @@ include xenserver/automake.mk include tutorial/automake.mk include selinux/automake.mk include controller/automake.mk -include controller-vtep/automake.mk +include controller-ramp/automake.mk include northd/automake.mk include ic/automake.mk include build-aux/automake.mk diff --git a/NEWS b/NEWS index cb322d03e..334926e3e 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,7 @@ Post-v20.03.0 -------------------------- - "VTEP" gateways and switches have been renamed "ramp" gateways and switches, to better distinguish them from everyday use of VXLAN. + - "ovn-controller-vtep" has been renamed to "ovn-controller-ramp". OVN v20.03.0 - xx xxx xxxx diff --git a/controller-ramp/.gitignore b/controller-ramp/.gitignore new file mode 100644 index 000000000..7311f3569 --- /dev/null +++ b/controller-ramp/.gitignore @@ -0,0 +1,2 @@ +/ovn-controller-ramp +/ovn-controller-ramp.8 diff --git a/controller-ramp/automake.mk b/controller-ramp/automake.mk new file mode 100644 index 000000000..3c4870dca --- /dev/null +++ b/controller-ramp/automake.mk @@ -0,0 +1,14 @@ +bin_PROGRAMS += controller-ramp/ovn-controller-ramp +controller_ramp_ovn_controller_ramp_SOURCES = \ + controller-ramp/binding.c \ + controller-ramp/binding.h \ + controller-ramp/gateway.c \ + controller-ramp/gateway.h \ + controller-ramp/ovn-controller-ramp.c \ + controller-ramp/ovn-controller-ramp.h \ + controller-ramp/ramp.c \ + controller-ramp/ramp.h +controller_ramp_ovn_controller_ramp_LDADD = lib/libovn.la $(OVS_LIBDIR)/libopenvswitch.la $(OVSBUILDDIR)/vtep/libvtep.la +man_MANS += controller-ramp/ovn-controller-ramp.8 +EXTRA_DIST += controller-ramp/ovn-controller-ramp.8.xml +CLEANFILES += controller-ramp/ovn-controller-ramp.8 diff --git a/controller-vtep/binding.c b/controller-ramp/binding.c similarity index 98% rename from controller-vtep/binding.c rename to controller-ramp/binding.c index 83377157e..e6c791d6f 100644 --- a/controller-vtep/binding.c +++ b/controller-ramp/binding.c @@ -20,7 +20,7 @@ #include "lib/smap.h" #include "lib/util.h" #include "openvswitch/vlog.h" -#include "ovn-controller-vtep.h" +#include "ovn-controller-ramp.h" #include "lib/ovn-sb-idl.h" #include "vtep/vtep-idl.h" @@ -117,7 +117,7 @@ update_pb_chassis(const struct sbrec_port_binding *port_binding_rec, /* Checks and updates logical port to vtep logical switch bindings for each * physical switch in VTEP. */ void -binding_run(struct controller_vtep_ctx *ctx) +binding_run(struct controller_ramp_ctx *ctx) { if (!ctx->ovnsb_idl_txn) { return; @@ -229,7 +229,7 @@ binding_run(struct controller_vtep_ctx *ctx) * Returns true when done (i.e. there is no change made to 'ctx->ovnsb_idl'), * otherwise returns false. */ bool -binding_cleanup(struct controller_vtep_ctx *ctx) +binding_cleanup(struct controller_ramp_ctx *ctx) { if (!ctx->ovnsb_idl_txn) { return false; diff --git a/controller-vtep/binding.h b/controller-ramp/binding.h similarity index 84% rename from controller-vtep/binding.h rename to controller-ramp/binding.h index 374c1ccf8..a086e62b8 100644 --- a/controller-vtep/binding.h +++ b/controller-ramp/binding.h @@ -19,9 +19,9 @@ #include -struct controller_vtep_ctx; +struct controller_ramp_ctx; -void binding_run(struct controller_vtep_ctx *); -bool binding_cleanup(struct controller_vtep_ctx *); +void binding_run(struct controller_ramp_ctx *); +bool binding_cleanup(struct controller_ramp_ctx *); #endif /* ovn/controller-gw/binding.h */ diff --git a/controller-vtep/gateway.c b/controller-ramp/gateway.c similarity index 97% rename from controller-vtep/gateway.c rename to controller-ramp/gateway.c index 636dab365..41bf080dc 100644 --- a/controller-vtep/gateway.c +++ b/controller-ramp/gateway.c @@ -23,7 +23,7 @@ #include "openvswitch/vlog.h" #include "lib/ovn-sb-idl.h" #include "vtep/vtep-idl.h" -#include "ovn-controller-vtep.h" +#include "ovn-controller-ramp.h" VLOG_DEFINE_THIS_MODULE(gateway); @@ -72,7 +72,7 @@ create_chassis_rec(struct ovsdb_idl_txn *txn, const char *name, * * */ static void -revalidate_gateway(struct controller_vtep_ctx *ctx) +revalidate_gateway(struct controller_ramp_ctx *ctx) { const struct vteprec_physical_switch *pswitch; @@ -147,7 +147,7 @@ revalidate_gateway(struct controller_vtep_ctx *ctx) /* Updates the 'vtep_logical_switches' column in the Chassis table based * on vtep database configuration. */ static void -update_vtep_logical_switches(struct controller_vtep_ctx *ctx) +update_vtep_logical_switches(struct controller_ramp_ctx *ctx) { const struct vteprec_physical_switch *pswitch; @@ -185,7 +185,7 @@ update_vtep_logical_switches(struct controller_vtep_ctx *ctx) void -gateway_run(struct controller_vtep_ctx *ctx) +gateway_run(struct controller_ramp_ctx *ctx) { if (!ctx->ovnsb_idl_txn) { return; @@ -199,7 +199,7 @@ gateway_run(struct controller_vtep_ctx *ctx) * Returns true when done (i.e. there is no change made to 'ctx->ovnsb_idl'), * otherwise returns false. */ bool -gateway_cleanup(struct controller_vtep_ctx *ctx) +gateway_cleanup(struct controller_ramp_ctx *ctx) { static bool simap_destroyed = false; const struct vteprec_physical_switch *pswitch; diff --git a/controller-vtep/gateway.h b/controller-ramp/gateway.h similarity index 84% rename from controller-vtep/gateway.h rename to controller-ramp/gateway.h index 0086191d9..235054dbb 100644 --- a/controller-vtep/gateway.h +++ b/controller-ramp/gateway.h @@ -18,9 +18,9 @@ #include -struct controller_vtep_ctx; +struct controller_ramp_ctx; -void gateway_run(struct controller_vtep_ctx *); -bool gateway_cleanup(struct controller_vtep_ctx *); +void gateway_run(struct controller_ramp_ctx *); +bool gateway_cleanup(struct controller_ramp_ctx *); #endif /* ovn/controller-gw/gateway.h */ diff --git a/controller-vtep/ovn-controller-vtep.8.xml b/controller-ramp/ovn-controller-ramp.8.xml similarity index 85% rename from controller-vtep/ovn-controller-vtep.8.xml rename to controller-ramp/ovn-controller-ramp.8.xml index 2c706e46e..253f6b556 100644 --- a/controller-vtep/ovn-controller-vtep.8.xml +++ b/controller-ramp/ovn-controller-ramp.8.xml @@ -1,22 +1,22 @@ - +

      Name

      -

      ovn-controller-vtep -- Open Virtual Network local controller for +

      ovn-controller-ramp -- Open Virtual Network local controller for vtep enabled physical switches.

      Synopsis

      -

      ovn-controller-vtep [options] - [--vtep-db=vtep-database] [--ovnsb-db=ovnsb-database] +

      ovn-controller-ramp [options] + [--ramp-db=ramp-database] [--ovnsb-db=ovnsb-database]

      Description

      - ovn-controller-vtep is the local controller daemon in + ovn-controller-ramp is the local controller daemon in OVN, the Open Virtual Network, for VTEP enabled physical switches. It connects up to the OVN Southbound database (see ovn-sb(5)) over the OVSDB protocol, and down to the VTEP - database (see vtep(5)) over the OVSDB protocol. + database (see ramp(5)) over the OVSDB protocol.

      PKI Options

      @@ -30,7 +30,7 @@

      Configuration

      - ovn-controller-vtep retrieves its configuration + ovn-controller-ramp retrieves its configuration information from both the ovnsb and the vtep database. If the database locations are not given from command line, the default is the db.sock in local OVSDB's 'run' directory. diff --git a/controller-vtep/ovn-controller-vtep.c b/controller-ramp/ovn-controller-ramp.c similarity index 94% rename from controller-vtep/ovn-controller-vtep.c rename to controller-ramp/ovn-controller-ramp.c index b30a731d4..3cec834a7 100644 --- a/controller-vtep/ovn-controller-vtep.c +++ b/controller-ramp/ovn-controller-ramp.c @@ -40,10 +40,10 @@ #include "binding.h" #include "gateway.h" -#include "vtep.h" -#include "ovn-controller-vtep.h" +#include "ramp.h" +#include "ovn-controller-ramp.h" -static unixctl_cb_func ovn_controller_vtep_exit; +static unixctl_cb_func ovn_controller_ramp_exit; static void parse_options(int argc, char *argv[]); OVS_NO_RETURN static void usage(void); @@ -71,7 +71,7 @@ main(int argc, char *argv[]) if (retval) { exit(EXIT_FAILURE); } - unixctl_command_register("exit", "", 0, 0, ovn_controller_vtep_exit, + unixctl_command_register("exit", "", 0, 0, ovn_controller_ramp_exit, &exiting); daemonize_complete(); @@ -89,7 +89,7 @@ main(int argc, char *argv[]) /* Main loop. */ exiting = false; while (!exiting) { - struct controller_vtep_ctx ctx = { + struct controller_ramp_ctx ctx = { .vtep_idl = vtep_idl_loop.idl, .vtep_idl_txn = ovsdb_idl_loop_run(&vtep_idl_loop), .ovnsb_idl = ovnsb_idl_loop.idl, @@ -98,7 +98,7 @@ main(int argc, char *argv[]) gateway_run(&ctx); binding_run(&ctx); - vtep_run(&ctx); + ramp_run(&ctx); unixctl_server_run(unixctl); unixctl_server_wait(unixctl); @@ -116,7 +116,7 @@ main(int argc, char *argv[]) /* It's time to exit. Clean up the databases. */ bool done = false; while (!done) { - struct controller_vtep_ctx ctx = { + struct controller_ramp_ctx ctx = { .vtep_idl = vtep_idl_loop.idl, .vtep_idl_txn = ovsdb_idl_loop_run(&vtep_idl_loop), .ovnsb_idl = ovnsb_idl_loop.idl, @@ -127,7 +127,7 @@ main(int argc, char *argv[]) * We're done if all of them return true. */ done = binding_cleanup(&ctx); done = gateway_cleanup(&ctx) && done; - done = vtep_cleanup(&ctx) && done; + done = ramp_cleanup(&ctx) && done; if (done) { poll_immediate_wake(); } @@ -262,7 +262,7 @@ Options:\n\ static void -ovn_controller_vtep_exit(struct unixctl_conn *conn, int argc OVS_UNUSED, +ovn_controller_ramp_exit(struct unixctl_conn *conn, int argc OVS_UNUSED, const char *argv[] OVS_UNUSED, void *exiting_) { bool *exiting = exiting_; diff --git a/controller-vtep/ovn-controller-vtep.h b/controller-ramp/ovn-controller-ramp.h similarity index 97% rename from controller-vtep/ovn-controller-vtep.h rename to controller-ramp/ovn-controller-ramp.h index 0eacdbe30..b8f78ce2f 100644 --- a/controller-vtep/ovn-controller-vtep.h +++ b/controller-ramp/ovn-controller-ramp.h @@ -22,7 +22,7 @@ struct ovsdb_idl; struct ovsdb_idl_txn; -struct controller_vtep_ctx { +struct controller_ramp_ctx { struct ovsdb_idl *ovnsb_idl; struct ovsdb_idl_txn *ovnsb_idl_txn; diff --git a/controller-vtep/vtep.c b/controller-ramp/ramp.c similarity index 99% rename from controller-vtep/vtep.c rename to controller-ramp/ramp.c index e2baca5a7..45b47ecf5 100644 --- a/controller-vtep/vtep.c +++ b/controller-ramp/ramp.c @@ -15,7 +15,7 @@ #include -#include "vtep.h" +#include "ramp.h" #include "lib/hash.h" #include "openvswitch/hmap.h" @@ -23,7 +23,7 @@ #include "lib/smap.h" #include "lib/sset.h" #include "lib/util.h" -#include "ovn-controller-vtep.h" +#include "ovn-controller-ramp.h" #include "openvswitch/vlog.h" #include "lib/ovn-sb-idl.h" #include "vtep/vtep-idl.h" @@ -475,7 +475,7 @@ vtep_mcast_macs_cleanup(struct ovsdb_idl *vtep_idl) /* Updates vtep logical switch tunnel keys. */ void -vtep_run(struct controller_vtep_ctx *ctx) +ramp_run(struct controller_ramp_ctx *ctx) { if (!ctx->vtep_idl_txn) { return; @@ -578,10 +578,10 @@ vtep_run(struct controller_vtep_ctx *ctx) shash_destroy(&non_vtep_pbs); } -/* Cleans up all related entries in vtep. Returns true when done (i.e. there +/* Cleans up all related entries in ramp. Returns true when done (i.e. there * is no change made to 'ctx->vtep_idl'), otherwise returns false. */ bool -vtep_cleanup(struct controller_vtep_ctx *ctx) +ramp_cleanup(struct controller_ramp_ctx *ctx) { if (!ctx->vtep_idl_txn) { return false; diff --git a/controller-vtep/vtep.h b/controller-ramp/ramp.h similarity index 85% rename from controller-vtep/vtep.h rename to controller-ramp/ramp.h index 97c87b7a7..af6e93798 100644 --- a/controller-vtep/vtep.h +++ b/controller-ramp/ramp.h @@ -19,9 +19,9 @@ #include -struct controller_vtep_ctx; +struct controller_ramp_ctx; -void vtep_run(struct controller_vtep_ctx *); -bool vtep_cleanup(struct controller_vtep_ctx *); +void ramp_run(struct controller_ramp_ctx *); +bool ramp_cleanup(struct controller_ramp_ctx *); #endif /* ovn/controller-vtep/vtep.h */ diff --git a/controller-vtep/.gitignore b/controller-vtep/.gitignore deleted file mode 100644 index 3ec8072c7..000000000 --- a/controller-vtep/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/ovn-controller-vtep -/ovn-controller-vtep.8 diff --git a/controller-vtep/automake.mk b/controller-vtep/automake.mk deleted file mode 100644 index a5779eba6..000000000 --- a/controller-vtep/automake.mk +++ /dev/null @@ -1,14 +0,0 @@ -bin_PROGRAMS += controller-vtep/ovn-controller-vtep -controller_vtep_ovn_controller_vtep_SOURCES = \ - controller-vtep/binding.c \ - controller-vtep/binding.h \ - controller-vtep/gateway.c \ - controller-vtep/gateway.h \ - controller-vtep/ovn-controller-vtep.c \ - controller-vtep/ovn-controller-vtep.h \ - controller-vtep/vtep.c \ - controller-vtep/vtep.h -controller_vtep_ovn_controller_vtep_LDADD = lib/libovn.la $(OVS_LIBDIR)/libopenvswitch.la $(OVSBUILDDIR)/vtep/libvtep.la -man_MANS += controller-vtep/ovn-controller-vtep.8 -EXTRA_DIST += controller-vtep/ovn-controller-vtep.8.xml -CLEANFILES += controller-vtep/ovn-controller-vtep.8 diff --git a/rhel/automake.mk b/rhel/automake.mk index 661975ea9..052a5d72b 100644 --- a/rhel/automake.mk +++ b/rhel/automake.mk @@ -12,7 +12,7 @@ EXTRA_DIST += \ rhel/ovn-fedora.spec \ rhel/ovn-fedora.spec.in \ rhel/usr_lib_systemd_system_ovn-controller.service \ - rhel/usr_lib_systemd_system_ovn-controller-vtep.service \ + rhel/usr_lib_systemd_system_ovn-controller-ramp.service \ rhel/usr_lib_systemd_system_ovn-northd.service \ rhel/usr_lib_firewalld_services_ovn-central-firewall-service.xml \ rhel/usr_lib_firewalld_services_ovn-host-firewall-service.xml \ diff --git a/rhel/ovn-fedora.spec.in b/rhel/ovn-fedora.spec.in index 6a59ccc40..1e861c5f3 100644 --- a/rhel/ovn-fedora.spec.in +++ b/rhel/ovn-fedora.spec.in @@ -95,15 +95,15 @@ Provides: openvswitch-ovn-host = %{?epoch:%{epoch}:}%{version}-%{release} %description host OVN controller running on each host. -%package vtep +%package ramp Summary: Open Virtual Network support License: ASL 2.0 Requires: ovn -Obsoletes: openvswitch-ovn-vtep -Provides: openvswitch-ovn-vtep = %{?epoch:%{epoch}:}%{version}-%{release} +Obsoletes: openvswitch-ovn-vtep ovn-vtep +Provides: openvswitch-ovn-vtep = %{?epoch:%{epoch}:}%{version}-%{release} ovn-vtep -%description vtep -OVN vtep controller +%description ramp +OVN ramp controller %package docker Summary: Open Virtual Network support @@ -161,7 +161,7 @@ install -p -D -m 0644 \ rhel/usr_share_ovn_scripts_systemd_sysconfig.template \ $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/ovn -for service in ovn-controller ovn-controller-vtep ovn-northd; do +for service in ovn-controller ovn-controller-ramp ovn-northd; do install -p -D -m 0644 \ rhel/usr_lib_systemd_system_${service}.service \ $RPM_BUILD_ROOT%{_unitdir}/${service}.service @@ -247,20 +247,6 @@ if [ $1 -eq 1 ] ; then fi fi -%pre vtep -if [ $1 -eq 1 ] ; then - # Package install. - /bin/systemctl status ovn-controller-vtep.service >/dev/null - ovn_status=$? - rpm -ql openvswitch-ovn-vtep > /dev/null - if [[ "$?" = "0" && "$ovn_status" = "0" ]]; then - # ovn-controller-vtep service is running which means old - # openvswitch-ovn-vtep is installed and it will be cleaned up. So - # start ovn-controller-vtep service when posttrans host is called. - touch %{_localstatedir}/lib/rpm-state/ovn-controller-vtep - fi -fi - %preun central %if 0%{?systemd_preun:1} %systemd_preun ovn-northd.service @@ -283,17 +269,6 @@ fi fi %endif -%preun vtep -%if 0%{?systemd_preun:1} - %systemd_preun ovn-controller-vtep.service -%else - if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable ovn-controller-vtep.service >/dev/null 2>&1 || : - /bin/systemctl stop ovn-controller-vtep.service >/dev/null 2>&1 || : - fi -%endif - %post %if %{with libcapng} if [ $1 -eq 1 ]; then @@ -322,16 +297,6 @@ fi fi %endif -%post vtep -%if 0%{?systemd_post:1} - %systemd_post ovn-controller-vtep.service -%else - # Package install, not upgrade - if [ $1 -eq 1 ]; then - /bin/systemctl daemon-reload >dev/null || : - fi -%endif - %postun %postun central @@ -356,17 +321,6 @@ fi fi %endif -%postun vtep -%if 0%{?systemd_postun_with_restart:1} - %systemd_postun_with_restart ovn-controller-vtep.service -%else - /bin/systemctl daemon-reload >/dev/null 2>&1 || : - if [ "$1" -ge "1" ] ; then - # Package upgrade, not uninstall - /bin/systemctl try-restart ovn-controller-vtep.service >/dev/null 2>&1 || : - fi -%endif - %posttrans central if [ $1 -eq 1 ]; then # Package install, not upgrade @@ -386,15 +340,6 @@ if [ $1 -eq 1 ]; then fi fi -%posttrans vtep -if [ $1 -eq 1 ]; then - # Package install, not upgrade - if [ -e %{_localstatedir}/lib/rpm-state/ovn-controller-vtep ]; then - rm %{_localstatedir}/lib/rpm-state/ovn-controller-vtep - /bin/systemctl start ovn-controller-vtep.service >/dev/null 2>&1 || : - fi -fi - %files %config(noreplace) %{_sysconfdir}/sysconfig/ovn %{_bindir}/ovn-nbctl @@ -448,10 +393,10 @@ fi %{_unitdir}/ovn-controller.service %{_prefix}/lib/firewalld/services/ovn-host-firewall-service.xml -%files vtep -%{_bindir}/ovn-controller-vtep -%{_mandir}/man8/ovn-controller-vtep.8* -%{_unitdir}/ovn-controller-vtep.service +%files ramp +%{_bindir}/ovn-controller-ramp +%{_mandir}/man8/ovn-controller-ramp.8* +%{_unitdir}/ovn-controller-ramp.service %changelog * Thu Dec 20 2018 Numan Siddique diff --git a/rhel/usr_lib_systemd_system_ovn-controller-vtep.service b/rhel/usr_lib_systemd_system_ovn-controller-ramp.service similarity index 67% rename from rhel/usr_lib_systemd_system_ovn-controller-vtep.service rename to rhel/usr_lib_systemd_system_ovn-controller-ramp.service index 09ad0612c..f220e46f6 100644 --- a/rhel/usr_lib_systemd_system_ovn-controller-vtep.service +++ b/rhel/usr_lib_systemd_system_ovn-controller-ramp.service @@ -1,33 +1,33 @@ -# See ovn-controller-vtep(8) for details about ovn-controller-vtep. +# See ovn-controller-ramp(8) for details about ovn-controller-ramp. # # You may override the following variables to customize ovn-controller-vtep # behavior: # # OVN_DB - Set this variable to the location of the ovsdb server that is # serving the OVN_Southbound database. See the manpage for -# ovn-controller-vtep for more details on the format for the db +# ovn-controller-ramp for more details on the format for the db # location. # # VTEP_DB - Set this variable to the location of the ovsdb server that is # serving the hardware_vtep database. See the manpage for -# ovn-controller-vtep for more details on the format for the db +# ovn-controller-ramp for more details on the format for the db # location. # # To override these variables, you may create a configuration file -# in the /etc/systemd/system/ovn-controller-vtep.d/ directory. For example, +# in the /etc/systemd/system/ovn-controller-ramp.d/ directory. For example, # you could place the following contents in -# /etc/systemd/system/ovn-controller-vtep.d/local.conf: +# /etc/systemd/system/ovn-controller-ramp.d/local.conf: # # [System] # Environment="OVN_DB=unix:/usr/local/var/run/ovn/db.sock" "VTEP_DB=unix:/usr/local/var/run/ovn/vtep.sock" # -# Alternatively, you may specify environment variables in the file /etc/sysconfig/ovn-controller-vtep: +# Alternatively, you may specify environment variables in the file /etc/sysconfig/ovn-controller-ramp: # # OVN_DB="unix:/usr/local/var/run/ovn/db.sock" # VTEP_DB="unix:/usr/local/var/run/ovn/vtep.sock" [Unit] -Description=OVN VTEP gateway controller daemon +Description=OVN RAMP gateway controller daemon After=syslog.target Requires=openvswitch.service After=openvswitch.service @@ -40,11 +40,11 @@ Environment=OVN_RUNDIR=%t/ovn Environment=OVN_DB=unix:%t/ovn/ovnsb_db.sock EnvironmentFile=-/etc/sysconfig/ovn Environment=VTEP_DB=unix:%t/openvswitch/db.sock -EnvironmentFile=-/etc/sysconfig/ovn-controller-vtep -ExecStart=/usr/bin/ovn-controller-vtep -vconsole:emer -vsyslog:err -vfile:info \ - --log-file=/var/log/ovn/ovn-controller-vtep.log \ +EnvironmentFile=-/etc/sysconfig/ovn-controller-ramp +ExecStart=/usr/bin/ovn-controller-ramp -vconsole:emer -vsyslog:err -vfile:info \ + --log-file=/var/log/ovn/ovn-controller-ramp.log \ --ovn-user=${OVN_USER_ID} \ - --no-chdir --pidfile=${OVN_RUNDIR}/ovn-controller-vtep.pid \ + --no-chdir --pidfile=${OVN_RUNDIR}/ovn-controller-ramp.pid \ --ovnsb-db=${OVN_DB} --vtep-db=${VTEP_DB} [Install] diff --git a/tests/automake.mk b/tests/automake.mk index 215fb432b..158c50d6f 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -27,7 +27,7 @@ TESTSUITE_AT = \ tests/ovn-ic-nbctl.at \ tests/ovn-ic-sbctl.at \ tests/ovn-controller.at \ - tests/ovn-controller-vtep.at \ + tests/ovn-controller-ramp.at \ tests/ovn-ic.at \ tests/ovn-macros.at \ tests/ovn-performance.at @@ -55,7 +55,7 @@ SYSTEM_KMOD_TESTSUITE = $(srcdir)/tests/system-kmod-testsuite SYSTEM_USERSPACE_TESTSUITE = $(srcdir)/tests/system-userspace-testsuite DISTCLEANFILES += tests/atconfig tests/atlocal -AUTOTEST_PATH = $(ovs_builddir)/utilities:$(ovs_builddir)/vswitchd:$(ovs_builddir)/ovsdb:$(ovs_builddir)/vtep:tests:$(PTHREAD_WIN32_DIR_DLL):$(SSL_DIR):controller-vtep:northd:utilities:controller:ic +AUTOTEST_PATH = $(ovs_builddir)/utilities:$(ovs_builddir)/vswitchd:$(ovs_builddir)/ovsdb:$(ovs_builddir)/vtep:tests:$(PTHREAD_WIN32_DIR_DLL):$(SSL_DIR):controller-ramp:northd:utilities:controller:ic export ovs_srcdir diff --git a/tests/ovn-controller-vtep.at b/tests/ovn-controller-ramp.at similarity index 92% rename from tests/ovn-controller-vtep.at rename to tests/ovn-controller-ramp.at index 3092dd5ca..9042124a1 100644 --- a/tests/ovn-controller-vtep.at +++ b/tests/ovn-controller-ramp.at @@ -1,6 +1,6 @@ -AT_BANNER([ovn_controller_vtep]) +AT_BANNER([ovn_controller_ramp]) -# OVN_CONTROLLER_VTEP_START +# OVN_CONTROLLER_RAMP_START # # Starts the test with a setup with vtep device. Each test case must first # call this macro. @@ -11,7 +11,7 @@ AT_BANNER([ovn_controller_vtep]) # Configures ovn-nb with a logical switch 'br-test'. # # -m4_define([OVN_CONTROLLER_VTEP_START], +m4_define([OVN_CONTROLLER_RAMP_START], [ AT_KEYWORDS([ovn]) # this will cause skip when 'make check' using Windows setup. @@ -69,24 +69,24 @@ m4_define([OVN_CONTROLLER_VTEP_START], /vlog|INFO|opened log file/d']]) AT_CAPTURE_FILE([ovn-northd.log]) - dnl Start ovn-controllger-vtep. - AT_CHECK([ovn-controller-vtep --detach --no-chdir --pidfile --log-file --vtep-db=unix:$OVS_RUNDIR/db.sock --ovnsb-db=unix:$OVS_RUNDIR/ovnsb_db.sock], [0], [], [stderr]) - AT_CAPTURE_FILE([ovn-controller-vtep.log]) - on_exit "kill `cat ovn-controller-vtep.pid`" + dnl Start ovn-controller-ramp. + AT_CHECK([ovn-controller-ramp --detach --no-chdir --pidfile --log-file --vtep-db=unix:$OVS_RUNDIR/db.sock --ovnsb-db=unix:$OVS_RUNDIR/ovnsb_db.sock], [0], [], [stderr]) + AT_CAPTURE_FILE([ovn-controller-ramp.log]) + on_exit "kill `cat ovn-controller-ramp.pid`" AT_CHECK([[sed < stderr ' /vlog|INFO|opened log file/d /reconnect|INFO|/d']]) ]) -# OVN_CONTROLLER_VTEP_STOP +# OVN_CONTROLLER_RAMP_STOP # # So many exits... Yeah, we started a lot daemons~ # -m4_define([OVN_CONTROLLER_VTEP_STOP], +m4_define([OVN_CONTROLLER_RAMP_STOP], [AT_CHECK([check_logs "$1"]) OVS_APP_EXIT_AND_WAIT([ovs-vtep]) OVS_APP_EXIT_AND_WAIT([ovn-northd]) - OVS_APP_EXIT_AND_WAIT([ovn-controller-vtep]) + OVS_APP_EXIT_AND_WAIT([ovn-controller-ramp]) OVS_APP_EXIT_AND_WAIT([ovsdb-server]) OVS_APP_EXIT_AND_WAIT([ovs-vswitchd])]) @@ -106,8 +106,8 @@ AT_CHECK([ovn-nbctl lsp-set-options $2 vtep-physical-switch=$3 vtep-logical-swit ############################################## # tests chassis related updates. -AT_SETUP([ovn-controller-vtep - chassis]) -OVN_CONTROLLER_VTEP_START +AT_SETUP([ovn-controller-ramp - chassis]) +OVN_CONTROLLER_RAMP_START # verifies the initial ovn-sb db configuration. OVS_WAIT_UNTIL([test -n "`ovn-sbctl show | grep Chassis`"]) @@ -121,8 +121,8 @@ Chassis br-vtep # deletes the chassis via ovn-sbctl and check that it is readded back # with the log. AT_CHECK([ovn-sbctl chassis-del br-vtep]) -OVS_WAIT_UNTIL([test -n "`grep WARN ovn-controller-vtep.log`"]) -AT_CHECK([sed -n 's/^.*\(|WARN|.*\)$/\1/p' ovn-controller-vtep.log], [0], [dnl +OVS_WAIT_UNTIL([test -n "`grep WARN ovn-controller-ramp.log`"]) +AT_CHECK([sed -n 's/^.*\(|WARN|.*\)$/\1/p' ovn-controller-ramp.log], [0], [dnl |WARN|Chassis for VTEP physical switch (br-vtep) disappears, maybe deleted by ovn-sbctl, adding it back ]) @@ -169,13 +169,13 @@ AT_CHECK([ovn-sbctl --columns=vtep_logical_switches list Chassis | cut -d ':' -f [[]] ]) -OVN_CONTROLLER_VTEP_STOP([/Chassis for VTEP physical switch (br-vtep) disappears/d]) +OVN_CONTROLLER_RAMP_STOP([/Chassis for VTEP physical switch (br-vtep) disappears/d]) AT_CLEANUP # Tests binding updates. -AT_SETUP([ovn-controller-vtep - binding 1]) -OVN_CONTROLLER_VTEP_START +AT_SETUP([ovn-controller-ramp - binding 1]) +OVN_CONTROLLER_RAMP_START # adds logical switch 'lswitch0' and vlan_bindings. AT_CHECK([vtep-ctl add-ls lswitch0 -- bind-ls br-vtep p0 100 lswitch0 -- bind-ls br-vtep p1 300 lswitch0]) @@ -215,7 +215,7 @@ ${chassis_uuid} ${chassis_uuid} ]) # confirms the warning log. -AT_CHECK([sed -n 's/^.*\(|WARN|.*\)$/\1/p' ovn-controller-vtep.log | sed 's/([[-_0-9a-z]][[-_0-9a-z]]*)/()/g' | uniq], [0], [dnl +AT_CHECK([sed -n 's/^.*\(|WARN|.*\)$/\1/p' ovn-controller-ramp.log | sed 's/([[-_0-9a-z]][[-_0-9a-z]]*)/()/g' | uniq], [0], [dnl |WARN|logical switch (), on vtep gateway chassis () has already been associated with logical port (), ignore logical port () ]) @@ -233,14 +233,14 @@ AT_CHECK_UNQUOTED([ovn-sbctl --columns=chassis list Port_Binding | cut -d ':' -f [[]] ]) -OVN_CONTROLLER_VTEP_STOP([/has already been associated with logical port/d]) +OVN_CONTROLLER_RAMP_STOP([/has already been associated with logical port/d]) AT_CLEANUP # Tests corner case: Binding the vtep logical switch from two different # datapath. -AT_SETUP([ovn-controller-vtep - binding 2]) -OVN_CONTROLLER_VTEP_START +AT_SETUP([ovn-controller-ramp - binding 2]) +OVN_CONTROLLER_RAMP_START # adds logical switch 'lswitch0' and vlan_bindings. AT_CHECK([vtep-ctl add-ls lswitch0 -- bind-ls br-vtep p0 100 lswitch0]) @@ -256,9 +256,9 @@ AT_CHECK([vtep-ctl add-ps br-vtep-void -- add-port br-vtep-void p0-void -- bind- # are bound to the same logical switch, but they are on different datapath). OVN_NB_ADD_VTEP_PORT([br-void], [br-vtep-void_lswitch0], [br-vtep-void], [lswitch0]) ovn-sbctl --timeout=10 wait-until Port_Binding br-vtep_lswitch0 -OVS_WAIT_UNTIL([test -n "`grep WARN ovn-controller-vtep.log`"]) +OVS_WAIT_UNTIL([test -n "`grep WARN ovn-controller-ramp.log`"]) # confirms the warning log. -AT_CHECK([sed -n 's/^.*\(|WARN|.*\)$/\1/p' ovn-controller-vtep.log | sed 's/([[-_0-9a-z]][[-_0-9a-z]]*)/()/g;s/(with tunnel key [[0-9]][[0-9]]*)/()/g' | uniq], [0], [dnl +AT_CHECK([sed -n 's/^.*\(|WARN|.*\)$/\1/p' ovn-controller-ramp.log | sed 's/([[-_0-9a-z]][[-_0-9a-z]]*)/()/g;s/(with tunnel key [[0-9]][[0-9]]*)/()/g' | uniq], [0], [dnl |WARN|logical switch (), on vtep gateway chassis () has already been associated with logical datapath (), ignore logical port () which belongs to logical datapath () ]) @@ -273,13 +273,13 @@ AT_CHECK_UNQUOTED([ovn-sbctl --columns=chassis list Port_Binding br-vtep_lswitch ${chassis_uuid} ]) -OVN_CONTROLLER_VTEP_STOP([/has already been associated with logical datapath/d]) +OVN_CONTROLLER_RAMP_STOP([/has already been associated with logical datapath/d]) AT_CLEANUP # Tests vtep module vtep logical switch tunnel key update. -AT_SETUP([ovn-controller-vtep - vtep-lswitch]) -OVN_CONTROLLER_VTEP_START +AT_SETUP([ovn-controller-ramp - vtep-lswitch]) +OVN_CONTROLLER_RAMP_START # creates the logical switch in vtep and adds the corresponding logical # port to 'br-test'. @@ -325,13 +325,13 @@ AT_CHECK([vtep-ctl --columns=tunnel_key list Logical_Switch | cut -d ':' -f2 | t 0 ]) -OVN_CONTROLLER_VTEP_STOP +OVN_CONTROLLER_RAMP_STOP AT_CLEANUP # Tests vtep module 'Ucast_Macs_Remote's. -AT_SETUP([ovn-controller-vtep - vtep-macs 1]) -OVN_CONTROLLER_VTEP_START +AT_SETUP([ovn-controller-ramp - vtep-macs 1]) +OVN_CONTROLLER_RAMP_START # creates a simple logical network with the vtep device and a fake hv chassis # 'ch0'. @@ -397,13 +397,13 @@ OVS_WAIT_UNTIL([test -z "`vtep-ctl --columns=MAC list Ucast_Macs_Remote | grep 0 AT_CHECK([vtep-ctl --columns=MAC list Ucast_Macs_Remote | cut -d ':' -f2- | tr -d ' ' | sort], [0], [dnl ]) -OVN_CONTROLLER_VTEP_STOP +OVN_CONTROLLER_RAMP_STOP AT_CLEANUP # Tests vtep module 'Ucast_Macs_Remote's (corner cases). -AT_SETUP([ovn-controller-vtep - vtep-macs 2]) -OVN_CONTROLLER_VTEP_START +AT_SETUP([ovn-controller-ramp - vtep-macs 2]) +OVN_CONTROLLER_RAMP_START # creates a simple logical network with the vtep device and a fake hv chassis # 'ch0'. @@ -432,8 +432,8 @@ AT_CHECK([vtep-ctl --columns=MAC list Ucast_Macs_Remote | cut -d ':' -f2- | tr - "f0:ab:cd:ef:01:02" ]) # confirms the warning log. -OVS_WAIT_UNTIL([test -n "`grep WARN ovn-controller-vtep.log`"]) -AT_CHECK([sed -n 's/^.*\(|WARN|.*\)$/\1/p' ovn-controller-vtep.log | sed 's/([[-_:0-9a-z]][[-_:0-9a-z]]*)/()/g' | uniq], [0], [dnl +OVS_WAIT_UNTIL([test -n "`grep WARN ovn-controller-ramp.log`"]) +AT_CHECK([sed -n 's/^.*\(|WARN|.*\)$/\1/p' ovn-controller-ramp.log | sed 's/([[-_:0-9a-z]][[-_:0-9a-z]]*)/()/g' | uniq], [0], [dnl |WARN|MAC address () has already been known to be on logical port () in the same logical datapath, so just ignore this logical port () ]) @@ -465,5 +465,5 @@ AT_CHECK([vtep-ctl --columns=MAC list Ucast_Macs_Remote | cut -d ':' -f2- | tr - "f0:ab:cd:ef:01:02" ]) -OVN_CONTROLLER_VTEP_STOP([/has already been known to be on logical port/d]) +OVN_CONTROLLER_RAMP_STOP([/has already been known to be on logical port/d]) AT_CLEANUP diff --git a/tests/ovn-macros.at b/tests/ovn-macros.at index 53a22a81a..0201e9923 100644 --- a/tests/ovn-macros.at +++ b/tests/ovn-macros.at @@ -12,12 +12,12 @@ m4_define([OVN_CLEANUP_VSWITCH],[ # # Gracefully terminate OVN daemons in the specified # sandbox instance. The sandbox name "vtep" is treated -# as a special case, and is assumed to have ovn-controller-vtep +# as a special case, and is assumed to have ovn-controller-ramp # and ovs-vtep daemons running instead of ovn-controller. m4_define([OVN_CLEANUP_SBOX],[ as $1 if test "$1" = "vtep"; then - OVS_APP_EXIT_AND_WAIT([ovn-controller-vtep]) + OVS_APP_EXIT_AND_WAIT([ovn-controller-ramp]) OVS_APP_EXIT_AND_WAIT([ovs-vtep]) else OVS_APP_EXIT_AND_WAIT([ovn-controller]) diff --git a/tests/ovn.at b/tests/ovn.at index 013583826..a027946a0 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -2438,8 +2438,8 @@ OVN_CLEANUP([hv1],[hv2]) AT_CLEANUP -AT_SETUP([ovn -- vtep: 3 HVs, 1 VIFs/HV, 1 GW, 1 LS]) -AT_KEYWORDS([vtep]) +AT_SETUP([ovn -- ramp: 3 HVs, 1 VIFs/HV, 1 GW, 1 LS]) +AT_KEYWORDS([ramp]) ovn_start # Configure the Northbound database @@ -2506,7 +2506,7 @@ vtep-ctl set Physical_Switch br-vtep tunnel_ips=192.168.0.3 vtep-ctl add-ls lsw0 start_daemon ovs-vtep br-vtep -start_daemon ovn-controller-vtep --vtep-db=unix:"$ovs_base"/vtep/db.sock --ovnsb-db=unix:"$ovs_base"/ovn-sb/ovn-sb.sock +start_daemon ovn-controller-ramp --vtep-db=unix:"$ovs_base"/vtep/db.sock --ovnsb-db=unix:"$ovs_base"/ovn-sb/ovn-sb.sock OVS_WAIT_UNTIL([vtep-ctl bind-ls br-vtep br-vtep_n2 0 lsw0]) diff --git a/tests/testsuite.at b/tests/testsuite.at index 1985923d5..de9af7211 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -29,6 +29,6 @@ m4_include([tests/ovn-sbctl.at]) m4_include([tests/ovn-ic-nbctl.at]) m4_include([tests/ovn-ic-sbctl.at]) m4_include([tests/ovn-controller.at]) -m4_include([tests/ovn-controller-vtep.at]) +m4_include([tests/ovn-controller-ramp.at]) m4_include([tests/ovn-ic.at]) m4_include([tests/checkpatch.at])