thruk-test-external-agent uses "url=http://127.0.0.1/" by default, and following "juju config ..." to update "url" value doesn't work as expected:
In thruk-master unit, /var/log/thruk/thruk.log shows:
"""
[2018/11/26 14:54:11][juju-92b911-11][ERROR][Thruk] No Backend available
[2018/11/26 14:54:11][juju-92b911-11][ERROR][Thruk] juju: remote site returned rc: 1 - "authorization failed, no auth key specified for http://127.0.0.1/thruk/cgi-bin/remote.cgi\n" (http://127.0.0.1)
[2018/11/26 14:54:11][juju-92b911-11][ERROR][Thruk] on page: http://10.205.6.183/thruk/cgi-bin/tac.cgi?_=1543244051029
[2018/11/26 14:54:11][juju-92b911-11][ERROR][Thruk] User: thrukadmin
"""
/var/cache/thruk/lmd/lmd.ini had to be manually updated:
"""
[[Connections]]
name = 'juju'
id = '5a105e8b9d40e1329780d62ea2265d8a'
source = ['http://127.0.0.1/']
auth = '' ## <-- needed to be manually updated
"""
Then, "service thruk restart", and lmd.ini got automatically updated to the new data shared via juju relation with thruk-external-agent-charm:
"""
[[Connections]]
name = 'test1'
id = '5a105e8b9d40e1329780d62ea2265d8a'
source = ['http://10.205.6.227/']
auth = '0b0d118151ab45cbefd167d4f0a36b21'
"""
TL;DR: thruk-master-charm may need to be rewritten to reactive charm (now uses the Service framework) to better manage config changes (even coming from relations).
Tested to add bionic "series" in metadata.yaml.
""" external- agent-charm external- agent --series bionic external- agent
cd thruk-master-charm
juju deploy . thruk-master --series bionic
cd ../thruk-
juju deploy . thruk-test-
juju add-relation thruk-master thruk-test-
"""
thruk-test- external- agent uses "url=http:// 127.0.0. 1/" by default, and following "juju config ..." to update "url" value doesn't work as expected:
In thruk-master unit, /var/log/ thruk/thruk. log shows: [juju-92b911- 11][ERROR] [Thruk] No Backend available [juju-92b911- 11][ERROR] [Thruk] juju: remote site returned rc: 1 - "authorization failed, no auth key specified for http:// 127.0.0. 1/thruk/ cgi-bin/ remote. cgi\n" (http:// 127.0.0. 1) [juju-92b911- 11][ERROR] [Thruk] on page: http:// 10.205. 6.183/thruk/ cgi-bin/ tac.cgi? _=1543244051029 [juju-92b911- 11][ERROR] [Thruk] User: thrukadmin
"""
[2018/11/26 14:54:11]
[2018/11/26 14:54:11]
[2018/11/26 14:54:11]
[2018/11/26 14:54:11]
"""
/var/cache/ thruk/lmd/ lmd.ini had to be manually updated: 329780d62ea2265 d8a' 127.0.0. 1/']
"""
[[Connections]]
name = 'juju'
id = '5a105e8b9d40e1
source = ['http://
auth = '' ## <-- needed to be manually updated
"""
Then, "service thruk restart", and lmd.ini got automatically updated to the new data shared via juju relation with thruk-external- agent-charm: 329780d62ea2265 d8a' 10.205. 6.227/'] cbefd167d4f0a36 b21'
"""
[[Connections]]
name = 'test1'
id = '5a105e8b9d40e1
source = ['http://
auth = '0b0d118151ab45
"""
TL;DR: thruk-master-charm may need to be rewritten to reactive charm (now uses the Service framework) to better manage config changes (even coming from relations).