Graylog 3 - properly configure 'http_publish_uri'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Graylog Charm |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
For a better understanding of the Graylog configs, and how they are set by the charm today, please refer to this FAQ article: https:/
We have temporarily removed the ability for the charm to configure `http_publish_uri` because it was being mis-used.
`http_publish_uri` needs to be set to a unique value on each node, and by default the charm will attempt to deduct the network interface that is used for connections to the default gateway and use the associated IP address.
The correct way to configure this would be to either specific a network, or space, or subnet (or something similar) where you want the Graylog communication to occur. The charm would then determine which IP address of the active node can access the specified network and set that IP as the value of `http_publish_uri`
Changed in charm-graylog: | |
status: | New → Triaged |
importance: | Undecided → Low |
Changed in charm-graylog: | |
importance: | Low → Wishlist |
Changed in charm-graylog: | |
importance: | Wishlist → Medium |
This is actually causing a problem on a current customer deploy. This environment does NOT have a gateway configured for OAM (all nodes proxy through MAAS), and thus it fails to find the correct interface.
from unit logs
``` juju/agents/ unit-graylog- 0/.venv/ lib/python3. 8/site- packages/ charms/ reactive/ __init_ _.py", line 74, in main dispatch( restricted= restricted_ mode) juju/agents/ unit-graylog- 0/.venv/ lib/python3. 8/site- packages/ charms/ reactive/ bus.py" , line 390, in dispatch other_handlers) juju/agents/ unit-graylog- 0/.venv/ lib/python3. 8/site- packages/ charms/ reactive/ bus.py" , line 359, in _invoke invoke( ) juju/agents/ unit-graylog- 0/.venv/ lib/python3. 8/site- packages/ charms/ reactive/ bus.py" , line 181, in invoke _action( *args) juju/agents/ unit-graylog- 0/charm/ reactive/ graylog. py", line 210, in configure_graylog api_uri( "{}://0. 0.0.0:{ }/".format( get_api_ protocol( ), api_port)), layer/graylog/ utils.py" , line 63, in validate_api_uri "{}:{}" .format( get_ip_ address( ), parsed_url.port) layer/graylog/ utils.py" , line 80, in get_ip_address gateways( )["default" ][netifaces. AF_INET] [1]
2021-06-08 18:19:31 ERROR juju-log Hook error:
Traceback (most recent call last):
File "/var/lib/
bus.
File "/var/lib/
_invoke(
File "/var/lib/
handler.
File "/var/lib/
self.
File "/var/lib/
validate_
File "lib/charms/
netloc=
File "lib/charms/
iface = netifaces.
KeyError: 2
2021-06-08 18:19:31 WARNING install Traceback (most recent call last): juju/agents/ unit-graylog- 0/charm/ hooks/install" , line 22, in <module> juju/agents/ unit-graylog- 0/.venv/ lib/python3. 8/site- packages/ charms/ reactive/ __init_ _.py", line 74, in main restricted= restricted_ mode) juju/agents/ unit-graylog- 0/.venv/ lib/python3. 8/site- packages/ charms/ reactive/ bus.py" , line 390, in dispatch other_handlers) juju/agents/ unit-graylog- 0/.venv/ lib/python3. 8/site- packages/ charms/ reactive/ bus.py" , line 359, in _invoke juju/agents/ unit-graylog- 0/.venv/ lib/python3. 8/site- packages/ charms/ reactive/ bus.py" , line 181, in invoke juju/agents/ unit-graylog- 0/charm/ reactive/ graylog. py", line 210, in configure_graylog api_uri( "{}://0. 0.0.0:{ }/".format( get_api_ protocol( ), api_port)), layer/graylog/ utils.py" , line 63, in validate_api_uri "{}:{}" .format( get_ip_ address( ), parsed_url.port) layer/graylog/ utils.py" , line 80, in get_ip_address gateways( )["default" ][netifaces. AF_INET] ...
2021-06-08 18:19:31 WARNING install File "/var/lib/
2021-06-08 18:19:31 WARNING install main()
2021-06-08 18:19:31 WARNING install File "/var/lib/
2021-06-08 18:19:31 WARNING install bus.dispatch(
2021-06-08 18:19:31 WARNING install File "/var/lib/
2021-06-08 18:19:31 WARNING install _invoke(
2021-06-08 18:19:31 WARNING install File "/var/lib/
2021-06-08 18:19:31 WARNING install handler.invoke()
2021-06-08 18:19:31 WARNING install File "/var/lib/
2021-06-08 18:19:31 WARNING install self._action(*args)
2021-06-08 18:19:31 WARNING install File "/var/lib/
2021-06-08 18:19:31 WARNING install validate_
2021-06-08 18:19:31 WARNING install File "lib/charms/
2021-06-08 18:19:31 WARNING install netloc=
2021-06-08 18:19:31 WARNING install File "lib/charms/
2021-06-08 18:19:31 WARNING install iface = netifaces.