Hi Ben, I have taken care of the json connection. The reason to propagate the changed information to the top was in future if any other configurable options for the socket get added, we can just modify all the options and then reconnect once (though i cannot foresee any such parameters as of now). Hence I have taken this change out.
However in case of the controller it may not be possible to make these changes unless I can call rconn_disconnect() followed directly by reconnect(). [As of now I am calling rconn_connect (I assumed that rconn_disconnect modifies the 'target' in some way and hence needs to be re-written to rconn using rconn_set_target__() before the reconnect()). Also it seems to be the norm to repopulate all the data structures from what was just read from the db, in case anything has changed. Hence I called rconn_connect() instead of reconnect()] rconn_set_dscp() does not get passed the 'target' and 'name'. There are no changes to socket-util.c ... Seems I had inadvertently added a line which I have taken care of. As for the ovs-schema, the current documentation reads "The connection must be reset for the new DSCP values to take effect." ... for both the Manager and Controller dscp configuration. Though we are still resetting the connection, I am not sure if this needs to be explicitly stated in man page as the user does not need to do anything now? thanx! mehak On Thu, Jun 14, 2012 at 4:30 PM, Ben Pfaff <b...@nicira.com> wrote: > On Thu, Jun 07, 2012 at 10:48:25PM -0700, Mehak Mahajan wrote: > > With this change there is no need to restart the DB or OVS on > configuring a > > different value for the manager or controller connection respectively. On > > detecting a change in the dscp value on the socket, the previous socket > is > > closed and a new socket is created and connection is established with > the new > > configured dscp value. > > > > Signed-off-by: Mehak Mahajan <mmaha...@nicira.com> > > I'd be inclined to change jsonrpc_session_set_dscp() differently: > instead of telling the caller whether the options changed, simply > reconnect automatically in that case. > I don't think it would be possible to change the jsonrpc_session_set_dscp as it takes as its argument jsonrpc_session and not ovsdb_jsonrpc_session > Instead of exposing jsonrpc_session_connect(), I think it would be > better to use the existing function jsonrpc_session_force_reconnect(). > > I'd suggest changing rconn_set_dscp() the same way (that is, to drop > the connection if the dscp really changes), and then modifying > ofconn_reconfigure() to always call rconn_set_dscp(), the same way it > always calls the other functions to configure the rconn. Then, I > don't think there is a need to change connmgr_set_controllers() or to > add the two new functions in connmgr.c. > > I don't think there is any need to change vswitchd/vswitch.ovsschema > at all. Also for lib/socket-util.c. > > Thanks, > > Ben. >
_______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev