From 900e3fe7238ae5fa52ccb3a75e72a073ab0a5b27 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 24 Apr 2009 16:46:14 -0700 Subject: [PATCH] vswitch: By default, operate standalone when controller connection fails. The default was previously to "fail secure" (by not passing any traffic) when the controller could not be reached, but we came to consensus that it is better to switch traffic in a standalone mode in this case. --- vswitchd/bridge.c | 5 +++-- vswitchd/vswitchd.conf.5.in | 9 +++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index f59c58db..847ce26e 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -1038,8 +1038,9 @@ bridge_reconfigure_one(struct bridge *br) fail_mode = cfg_get_string(0, "mgmt.fail-mode"); } ofproto_set_failure(br->ofproto, - fail_mode && (!strcmp(fail_mode, "standalone") || - !strcmp(fail_mode, "open"))); + (!fail_mode + || !strcmp(fail_mode, "standalone") + || !strcmp(fail_mode, "open"))); probe = cfg_get_int(0, "%s.inactivity-probe", pfx); ofproto_set_probe_interval(br->ofproto, diff --git a/vswitchd/vswitchd.conf.5.in b/vswitchd/vswitchd.conf.5.in index 6410e6ab..52a3f4f4 100644 --- a/vswitchd/vswitchd.conf.5.in +++ b/vswitchd/vswitchd.conf.5.in @@ -521,8 +521,8 @@ the connection to the controller stays down long enough, no packets can pass through the switch at all. .IP The first of these that is set takes effect. -If the value is \fBstandalone\fR, or if neither of these settings is -set, \fBvswitchd\fR will take over responsibility for setting up +If the value is \fBstandalone\fR, \fBvswitchd\fR will take over +responsibility for setting up flows when no message has been received from the controller for three times the inactivity probe interval (see above). In this mode, \fBvswitchd\fR causes the datapath to act like an ordinary @@ -530,8 +530,9 @@ MAC-learning switch. \fBvswitchd\fR will continue to retry ionnecting to the controller in the background and, when the connection succeeds, it discontinues its standalone behavior. .IP -If this option is set to \fBsecure\fR, \fBvswitchd\fR will not set up -flows on its own when the controller connection fails. +If this option is set to \fBsecure\fR, or if neither of these settings +is set, \fBvswitchd\fR will not set up flows on its own when the +controller connection fails. .IP "\fBbridge.\fIname\fB.controller.max-backoff=\fIsecs\fR" Sets the maximum time between attempts to connect to the controller to \fIsecs\fR, which must be at least 1. The actual interval between -- 2.30.2