Bug 51351

Summary: модуль prometheus для ceph не работает
Product: Sisyphus Reporter: Ivan A. Melnikov <iv>
Component: ceph-mgr-prometheusAssignee: maks1ms <maks1ms>
Status: ASSIGNED --- QA Contact: qa-sisyphus
Severity: normal    
Priority: P5 CC: maks1ms
Version: unstable   
Hardware: x86_64   
OS: Linux   

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