The prometheus relation should not use the cluster public address

Change-Id: I2a43fc77f1f8bc4c16aeeecb0ba9a37615642d1c
This commit is contained in:
Chris MacNaughton 2020-06-03 10:38:29 +02:00
parent 453dd29608
commit 1f85b7c001
No known key found for this signature in database
GPG Key ID: 74BAF13D12E6A841
1 changed files with 2 additions and 2 deletions

View File

@ -75,6 +75,7 @@ from charmhelpers.contrib.openstack.utils import (
from charmhelpers.contrib.network.ip import (
get_ipv6_addr,
format_ipv6_addr,
get_relation_ip,
)
from charmhelpers.core.sysctl import create as create_sysctl
from charmhelpers.core.templating import render
@ -436,9 +437,8 @@ def prometheus_relation(relid=None, unit=None, prometheus_permitted=None,
log("checking if prometheus module is enabled")
if prometheus_permitted and module_enabled:
log("Updating prometheus")
addr = get_public_addr()
data = {
'hostname': format_ipv6_addr(addr) or addr,
'hostname': get_relation_ip('prometheus'),
'port': 9283,
}
relation_set(relation_id=relid,