Bug 51351 - модуль prometheus для ceph не работает
Summary: модуль prometheus для ceph не работает
Status: ASSIGNED
Alias: None
Product: Sisyphus
Classification: Development
Component: ceph-mgr-prometheus (show other bugs)
Version: unstable
Hardware: x86_64 Linux
: P5 normal
Assignee: maks1ms@altlinux.org
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-30 15:28 MSK by Ivan A. Melnikov
Modified: 2024-08-30 19:04 MSK (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan A. Melnikov 2024-08-30 15:28:28 MSK
Невозможно включить модуль promenteus:

# ceph mgr module enable prometheus
Error ENOENT: module 'prometheus' reports that it cannot run on the active manager daemon: cannot import name 'packaging' from 'pkg_resources' (/lib64/python3/site-packages/pkg_resources/__init__.py) (pass --force to force enablement)

Действительно, модуль рассчитывает на старые setuptools:

$ PYTHONPATH=/usr/share/ceph/ python3 -c 'import mgr.prometheus'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/share/ceph/mgr/prometheus/__init__.py", line 2, in <module>
    from .module import Module, StandbyModule
  File "/usr/share/ceph/mgr/prometheus/module.py", line 4, in <module>
    from pkg_resources import packaging  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: cannot import name 'packaging' from 'pkg_resources' (/usr/lib64/python3/site-packages/pkg_resources/__init__.py)
Comment 1 Ivan A. Melnikov 2024-08-30 15:31:24 MSK
Похоже, нам нужно вот это:

https://github.com/ceph/ceph/commit/844b66de419d7bf5f622980b0de3c69b5ad8bc9c
Comment 2 Alexey Shabalin 2024-08-30 19:04:14 MSK
Эх, пока разбирался, не увидел багу. А таск уже есть:
https://packages.altlinux.org/ru/tasks/356413