From 7f457cd928e60a1f81f1064c45acf957e8a4c48f Mon Sep 17 00:00:00 2001
From: Zhuo Zhen <zhenz@uchicago.edu>
Date: Tue, 19 Nov 2019 15:52:26 -0600
Subject: [PATCH] Allow region setting for ironic-neutron-agent

The "os_region" param is missing in the ironic_neutron_agent.ini.j2
file. Without specifying the region, the neutron service will randomly
pick a region for the ironic-neutron-agent. Therefore, a list of
incorrect agents might be created in the neutron database "agents"
table for nodes from other regions. To list all neutron agents, use
'openstack network agent list'.

Change-Id: Idec265230d0ab63b7559d94690c059608dc2617e
Closes-bug: #1853464
---
 ansible/roles/neutron/templates/ironic_neutron_agent.ini.j2 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ansible/roles/neutron/templates/ironic_neutron_agent.ini.j2 b/ansible/roles/neutron/templates/ironic_neutron_agent.ini.j2
index 2c35d42e1a..f3b68385e7 100644
--- a/ansible/roles/neutron/templates/ironic_neutron_agent.ini.j2
+++ b/ansible/roles/neutron/templates/ironic_neutron_agent.ini.j2
@@ -7,3 +7,4 @@ project_name = service
 username = {{ neutron_keystone_user }}
 password = {{ neutron_keystone_password }}
 os_endpoint_type = internalURL
+os_region = {{ openstack_region_name }}