Bug 2310236 - ceph-volume: AttributeError: 'EntryPoints' object has no attribute 'get'
Summary: ceph-volume: AttributeError: 'EntryPoints' object has no attribute 'get'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ceph
Version: 42
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Kaleb KEITHLEY
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-09-05 14:48 UTC by Tomasz Torcz
Modified: 2025-08-18 13:04 UTC (History)
10 users (show)

Fixed In Version: ceph-19.2.3-3.fc43 ceph-19.2.3-4.fc44
Clone Of:
Environment:
Last Closed: 2025-08-13 17:43:27 UTC
Type: ---
Embargoed:
kkeithle: needinfo-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Ceph Project Bug Tracker 68032 0 None None None 2024-11-07 11:48:57 UTC

Description Tomasz Torcz 2024-09-05 14:48:17 UTC
ceph-volume fails to activate any OSDs:

[2024-09-05 08:35:49,109][ceph_volume.process][INFO  ] Running command: /usr/sbin/ceph-volume simple trigger 5-84bd2e57-ab7e-4dbb-86d6-fb76ed5168d9
[2024-09-05 08:35:49,498][ceph_volume.process][INFO  ] stderr exception caught by decorator
Traceback (most recent call last):
  File "/usr/lib/python3.13/site-packages/ceph_volume/decorators.py", line 59, in newfunc
    return f(*a, **kw)
  File "/usr/lib/python3.13/site-packages/ceph_volume/main.py", line 118, in main
    self.enable_plugins()
    ~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/ceph_volume/main.py", line 83, in enable_plugins
    plugins = _load_library_extensions()
  File "/usr/lib/python3.13/site-packages/ceph_volume/main.py", line 188, in _load_library_extensions
    for ep in get_entry_points(group=group):
              ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/ceph_volume/main.py", line 14, in get_entry_points
    return entry_points().get(group, [])  # type: ignore
           ^^^^^^^^^^^^^^^^^^
AttributeError: 'EntryPoints' object has no attribute 'get'
-->  AttributeError: 'EntryPoints' object has no attribute 'get'
[2024-09-05 08:35:49,542][systemd][WARNING] command returned non-zero exit status: 1
[2024-09-05 08:35:49,542][systemd][WARNING] failed activating OSD, retries left: 1


Reproducible: Always

Steps to Reproduce:
1. Boot rawhide ceph OSD node.
2.
3.
Actual Results:  
No OSDs started.


ceph-volume-19.1.1-0.1.fc42.noarch

Comment 2 Aoife Moloney 2025-02-26 13:11:31 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.

Comment 3 Scott Shambarger 2025-03-08 04:26:01 UTC
Patch that works and makes ceph-volume work again:

--- src/ceph-volume/ceph_volume/main.py-orig        2025-01-21 12:28:33.000000000 -0800
+++ src/ceph-volume/ceph_volume/main.py     2025-03-07 20:17:40.378635856 -0800
@@ -11,7 +11,13 @@
     from importlib.metadata import entry_points
 
     def get_entry_points(group: str):  # type: ignore
-        return entry_points().get(group, [])  # type: ignore
+        eps = entry_points()
+        if hasattr(eps, 'select'):
+            # New importlib.metadata uses .select()
+            return eps.select(group=group)
+        else:
+            # Fallback to older EntryPoints that returns dicts
+            return eps.get(group, [])  # type: ignore
 except ImportError:
     from pkg_resources import iter_entry_points as entry_points  # type: ignore

Comment 4 Hector Martin 2025-04-23 10:28:17 UTC
This is also broken in F41 (Ceph 19.2.2).

Comment 5 Christoph Karl 2025-05-18 15:30:47 UTC
The patch from comment #3 works for me.
May I ask for patching this downstream.
Thank you

Comment 6 Tomasz Torcz 2025-08-13 10:28:22 UTC
@kkeithle can you please apply the patch? It's really a oneliner (changing `return entry_points().get(group, [])` to `return eps.select(group=group)`).
We currently do not have working `ceph-volume` in Fedora stable release :(

Comment 7 Fedora Update System 2025-08-13 17:35:50 UTC
FEDORA-2025-f9b9fa57b3 (ceph-19.2.3-3.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-f9b9fa57b3

Comment 8 Fedora Update System 2025-08-13 17:43:27 UTC
FEDORA-2025-f9b9fa57b3 (ceph-19.2.3-3.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Fedora Update System 2025-08-15 17:56:13 UTC
FEDORA-2025-5cd8048b8b (ceph-19.2.3-4.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-5cd8048b8b

Comment 10 Fedora Update System 2025-08-15 18:05:27 UTC
FEDORA-2025-5cd8048b8b (ceph-19.2.3-4.fc44) has been pushed to the Fedora 44 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.