[ovs-dev,ovn] ovn-controller: No bridge for localnet port is not an error
diff mbox series

Message ID 20200227120412.C225220491@silver.osuosl.org
State Superseded
Headers show
  • [ovs-dev,ovn] ovn-controller: No bridge for localnet port is not an error
Related show

Commit Message

Frode Nordahl Feb. 27, 2020, 11:37 a.m. UTC
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 <frode.nordahl@canonical.com>
 controller/patch.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)


0-day Robot Feb. 27, 2020, 1:03 p.m. UTC | #1
Bleep bloop.  Greetings Frode Nordahl, I am a robot and I have tried out your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.

ERROR: Author Frode Nordahl <frode.nordahl@canonical.com> needs to sign off.
Lines checked: 53, Warnings: 0, Errors: 1

Please check this out.  If you feel there has been an error, please email aconole@redhat.com

0-day Robot

diff mbox series

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,
+        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);