[prev in list] [next in list] [prev in thread] [next in thread]
List: openvswitch-discuss
Subject: [ovs-discuss] =?utf-8?q?Controller_Status=3F?=
From: reid () nicira ! com (reid at nicira ! com)
Date: 2009-07-29 20:41:31
Message-ID: d36ff5a1c5b1adabe63b0b81588ebd10 () nicira ! com
[Download RAW message or body]
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:
(python)
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
-Reid
On Wed, 29 Jul 2009 11:12:58 -0700, David Erickson <derickso at stanford.edu>
wrote:
> 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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic