Project

General

Profile

Actions

Bug #61881

closed

addrs param on ceph-exporter config not working while use cephadm apply

Added by hoan nv 10 months ago. Updated 10 months ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
cephadm
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Hi all.

I have a 17.2.6 ceph cluster was deployed by cephadm.

ceph-exporter was deployed successfully but it listen on diffirent ip on each server. I can't control ip which ceph-exporter will binding.

So i create a ceph-exporter yaml config


service_type: ceph-exporter
service_name: ceph-exporter
placement:
  host_pattern: *
spec:
  addrs: 0.0.0.0
  port: 9927
  prio_limit: 5
  stats_period: 5

After run apply above config. It still same before.

I turn on debug on cephadm see : addrs param on yaml not working.

2023-07-03T07:31:19.975782+0000 mgr.ceph02.rechih [DBG] stdin: {"config": "# minimal ceph.conf for 60d62df2-09cd-11ee-9bc2-005056845593\n[global]\n\tfsid = 60d62df2-09cd-11ee-9bc2-005056845593\n
\tmon_host = [v2:100.65.2.10:3300/0,v1:100.65.2.10:6789/0] [v2:100.65.2.11:3300/0,v1:100.65.2.11:6789/0] [v2:100.65.2.12:3300/0,v1:100.65.2.12:6789/0] [v2:100.65.2.13:3300/0,v1:100.65.2.13:6789/0] [v2:10
0.65.2.14:3300/0,v1:100.65.2.14:6789/0]\n", "keyring": "[client.ceph-exporter.ceph03]\nkey = abc==\n", "port": "9927", "prio-limit": "5", "stats-period": "5"} 
2023-07-03T07:31:19.975814+0000 mgr.ceph02.rechih [DBG] Running command: which python3   

How i can fix it.
Thanks

Actions #1

Updated by Redouane Kachach Elhichou 10 months ago

  • Status changed from New to Duplicate
Actions #2

Updated by Redouane Kachach Elhichou 10 months ago

This issue is being addressed by the PR:

https://github.com/ceph/ceph/pull/52084

The fix is easy so you can try to apply it to your cephadm easily until the changes are backported to quincy.

Actions #3

Updated by hoan nv 10 months ago

Redouane Kachach Elhichou wrote:

This issue is being addressed by the PR:

https://github.com/ceph/ceph/pull/52084

The fix is easy so you can try to apply it to your cephadm easily until the changes are backported to quincy.

I change cephadm file /usr/sbin/cephadm to

self.sock_dir = config_json.get('sock-dir', '/var/run/ceph/')
#self.addrs = config_json.get('addrs', socket.gethostbyname(socket.gethostname()))
ipv4_addrs, _ = get_ip_addresses(get_hostname())
addrs = '0.0.0.0' if ipv4_addrs else '::'
self.addrs = config_json.get('addrs', addrs

then delete and apply config but it not work :(

Actions

Also available in: Atom PDF