From 8a99ce6596c14b4ef035213ef587c8594ba8c2de Mon Sep 17 00:00:00 2001 From: Hui Xiang Date: Mon, 19 Jan 2015 18:43:09 +0800 Subject: [PATCH] Rebuild ovs tunnel only if local agent is alive, other minor change. --- config.yaml | 9 ++++++--- files/neutron-ha-monitor.py | 8 ++++++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/config.yaml b/config.yaml index 51816eb1..fdcab2bd 100644 --- a/config.yaml +++ b/config.yaml @@ -136,9 +136,12 @@ options: type: boolean default: False description: | - If True will enable ACTIVE/PASSIVE HA mode for neutron agents using - Pacemaker and Corosync. This is intended for < Juno which natively - supports HA in Neutron itself. + If True will enable Pacemaker to monitor the neutron-ha-monitor daemon + on every neutron-gateway unit, which detects neutron agents status and + 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: type: string default: eth0 diff --git a/files/neutron-ha-monitor.py b/files/neutron-ha-monitor.py index 7e1bec7e..63f518d0 100644 --- a/files/neutron-ha-monitor.py +++ b/files/neutron-ha-monitor.py @@ -346,6 +346,10 @@ class MonitorNeutronAgentsDaemon(Daemon): 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: LOG.error('Failed to get quantum client.') return @@ -358,7 +362,7 @@ class MonitorNeutronAgentsDaemon(Daemon): return 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'] if 'gre' in conf['tunnel_types'] and conf['l2_population'] \ and conf['devices']: @@ -373,7 +377,7 @@ class MonitorNeutronAgentsDaemon(Daemon): break if not look_up_gre_port: 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.') cmd = ['sudo', 'service', 'neutron-plugin-openvswitch-agent', 'restart']