From beee21e47dd81003d5d9a1c52658c6f8f7e7f5cd Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 7 Apr 2009 12:18:34 -0700 Subject: [PATCH] vswitch: Let mgmt.fail-mode setting be default for bridge failure mode. This simplifies configuration, since usually all bridges should fail in the same way. --- vswitchd/bridge.c | 3 +++ vswitchd/vswitchd.conf.5.in | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 11a08ff9..56d608c4 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -1035,6 +1035,9 @@ bridge_reconfigure_one(struct bridge *br) } fail_mode = cfg_get_string(0, "%s.fail-mode", pfx); + if (!fail_mode) { + fail_mode = cfg_get_string(0, "mgmt.fail-mode"); + } ofproto_set_failure(br->ofproto, fail_mode && (!strcmp(fail_mode, "standalone") || !strcmp(fail_mode, "open"))); diff --git a/vswitchd/vswitchd.conf.5.in b/vswitchd/vswitchd.conf.5.in index b4df7026..89ea1ebc 100644 --- a/vswitchd/vswitchd.conf.5.in +++ b/vswitchd/vswitchd.conf.5.in @@ -545,14 +545,16 @@ been broken and attempts to reconnect. Changing the inactivity probe interval also changes the interval before entering standalone mode (see below). .IP "\fBbridge.\fIname\fB.controller.fail-mode = \fBstandalone\fR|\fBsecure\fR" +.IQ "\fBmgmt.fail-mode = standalone\fR|\fBsecure\fR" When a controller is configured, it is, ordinarily, responsible for setting up all flows on virtual switch. Thus, if the connection to the controller fails, no new network connections can be set up. If the connection to the controller stays down long enough, no packets can pass through the switch at all. .IP -If this option is unset, or if it is set to \fBstandalone\fR (the -default), \fBvswitchd\fR will take over responsibility for setting up +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 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 -- 2.30.2