From e9f4a5a38e405a097c51dac58708947e7767eff9 Mon Sep 17 00:00:00 2001
From: Buddhika Sanjeewa <bsanjeewa@kln.ac.lk>
Date: Mon, 4 Jan 2021 21:18:59 +0530
Subject: [PATCH] Fixes solum_api Listening on 127.0.0.1

The default kolla-ansible deployment of solum_api do not provide a value for 'host' variable in
[api] section of the solum.conf
This causes the solum_api service to fallback to default host 127.0.0.1, making haproxy unable to
provide services.

This fix adds value for 'host' variable, so the solum_api service able to listen on provided ip,
making it available to services like haproxy accessing the service remotely

Closes-Bug: 1909986
Change-Id: I38a4ecab071306143952c8036830318c476797f2
---
 ansible/roles/solum/templates/solum.conf.j2 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ansible/roles/solum/templates/solum.conf.j2 b/ansible/roles/solum/templates/solum.conf.j2
index e4d3c4647a..c641b2312c 100644
--- a/ansible/roles/solum/templates/solum.conf.j2
+++ b/ansible/roles/solum/templates/solum.conf.j2
@@ -12,6 +12,9 @@ bind_port = {{ solum_application_deployment_port }}
 image_format = vm
 port = {{ solum_application_deployment_port }}
 workers = {{ openstack_service_workers }}
+{% if service_name == 'solum-api' %}
+host = {{ api_interface_address }}
+{% endif %}
 
 [conductor]
 topic = solum-conductor