bond: Warn of imminent default bond_mode change.
[sliver-openvswitch.git] / vswitchd / bridge.c
index de773f6..e89855e 100644 (file)
@@ -2740,11 +2740,21 @@ port_configure_bond(struct port *port, struct bond_settings *s,
 
     s->name = port->name;
     s->balance = BM_SLB;
-    if (port->cfg->bond_mode
-        && !bond_mode_from_string(&s->balance, port->cfg->bond_mode)) {
-        VLOG_WARN("port %s: unknown bond_mode %s, defaulting to %s",
-                  port->name, port->cfg->bond_mode,
-                  bond_mode_to_string(s->balance));
+    if (port->cfg->bond_mode) {
+        if (!bond_mode_from_string(&s->balance, port->cfg->bond_mode)) {
+            VLOG_WARN("port %s: unknown bond_mode %s, defaulting to %s",
+                      port->name, port->cfg->bond_mode,
+                      bond_mode_to_string(s->balance));
+        }
+    } else {
+        static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 1);
+
+        /* XXX: Post version 1.4.*, change the default bond_mode to
+         * active-backup.  Until then, warn that the change is imminent. */
+        VLOG_WARN_RL(&rl, "port %s: Using the default bond_mode %s. Note that"
+                     " in future versions, the default bond_mode is expected"
+                     " to change to active-backup", port->name,
+                     bond_mode_to_string(s->balance));
     }
     if (s->balance == BM_SLB && port->bridge->cfg->n_flood_vlans) {
         VLOG_WARN("port %s: SLB bonds are incompatible with flood_vlans, "