[ovs-dev] [bugfixes 2/4] ovs-vsctl: Fix controller command prerequisites.
Ben Pfaff
blp at nicira.com
Wed Dec 8 23:22:44 UTC 2010
The controller commands use the "target" column of the Controller table,
but they don't supply it as a prerequisite, which makes those commands
hang. This commit fixes the problem.
---
utilities/ovs-vsctl.c | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/utilities/ovs-vsctl.c b/utilities/ovs-vsctl.c
index 477bdb0..c55818b 100644
--- a/utilities/ovs-vsctl.c
+++ b/utilities/ovs-vsctl.c
@@ -1700,6 +1700,14 @@ verify_controllers(struct ovsrec_bridge *bridge)
}
static void
+pre_controller(struct vsctl_context *ctx)
+{
+ pre_get_info(ctx);
+
+ ovsdb_idl_add_column(ctx->idl, &ovsrec_controller_col_target);
+}
+
+static void
cmd_get_controller(struct vsctl_context *ctx)
{
struct vsctl_info info;
@@ -3266,10 +3274,10 @@ static const struct vsctl_command_syntax all_commands[] = {
{"iface-to-br", 1, 1, pre_get_info, cmd_iface_to_br, NULL, "", RO},
/* Controller commands. */
- {"get-controller", 1, 1, pre_get_info, cmd_get_controller, NULL, "", RO},
- {"del-controller", 1, 1, pre_get_info, cmd_del_controller, NULL, "", RW},
- {"set-controller", 1, INT_MAX, pre_get_info, cmd_set_controller, NULL, "",
- RW},
+ {"get-controller", 1, 1, pre_controller, cmd_get_controller, NULL, "", RO},
+ {"del-controller", 1, 1, pre_controller, cmd_del_controller, NULL, "", RW},
+ {"set-controller", 1, INT_MAX, pre_controller, cmd_set_controller, NULL,
+ "", RW},
{"get-fail-mode", 1, 1, pre_get_info, cmd_get_fail_mode, NULL, "", RO},
{"del-fail-mode", 1, 1, pre_get_info, cmd_del_fail_mode, NULL, "", RW},
{"set-fail-mode", 2, 2, pre_get_info, cmd_set_fail_mode, NULL, "", RW},
--
1.7.1
More information about the dev
mailing list