Fix restart ovs logistic.
This commit is contained in:
parent
f52eda2db5
commit
b794179536
@ -8,6 +8,7 @@
|
||||
# Copyright 2014 Canonical Ltd.
|
||||
#
|
||||
# Authors: Hui Xiang <hui.xiang@canonical.com>
|
||||
# Edward Hope-Morley <edward.hope-morley@canonical.com>
|
||||
#
|
||||
# OCF instance parameters:
|
||||
# OCF_RESKEY_file
|
||||
|
@ -374,15 +374,17 @@ class MonitorNeutronAgentsDaemon(Daemon):
|
||||
|
||||
try:
|
||||
OVS_AGENT = 'Open vSwitch agent'
|
||||
agent = quantum.show_agent(agent_type=OVS_AGENT,
|
||||
host=self.get_hostname)
|
||||
agents = quantum.list_agents(agent_type=OVS_AGENT)
|
||||
except Exception as e:
|
||||
LOG.error('No ovs agent found on localhost, error:%s.' % e)
|
||||
return
|
||||
|
||||
for agent in agents['agents']:
|
||||
if self.is_same_host(agent['host']):
|
||||
conf = agent['configurations']
|
||||
if conf['tunnel_types'] == 'gre' and conf['l2_population'] \
|
||||
if 'gre' in conf['tunnel_types'] and conf['l2_population'] \
|
||||
and conf['devices']:
|
||||
LOG.warning('local ovs agent:%s' % agent)
|
||||
ovs_output = subprocess.check_output(['ovs-vsctl',
|
||||
'list-ports', 'br-tun'])
|
||||
ports = ovs_output.strip().split('\n')
|
||||
|
Loading…
x
Reference in New Issue
Block a user