On Thu, May 11, 2017 at 2:42 AM, Tulio Ribeiro <[email protected]> wrote: > Hi Andy, > > I did the patch but now the command $sudo ovs-vsctl add-br s1 stuck (the > bridge is added but the command does not return). > > The command sudo ovs-vsctl set-controller s1 tcp:192.168.1.215:6653 do not > return as well. > > The role of a bridge is not defined, which means, the initial role is empty, > but should be "other".
Is ovs-vswitchd still running in your system? The change should not affect how the first command works any ways. I just tested the change locally at it seems to work. > > Regards. > > Att, > > Tulio Ribeiro - LaSIGE. > > On 05/10/2017 11:27 PM, Andy Zhou wrote: >> >> On Wed, May 10, 2017 at 11:40 AM, Tulio Ribeiro >> <[email protected]> wrote: >>> >>> Hi guys, sorry to bother you again and send this direct message, but I >>> did a >>> test without using Mininet, and the problem/behavior persists. >>> >>> Could someone try to test this, please? >>> Thanks a lot in advance. >> >> Thanks for reporting, I think it is a bug that triggered by having the >> same controller >> connection settings in multiple bridges, as shown in your example. >> >> Do you mind try the fix below and let me know if it helps? I did not >> test beyond compiling it. >> >> >> diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c >> index 31203d1ec232..5d13a1712168 100644 >> --- a/vswitchd/bridge.c >> +++ b/vswitchd/bridge.c >> @@ -2704,34 +2704,31 @@ static void >> refresh_controller_status(void) >> { >> struct bridge *br; >> - struct shash info; >> - const struct ovsrec_controller *cfg; >> - >> - shash_init(&info); >> >> /* Accumulate status for controllers on all bridges. */ >> HMAP_FOR_EACH (br, node, &all_bridges) { >> + struct shash info = SHASH_INITIALIZER(&info); >> ofproto_get_ofproto_controller_info(br->ofproto, &info); >> - } >> >> - /* Update each controller in the database with current status. */ >> - OVSREC_CONTROLLER_FOR_EACH(cfg, idl) { >> - struct ofproto_controller_info *cinfo = >> - shash_find_data(&info, cfg->target); >> + /* Update each controller of the bridge in the database with >> + * current status. */ >> + struct ovsrec_controller **controllers; >> + size_t n_controllers = bridge_get_controllers(br, &controllers); >> + size_t i; >> + for (i = 0; i < n_controllers; i++) { >> + struct ovsrec_controller *cfg = controllers[i]; >> + struct ofproto_controller_info *cinfo = >> + shash_find_data(&info, cfg->target); >> >> - if (cinfo) { >> + ovs_assert(cinfo); >> ovsrec_controller_set_is_connected(cfg, >> cinfo->is_connected); >> ovsrec_controller_set_role(cfg, >> ofp12_controller_role_to_str( >> - cinfo->role)); >> + cinfo->role)); >> ovsrec_controller_set_status(cfg, &cinfo->pairs); >> - } else { >> - ovsrec_controller_set_is_connected(cfg, false); >> - ovsrec_controller_set_role(cfg, NULL); >> - ovsrec_controller_set_status(cfg, NULL); >> } >> - } >> >> - ofproto_free_ofproto_controller_info(&info); >> + ofproto_free_ofproto_controller_info(&info); >> + } >> } > > _______________________________________________ discuss mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
