bridge: Downgrade log level of some log messages that may indicate races.
authorBen Pfaff <blp@nicira.com>
Mon, 14 Mar 2011 22:28:32 +0000 (15:28 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 14 Mar 2011 23:40:42 +0000 (16:40 -0700)
Some legitimate system activity can cause network devices to be destroyed
just before they are removed from the database, added to the database
just before they are created, or destroyed and then recreated under the
same name while other database activity is going on.  Logging these
events as errors makes it sound like something unexpectedly bad is going
on, but in fact these events are the most common instances of these log
messages, so downgrade them to warnings.

Reported-by: Reid Price <reid@nicira.com>
Bug #2584.

vswitchd/bridge.c

index 1558d3b..ed2f537 100644 (file)
@@ -500,7 +500,7 @@ iterate_and_prune_ifaces(struct bridge *br,
         if (port->n_ifaces) {
             i++;
         } else  {
-            VLOG_ERR("%s port has no interfaces, dropping", port->name);
+            VLOG_WARN("%s port has no interfaces, dropping", port->name);
             port_destroy(port);
         }
     }
@@ -639,9 +639,9 @@ bridge_reconfigure(const struct ovsrec_open_vswitch *ovs_cfg)
                 && strcmp(dpif_port.name, br->name)) {
                 int retval = dpif_port_del(br->dpif, dpif_port.port_no);
                 if (retval) {
-                    VLOG_ERR("failed to remove %s interface from %s: %s",
-                             dpif_port.name, dpif_name(br->dpif),
-                             strerror(retval));
+                    VLOG_WARN("failed to remove %s interface from %s: %s",
+                              dpif_port.name, dpif_name(br->dpif),
+                              strerror(retval));
                 }
             }
         }
@@ -731,9 +731,9 @@ bridge_reconfigure(const struct ovsrec_open_vswitch *ovs_cfg)
                                      dpif_name(br->dpif));
                             break;
                         } else {
-                            VLOG_ERR("failed to add %s interface to %s: %s",
-                                     if_name, dpif_name(br->dpif),
-                                     strerror(error));
+                            VLOG_WARN("failed to add %s interface to %s: %s",
+                                      if_name, dpif_name(br->dpif),
+                                      strerror(error));
                             continue;
                         }
                     }