Skip to content

Commit 91b14c0

Browse files
committed
Bind API service on 0.0.0.0
The API service needs to listen on all IP addresses to allow different haproxy frontends reach it out. By default the service binds to 127.0.0.1, and binding it to options.service_listen_info.watcher_api.ip prevents the assess_status() code to succeed, this is a common pattern[0] [0] https://github.com/openstack/charm-neutron-openvswitch/blob/d0731306393840e24e98b52a31977fe16d7aee54/templates/stein/neutron.conf#L14 Change-Id: I3e7b43d0208e251a6b6ab59d0383c989310f2b3b
1 parent 8d512bb commit 91b14c0

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/templates/train/watcher.conf

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Train
22
[DEFAULT]
33
debug = {{ options.debug }}
4-
bind_host = {{ options.service_listen_info.watcher_api.ip }}
5-
bind_port = {{ options.service_listen_info.watcher_api.port }}
64
host_href = {{ options.external_endpoints.watcher_api.url }}
75

86
{% include "parts/section-transport-url" %}
@@ -16,12 +14,12 @@ host_href = {{ options.external_endpoints.watcher_api.url }}
1614
{% include "parts/section-oslo-middleware" %}
1715

1816
[api]
17+
# The listen IP address for the watcher API server (host address value)
18+
host = 0.0.0.0
19+
1920
# The port for the watcher API server (port value)
2021
port = {{ options.service_listen_info.watcher_api.port }}
2122

22-
# The listen IP address for the watcher API server (host address value)
23-
host = {{ options.service_listen_info.watcher_api.ip }}
24-
2523
# Number of workers for Watcher API service. The default is equal to the number
2624
# of CPUs available if that can be determined, else a default worker count of 1
2725
# is returned. (integer value)

0 commit comments

Comments
 (0)