ovs-vsctl: emer-reset should clear the fail_mode.
authorEthan Jackson <ethan@nicira.com>
Tue, 18 Jan 2011 00:52:16 +0000 (16:52 -0800)
committerEthan Jackson <ethan@nicira.com>
Tue, 18 Jan 2011 22:57:08 +0000 (14:57 -0800)
utilities/ovs-vsctl.8.in
utilities/ovs-vsctl.c

index aacb19a7cdb4aadde5189df2eacdb919575f3af9..c550909f40ade14247416651ad726276979d2612 100644 (file)
@@ -148,10 +148,10 @@ initialize the database without executing any other command.
 .IP "\fBemer\-reset\fR"
 Reset the configuration into a clean state.  It deconfigures OpenFlow
 controllers, OVSDB servers, and SSL, and deletes port mirroring,
-NetFlow, and sFlow configuration.  This command also removes all
-\fBother\-config\fR keys from all database records, except that
-\fBother\-config:hwaddr\fR is preserved if it is present in a Bridge
-record.  Other networking configuration is left as-is.
+\fBfail_mode\fR, NetFlow, and sFlow configuration.  This command also
+removes all \fBother\-config\fR keys from all database records, except
+that \fBother\-config:hwaddr\fR is preserved if it is present in a
+Bridge record.  Other networking configuration is left as-is.
 .
 .SS "Bridge Commands"
 These commands examine and manipulate Open vSwitch bridges.
index c55818bd29c201f592e3932020d754956693c0c4..8df0330879121da89423a15021465af34af44b33 100644 (file)
@@ -981,6 +981,7 @@ pre_cmd_emer_reset(struct vsctl_context *ctx)
     ovsdb_idl_add_column(ctx->idl, &ovsrec_open_vswitch_col_ssl);
 
     ovsdb_idl_add_column(ctx->idl, &ovsrec_bridge_col_controller);
+    ovsdb_idl_add_column(ctx->idl, &ovsrec_bridge_col_fail_mode);
     ovsdb_idl_add_column(ctx->idl, &ovsrec_bridge_col_mirrors);
     ovsdb_idl_add_column(ctx->idl, &ovsrec_bridge_col_netflow);
     ovsdb_idl_add_column(ctx->idl, &ovsrec_bridge_col_sflow);
@@ -1018,6 +1019,7 @@ cmd_emer_reset(struct vsctl_context *ctx)
         char *hw_val = NULL;
 
         ovsrec_bridge_set_controller(br, NULL, 0);
+        ovsrec_bridge_set_fail_mode(br, NULL);
         ovsrec_bridge_set_mirrors(br, NULL, 0);
         ovsrec_bridge_set_netflow(br, NULL);
         ovsrec_bridge_set_sflow(br, NULL);