[ovs-discuss] Controller Status?

reid at nicira.com reid at nicira.com
Wed Jul 29 20:41:31 UTC 2009

Hi David,

I don't know if you're using then xen api at all, but if so, one of the
other options is something along the lines of this:


def get_controller(self):
    Get the controller of a pool.
    self.api is XenAPI.Session.xenapi for a connected Session
    args: None
    return: controller IP (string) if configured, otherwise None
    exceptions:  Only API-induced
    pool = self.api.pool.get_all_records().values()[0]
    return pool.get("other_config",{}).get("vSwitchController")

When the controller is configured, there is an additional attribute set in
the 'other_config' of that pool.  This selects the master of the pool (any
should do).  Hope this helps


On Wed, 29 Jul 2009 11:12:58 -0700, David Erickson <derickso at stanford.edu>
> Ben Pfaff wrote:
>> David Erickson <derickso at stanford.edu> writes:
>>> Is there a way to query the vswitch on Xen to determine what if any
>>> controller it is connected to and maybe the uptime to that controller?
>> You can look in /etc/ovs-vswitchd.conf to find the configured
>> controller, or you can use ovs-cfg-mod to query that file.
>> You can use "ovs-ofctl status <bridgename>" to see the currently
>> active controller and the status of the connection (under
>> remote.*).
>> There are probably other ways too.
> Thanks (Ben and Justin), I had it configured and during debugging I know
> Justin had me run the status command but for whatever reason I couldn't
> find it in my email or history.. but it works great.
> Thanks,
> David
> _______________________________________________
> discuss mailing list
> discuss at openvswitch.org
> http://openvswitch.org/mailman/listinfo/discuss_openvswitch.org

More information about the discuss mailing list