[ovs-discuss] OVS controller reconnection on XenServer reboot

David Erickson derickso at stanford.edu
Tue May 3 06:48:18 UTC 2011


On 5/2/2011 9:13 PM, Ben Pfaff wrote:
> On Mon, May 02, 2011 at 09:10:02PM -0700, David Erickson wrote:
>> On 5/2/2011 7:09 PM, Justin Pettit wrote:
>>> On May 2, 2011, at 3:00 PM, Ben Pfaff wrote:
>>>
>>>> On Mon, May 02, 2011 at 02:51:14PM -0700, David Erickson wrote:
>>>>> I've noticed that OVS isn't connecting to the controller on
>>>>> boot/reboot, is there an option somewhere I need to set to enable
>>>>> this?  On further inspection when I run ovs-vsctl list bridge it
>>>>> looks like the bridge lost both its controller entry and its
>>>>> other_config:datapath-id.  Is there a persist or save command I need
>>>>> to issue after setting these things?
>>>> What happens at boot is this:
>>>>
>>>> 	* OVS tears down and destroys all bridges, because XenServer
>>>>           expects to re-create each one at boot.
>>>>
>>>> 	* OVS refreshes the manager (OVSDB connection) from the
>>>>           XenServer (XAPI) database.
>>>>
>>>> 	* XenServer creates each of the bridges.  No controller is
>>>>           set.
>>>>
>>>> 	* The manager is supposed to set the controller for each
>>>>           bridge as it likes, using the OVSDB connection to do so.
>>> I answered a very similar question a couple of weeks ago, and described a couple different possible solutions:
>>>
>>> 	http://openvswitch.org/pipermail/discuss/2011-April/005080.html
>>>
>> Ah sorry for the duplicate, but I appreciate the reply.  I'm
>> unfamiliar with the manager, is there a pointer or further
>> information on what it does/how it works?
> The "manager" is the Open vSwitch configuration protocol.  It uses a
> custom JSON-RPC based protocol to control, among many things, the
> controller for each bridge.  The protocol is fully documented in
> ovsdb/SPECS.  OVS contains C and Python bindings for the protocol, and
> ovs-vsctl can be used as shell "bindings" for it.
>
> ovs-controller(8) has a little information on how to make this work, at
> least at a klugey level:
>
> BUGS
>         Configuring a Citrix XenServer to connect to  a  particular  controller
>         only  points the remote OVSDB management connection to that controller.
>         It does not also configure OpenFlow connections, because the manager is
>         expected  to  do  that over the management protocol.  ovs-controller is
>         not an Open vSwitch manager and does not know how to do that.
>
>         As a stopgap workaround, ovs-vsctl can wait for an OVSDB connection and
>         set the controller, e.g.:
>
>                % ovs-vsctl -t0 --db=pssl: --certificate=cert.pem --ca-cert=none
>                --private-key=privkey.pem   --peer-ca-cert=cacert.pem   set-con‐
>                troller ssl:ip
>
> (I probably should have clicked on the link provided by Justin.  Maybe
> I've repeating what he already said.)

Ah ok so ovs-vsctl to this management protocol is similar to what dpctl 
is to OpenFlow?

In an ideal XenServer pool what is the envisioned way that an individual 
bridge on a XenServer gets its controller host ip:port, and any other 
configuration set?  Is this possible from the pool master?  Or do I need 
to just create scripts to set this on each box in rc.local?

Thanks,
David



More information about the discuss mailing list