]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/prometheus: remove dependency on cephadm module
authorAdam King <adking@redhat.com>
Fri, 3 Mar 2023 20:31:03 +0000 (15:31 -0500)
committerAdam King <adking@redhat.com>
Tue, 25 Apr 2023 12:36:55 +0000 (08:36 -0400)
commit6d52de921d0156ede039bafc3184739091e9c1c6
treef809462f926b083f3a3919760116515f2ac14a48
parent1087db40ba5b676b8eca504a18429551924fb171
mgr/prometheus: remove dependency on cephadm module

https://github.com/ceph/ceph/commit/f967ac061ebee362cdc82c458e955da75a9045e9
introduced an import of something in the cephadm module
in the prometheus module. This seems to break the prometheus
module in some non-cephadm setups. For example, the ceph-ansible
ci hit

failed: [mgr0 -> mon0] (item=prometheus) => changed=true
  ansible_loop_var: item
  cmd:
  - ceph
  - -n
  - client.admin
  - -k
  - /etc/ceph/ceph.client.admin.keyring
  - --cluster
  - ceph
  - mgr
  - module
  - enable
  - prometheus
  delta: '0:00:00.389965'
  end: '2023-03-03 15:30:07.631308'
  item: prometheus
  rc: 2
  start: '2023-03-03 15:30:07.241343'
  stderr: 'Error ENOENT: module ''prometheus'' reports that it cannot run on the active manager daemon: No module named ''cephadm'' (pass --force to force enablement)'
  stderr_lines: <omitted>
  stdout: ''
  stdout_lines: <omitted>

so we need to be a bit more careful with this import and
make sure the prometheus module works fine without cephadm

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 8be588958bd2694b8a427bdfc10011ba62df8453)
src/pybind/mgr/prometheus/module.py