From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 7419C1FF183 for ; Wed, 16 Jul 2025 19:39:25 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B70F718975; Wed, 16 Jul 2025 19:40:31 +0200 (CEST) From: "Max R. Carrara" To: pve-devel@lists.proxmox.com Date: Wed, 16 Jul 2025 19:39:54 +0200 Message-Id: <20250716173956.980112-1-m.carrara@proxmox.com> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.076 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_MSPIKE_H2 0.001 Average reputation (+2) RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH v1 master ceph 0/2] Fix Ceph Squid Module Loading X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" Fix Ceph Squid Module Loading - v1 ================================== The first patch provides a workaround for the PyO3 ImportError that's being thrown by the `restful` Ceph mgr Python module upon import. This fixes the following error: 2025-07-16T17:40:40.932+0200 7c315bc77080 1 mgr[py] Loading python module 'restful' 2025-07-16T17:40:41.220+0200 7c315bc77080 -1 mgr[py] Module not found: 'restful' 2025-07-16T17:40:41.220+0200 7c315bc77080 -1 mgr[py] Traceback (most recent call last): File "/usr/share/ceph/mgr/restful/__init__.py", line 1, in from .module import Module File "/usr/share/ceph/mgr/restful/module.py", line 22, in from OpenSSL import crypto File "/lib/python3/dist-packages/OpenSSL/__init__.py", line 8, in from OpenSSL import SSL, crypto File "/lib/python3/dist-packages/OpenSSL/SSL.py", line 15, in from cryptography import x509 File "/lib/python3/dist-packages/cryptography/x509/__init__.py", line 7, in from cryptography.x509 import certificate_transparency, verification File "/lib/python3/dist-packages/cryptography/x509/certificate_transparency.py", line 11, in from cryptography.hazmat.bindings._rust import x509 as rust_x509 ImportError: PyO3 modules compiled for CPython 3.8 or older may only be initialized once per interpreter process 2025-07-16T17:40:41.222+0200 7c315bc77080 -1 mgr[py] Class not found in module 'restful' 2025-07-16T17:40:41.222+0200 7c315bc77080 -1 mgr[py] Error loading module 'restful': (2) No such file or directory The second patch fixes how the Ceph mgr looks up the NOTIFY_TYPES attribute of the mgr Python modules' classes. This also happens to fix the `mgr_module` Python module import failure. In total, this fixes errors like the following: 2025-07-16T17:40:41.222+0200 7c315bc77080 1 mgr[py] Loading python module 'selftest' 2025-07-16T17:40:41.377+0200 7c315bc77080 -1 mgr[py] Module selftest has missing NOTIFY_TYPES member 2025-07-16T17:40:41.377+0200 7c315bc77080 -1 mgr[py] Module not found: 'mgr_module' 2025-07-16T17:40:41.377+0200 7c315bc77080 -1 mgr[py] AttributeError: type object 'Module' has no attribute 'NOTIFY_TYPES' 2025-07-16T17:40:41.377+0200 7c315bc77080 1 mgr[py] Loading python module 'snap_schedule' 2025-07-16T17:40:41.497+0200 7c315bc77080 -1 mgr[py] Module snap_schedule has missing NOTIFY_TYPES member 2025-07-16T17:40:41.497+0200 7c315bc77080 -1 mgr[py] Module not found: 'mgr_module' 2025-07-16T17:40:41.497+0200 7c315bc77080 -1 mgr[py] AttributeError: type object 'Module' has no attribute 'NOTIFY_TYPES' 2025-07-16T17:40:41.497+0200 7c315bc77080 1 mgr[py] Loading python module 'stats' 2025-07-16T17:40:41.636+0200 7c315bc77080 1 mgr[py] Loading python module 'status' 2025-07-16T17:40:41.785+0200 7c315bc77080 -1 mgr[py] Module status has missing NOTIFY_TYPES member 2025-07-16T17:40:41.785+0200 7c315bc77080 -1 mgr[py] Module not found: 'mgr_module' 2025-07-16T17:40:41.785+0200 7c315bc77080 -1 mgr[py] AttributeError: type object 'Module' has no attribute 'NOTIFY_TYPES' Note: These logs can be found inside the ceph-mgr logs in the /var/log/ceph directory. The commit messages of the supplied patches elaborate on further details. Summary of Changes ------------------ Max R. Carrara (2): provide workaround for PyO3 ImportError mgr: fix errors regarding module imports and NOTIFY_TYPES attributes ...ul-provide-workaround-for-PyO3-Impor.patch | 152 ++++++++++++++++++ ...mport-by-making-NOTIFY_TYPES-in-py-m.patch | 56 +++++++ patches/series | 2 + 3 files changed, 210 insertions(+) create mode 100644 patches/0058-pybind-mgr-restful-provide-workaround-for-PyO3-Impor.patch create mode 100644 patches/0059-mgr-fix-module-import-by-making-NOTIFY_TYPES-in-py-m.patch -- 2.39.5 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel