File 0001-L3-agent-migration-should-only-choose-enabled-agent.patch of Package openstack-neutron
From 4f3f0b729d8e1d91c4afe9f43c1bd3e87af385ce Mon Sep 17 00:00:00 2001
From: Wei Tie <nuaafe@gmail.com>
Date: Thu, 13 Nov 2014 22:31:45 +0800
Subject: [PATCH] L3 agent migration should only choose enabled agent
L3 agent migration only choose agent with {"admin_state_up":True},
in order to avoid error from neutron client.
Closes-Bug: #1392226
Change-Id: I8131567440dd4d67e6dce717635c333e27755931
---
files/default/neutron-ha-tool.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/neutron-ha-tool.py 2015-05-08 12:29:11.822767665 +0200
+++ b/neutron-ha-tool.py 2015-05-08 12:29:19.274882189 +0200
@@ -579,7 +579,8 @@
"""
return [agent['id'] for agent in agent_list
- if agent['agent_type'] == agent_type and agent['alive'] is True]
+ if agent['agent_type'] == agent_type and agent['alive'] is True and
+ agent['admin_state_up'] is True]
def target_agent_list(agent_list, agent_type, excludeagent):