From: Ben Pfaff Date: Fri, 24 Apr 2009 23:46:14 +0000 (-0700) Subject: vswitch: By default, operate standalone when controller connection fails. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=900e3fe7238ae5fa52ccb3a75e72a073ab0a5b27;p=openvswitch 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. --- 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