[ovs-dev] [PATCH] ovs-vsctl: Fix br-set-external-id.

Ben Pfaff blp at nicira.com
Thu Nov 18 22:36:59 UTC 2010


The wrong prerequisite function was being called for set-br-external-id, so
it didn't set up to monitor the right columns, so an assertion failed.
This fixes the problem.

Also, change the test for external IDs so that it will find the regression.
(Running all of the ovs-vsctl commands together caused the column to be
monitored due to another command's intervention.)

Reported-by: Mikael Doverhag <mdoverhag at nicira.com>
Bug #4095.
---
 AUTHORS               |    1 +
 tests/ovs-vsctl.at    |    2 +-
 utilities/ovs-vsctl.c |    4 ++--
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 036e41e..3e80eef 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -52,6 +52,7 @@ Joan Cirer              joan at ev0.net
 John Galgay             john at galgay.net
 Luiz Henrique Ozaki     luiz.ozaki at gmail.com
 Michael Mao             mmao at nicira.com
+Mikael Doverhag         mdoverhag at nicira.com
 Pankaj Thakkar          thakkar at nicira.com
 Paulo Cravero           pcravero at as2594.net
 Peter Balland           peter at nicira.com
diff --git a/tests/ovs-vsctl.at b/tests/ovs-vsctl.at
index 152a658..a05e805 100644
--- a/tests/ovs-vsctl.at
+++ b/tests/ovs-vsctl.at
@@ -301,7 +301,7 @@ AT_CLEANUP
 AT_SETUP([external IDs])
 AT_KEYWORDS([ovs-vsctl])
 OVS_VSCTL_SETUP
-AT_CHECK([RUN_OVS_VSCTL_TOGETHER(
+AT_CHECK([RUN_OVS_VSCTL_ONELINE(
   [add-br a], 
   [add-port a a1],
   [add-bond a bond0 a2 a3],
diff --git a/utilities/ovs-vsctl.c b/utilities/ovs-vsctl.c
index 43aeb01..acdcaf3 100644
--- a/utilities/ovs-vsctl.c
+++ b/utilities/ovs-vsctl.c
@@ -3236,8 +3236,8 @@ static const struct vsctl_command_syntax all_commands[] = {
     {"br-exists", 1, 1, pre_get_info, cmd_br_exists, NULL, "", RO},
     {"br-to-vlan", 1, 1, pre_get_info, cmd_br_to_vlan, NULL, "", RO},
     {"br-to-parent", 1, 1, pre_get_info, cmd_br_to_parent, NULL, "", RO},
-    {"br-set-external-id", 2, 3, pre_get_info, cmd_br_set_external_id, NULL,
-     "", RW},
+    {"br-set-external-id", 2, 3, pre_cmd_br_set_external_id,
+     cmd_br_set_external_id, NULL, "", RW},
     {"br-get-external-id", 1, 2, pre_cmd_br_get_external_id,
      cmd_br_get_external_id, NULL, "", RO},
 
-- 
1.7.1





More information about the dev mailing list