Rebuild ovs tunnel only if local agent is alive, other minor change.
This commit is contained in:
parent
ecab2c6aab
commit
8a99ce6596
@ -136,9 +136,12 @@ options:
|
|||||||
type: boolean
|
type: boolean
|
||||||
default: False
|
default: False
|
||||||
description: |
|
description: |
|
||||||
If True will enable ACTIVE/PASSIVE HA mode for neutron agents using
|
If True will enable Pacemaker to monitor the neutron-ha-monitor daemon
|
||||||
Pacemaker and Corosync. This is intended for < Juno which natively
|
on every neutron-gateway unit, which detects neutron agents status and
|
||||||
supports HA in Neutron itself.
|
reschedule resources hosting on failed agents, detects local errors and
|
||||||
|
release resources when network is unreachable or do neccessary recover
|
||||||
|
tasks. This feature targets to < Juno which doesn't natively support HA
|
||||||
|
in Neutron itself.
|
||||||
ha-bindiface:
|
ha-bindiface:
|
||||||
type: string
|
type: string
|
||||||
default: eth0
|
default: eth0
|
||||||
|
@ -346,6 +346,10 @@ class MonitorNeutronAgentsDaemon(Daemon):
|
|||||||
|
|
||||||
|
|
||||||
def check_ovs_tunnel(self, quantum=None):
|
def check_ovs_tunnel(self, quantum=None):
|
||||||
|
'''
|
||||||
|
Work around for Bug #1411163
|
||||||
|
No fdb entries added when failover dhcp and l3 agent together.
|
||||||
|
'''
|
||||||
if not quantum:
|
if not quantum:
|
||||||
LOG.error('Failed to get quantum client.')
|
LOG.error('Failed to get quantum client.')
|
||||||
return
|
return
|
||||||
@ -358,7 +362,7 @@ class MonitorNeutronAgentsDaemon(Daemon):
|
|||||||
return
|
return
|
||||||
|
|
||||||
for agent in agents['agents']:
|
for agent in agents['agents']:
|
||||||
if self.is_same_host(agent['host']):
|
if self.is_same_host(agent['host']) and agent['alive']:
|
||||||
conf = agent['configurations']
|
conf = agent['configurations']
|
||||||
if 'gre' in conf['tunnel_types'] and conf['l2_population'] \
|
if 'gre' in conf['tunnel_types'] and conf['l2_population'] \
|
||||||
and conf['devices']:
|
and conf['devices']:
|
||||||
@ -373,7 +377,7 @@ class MonitorNeutronAgentsDaemon(Daemon):
|
|||||||
break
|
break
|
||||||
if not look_up_gre_port:
|
if not look_up_gre_port:
|
||||||
try:
|
try:
|
||||||
LOG.error('Found namespace, but no ovs tunnel is created,'
|
LOG.error('Local agent has devices, but no ovs tunnel is created,'
|
||||||
'restart ovs agent.')
|
'restart ovs agent.')
|
||||||
cmd = ['sudo', 'service', 'neutron-plugin-openvswitch-agent',
|
cmd = ['sudo', 'service', 'neutron-plugin-openvswitch-agent',
|
||||||
'restart']
|
'restart']
|
||||||
|
Loading…
Reference in New Issue
Block a user