Skip to content

Commit 110bc66

Browse files
authored
Fix CephExporter protocol bind logic
In a dual stack configuration ceph-exporter binds to ipv4 only and the metrics fail in ipv6 Signed-off-by: Mouratidis Theofilos <[email protected]>
1 parent 281614e commit 110bc66

File tree

1 file changed

+2
-2
lines changed
  • src/cephadm/cephadmlib/daemons

1 file changed

+2
-2
lines changed

src/cephadm/cephadmlib/daemons/ceph.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,8 @@ def __init__(
292292
self.image = image
293293

294294
self.sock_dir = config_json.get('sock-dir', '/var/run/ceph/')
295-
ipv4_addrs, _ = get_ip_addresses(get_hostname())
296-
addrs = '0.0.0.0' if ipv4_addrs else '::'
295+
_, ipv6_addrs = get_ip_addresses(get_hostname())
296+
addrs = '::' if ipv6_addrs else '0.0.0.0'
297297
self.addrs = config_json.get('addrs', addrs)
298298
self.port = config_json.get('port', self.DEFAULT_PORT)
299299
self.prio_limit = config_json.get('prio-limit', 5)

0 commit comments

Comments
 (0)