all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH ceph master/pve-9] cherry-pick fix for ceph-volume exception when creating an OSD
@ 2025-06-23 14:15 Fiona Ebner
  2025-07-02  7:46 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Fiona Ebner @ 2025-06-23 14:15 UTC (permalink / raw)
  To: pve-devel

Without the patch, creating an OSD would fail with:
> AttributeError: 'EntryPoints' object has no attribute 'get'

Thanks to Fabian Grünbichler for quickly finding the fix upstream!

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 ...volume-fix-importlib.metadata-compat.patch | 39 +++++++++++++++++++
 patches/series                                |  1 +
 2 files changed, 40 insertions(+)
 create mode 100644 patches/0031-ceph-volume-fix-importlib.metadata-compat.patch

diff --git a/patches/0031-ceph-volume-fix-importlib.metadata-compat.patch b/patches/0031-ceph-volume-fix-importlib.metadata-compat.patch
new file mode 100644
index 00000000000..48fc4dc174f
--- /dev/null
+++ b/patches/0031-ceph-volume-fix-importlib.metadata-compat.patch
@@ -0,0 +1,39 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Peter Sabaini <peter.sabaini@canonical.com>
+Date: Wed, 11 Sep 2024 16:56:50 +0200
+Subject: [PATCH] ceph-volume: fix importlib.metadata compat
+
+The importlib.metadata library removed older shims in releases >5.0.0
+where EntryPoints objects use .select() instead of dict-like access.
+
+Fixes: https://tracker.ceph.com/issues/68032
+
+Signed-off-by: Peter Sabaini <peter.sabaini@canonical.com>
+(cherry picked from commit 8c78a22d2cf69892570f635735d9735169b64a75)
+Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
+---
+ src/ceph-volume/ceph_volume/main.py | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/src/ceph-volume/ceph_volume/main.py b/src/ceph-volume/ceph_volume/main.py
+index f8eca65ec49..4f27f429e89 100644
+--- a/src/ceph-volume/ceph_volume/main.py
++++ b/src/ceph-volume/ceph_volume/main.py
+@@ -11,8 +11,16 @@ try:
+     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:
++    # Fallback to `pkg_resources` for older versions
+     from pkg_resources import iter_entry_points as entry_points  # type: ignore
+ 
+     def get_entry_points(group: str):  # type: ignore
diff --git a/patches/series b/patches/series
index 203eb9a7482..517070ac3e0 100644
--- a/patches/series
+++ b/patches/series
@@ -25,3 +25,4 @@
 0028-python-common-add-a-utils-function-to-replace-distut.patch
 0029-pybind-mgr-replace-imports-of-distutils.util.patch
 0030-debian-radosgw-add-media-types-packages-as-alternati.patch
+0031-ceph-volume-fix-importlib.metadata-compat.patch
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: [PATCH ceph master/pve-9] cherry-pick fix for ceph-volume exception when creating an OSD
  2025-06-23 14:15 [pve-devel] [PATCH ceph master/pve-9] cherry-pick fix for ceph-volume exception when creating an OSD Fiona Ebner
@ 2025-07-02  7:46 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2025-07-02  7:46 UTC (permalink / raw)
  To: pve-devel, Fiona Ebner

On Mon, 23 Jun 2025 16:15:02 +0200, Fiona Ebner wrote:
> Without the patch, creating an OSD would fail with:
> > AttributeError: 'EntryPoints' object has no attribute 'get'
> 
> Thanks to Fabian Grünbichler for quickly finding the fix upstream!
> 
> 

Applied, thanks!

[1/1] cherry-pick fix for ceph-volume exception when creating an OSD
      commit: af40d88dc3756c783031957642d0a78a2815d191


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-07-02  7:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-23 14:15 [pve-devel] [PATCH ceph master/pve-9] cherry-pick fix for ceph-volume exception when creating an OSD Fiona Ebner
2025-07-02  7:46 ` [pve-devel] applied: " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal