2018-06-04 19:36:39 |
Shane Peters |
description |
When using the mysql:dbadmin interface to have telegraf poll mysql-specific metrics, the hostname across other telegraf subordinates changes to 'mysql/x'.
The issue lies in get_remote_unit_name which returns the unit_name for the first relation found, without confirming it's for that specific unit.
This is due to the removal of a test which used the IP address determine the correct unit.
https://git.launchpad.net/telegraf-charm/commit/?id=2920829b8dc4671c0685c86d575a639833ec699c |
When using the mysql:dbadmin interface to have telegraf poll mysql-specific metrics, the hostname across other telegraf subordinates changes to 'mysql/x'.
The issue lies in get_remote_unit_name which returns the unit_name for the first relation found, without confirming it's for that specific unit.
This is due to the removal of a test which used the IP address determine the correct unit.
https://git.launchpad.net/telegraf-charm/commit/?id=2920829b8dc4671c0685c86d575a639833ec699c
From a debug session, we can see that the 'mysql' relation will be tested before the juju-info relation and will the return the mysql unit name:
(Pdb) hookenv.metadata()['requires'].keys()
dict_keys(['exec', 'haproxy', 'apache', 'mysql', 'postgresql', 'influxdb-api', 'juju-info', 'mongodb', 'elasticsearch', 'memcached'])
The workaround here is to remove the mysql:dbadmin relation. |
|