Update to Reef OBS-URL: https://build.opensuse.org/request/show/1286032 OBS-URL: https://build.opensuse.org/package/show/filesystems:ceph/ceph?expand=0&rev=370
34 lines
1.5 KiB
Diff
34 lines
1.5 KiB
Diff
From 4589c4d8ac524206d4fb6349b07c5a4e83f926dc Mon Sep 17 00:00:00 2001
|
|
From: John Mulligan <jmulligan@redhat.com>
|
|
Date: Fri, 26 Apr 2024 10:53:33 -0400
|
|
Subject: [PATCH] mgr: do not require NOTIFY_TYPES in python modules
|
|
|
|
Many python mgr modules lack a NOTIFY_TYPES member apparently without
|
|
any downsides beyond an annoying message in the logs. This includes
|
|
commonly used mgr modules like 'volumes' and 'cephadm'. Stop emitting
|
|
an error for missing NOTIFY_TYPES by not assuming all mgr modules in
|
|
python should provide it. The return code is also changed to indicate
|
|
that this is not an error but the return from this function is never
|
|
checked and so it should have no impact. However, if someone started
|
|
using the return value in the future this would match the log change.
|
|
|
|
Fixes: https://tracker.ceph.com/issues/55835
|
|
Signed-off-by: John Mulligan <jmulligan@redhat.com>
|
|
---
|
|
src/mgr/PyModule.cc | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
--- a/src/mgr/PyModule.cc
|
|
+++ b/src/mgr/PyModule.cc
|
|
@@ -437,8 +437,8 @@ int PyModule::load_notify_types()
|
|
{
|
|
PyObject *ls = PyObject_GetAttrString(pClass, "NOTIFY_TYPES");
|
|
if (ls == nullptr) {
|
|
- derr << "Module " << get_name() << " has missing NOTIFY_TYPES member" << dendl;
|
|
- return -EINVAL;
|
|
+ dout(10) << "Module " << get_name() << " has no NOTIFY_TYPES member" << dendl;
|
|
+ return 0;
|
|
}
|
|
if (!PyObject_TypeCheck(ls, &PyList_Type)) {
|
|
// Relatively easy mistake for human to make, e.g. defining COMMANDS
|