Comment 1 for bug 1805101

Revision history for this message
Alvaro Uria (aluria) wrote : Re: Add bionic support

Tested to add bionic "series" in metadata.yaml.

"""
cd thruk-master-charm
juju deploy . thruk-master --series bionic
cd ../thruk-external-agent-charm
juju deploy . thruk-test-external-agent --series bionic
juju add-relation thruk-master thruk-test-external-agent
"""

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).