From patchwork Thu Feb 27 11:37:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frode Nordahl X-Patchwork-Id: 1245779 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=fail (p=none dis=none) header.from=canonical.com 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 48Srtp5G1Rz9sSm for ; Thu, 27 Feb 2020 23:04:16 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 7DE8A87658; Thu, 27 Feb 2020 12:04:14 +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 MnfoW2h2495x; Thu, 27 Feb 2020 12:04:13 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 9E32C86B6B; Thu, 27 Feb 2020 12:04:13 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 83355C1D80; Thu, 27 Feb 2020 12:04:13 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id D3AF0C0177 for ; Thu, 27 Feb 2020 12:04:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id C225220491 for ; Thu, 27 Feb 2020 12:04:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NAAFXhUL1gtP for ; Thu, 27 Feb 2020 12:04:11 +0000 (UTC) X-Greylist: delayed 00:05:51 by SQLgrey-1.7.6 Received: from u.fnordahl.com (u.fnordahl.com [52.21.249.169]) by silver.osuosl.org (Postfix) with ESMTP id 94D4720482 for ; Thu, 27 Feb 2020 12:03:29 +0000 (UTC) X-Mailbox-Line: From b2d55b2855015ec5f4eed5d8c5e4179b55c80781 Mon Sep 17 00:00:00 2001 From: Frode Nordahl Date: Thu, 27 Feb 2020 12:37:19 +0100 Message-Id: <20200227120412.C225220491@silver.osuosl.org> Subject: [ovs-dev] [PATCH ovn] ovn-controller: No bridge for localnet port is not an error 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: , MIME-Version: 1.0 Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" There is a pattern among CMSes to create a `localnet` port binding without any chassis affiliation. It is then up to the user to configure chassis with external connectivity by adding a mapping under the `external_ids:ovn-bridge-mappings` key in the Open_vSwitch table of the local OVS instance. This may be some chassis or all chassis depending on end user requirements. At present `ovn-controller` will repeatedly log an error on chassis without mapping for a localnet port while in reality it is not an error. Sined-off-by: Frode Nordahl --- controller/patch.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/controller/patch.c b/controller/patch.c index 349faae17..2eb62b193 100644 --- a/controller/patch.c +++ b/controller/patch.c @@ -198,8 +198,13 @@ add_bridge_mappings(struct ovsdb_idl_txn *ovs_idl_txn, continue; } + enum vlog_level level = VLL_ERR; const char *patch_port_id; if (!strcmp(binding->type, "localnet")) { + /* Not having external connectivity present on all chassis is + * a feature our user may choose to use, let's not log it as an + * error. */ + level = VLL_DBG; patch_port_id = "ovn-localnet-port"; } else if (!strcmp(binding->type, "l2gateway")) { if (!binding->chassis @@ -224,7 +229,7 @@ add_bridge_mappings(struct ovsdb_idl_txn *ovs_idl_txn, struct ovsrec_bridge *br_ln = shash_find_data(&bridge_mappings, network); if (!br_ln) { static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 1); - VLOG_ERR_RL(&rl, "bridge not found for %s port '%s' " + VLOG_RL(&rl, level, "bridge not found for %s port '%s' " "with network name '%s'", binding->type, binding->logical_port, network); continue;