From ca55a9c5a2ca8b6774b1e88eaec0343f940f8ad3 Mon Sep 17 00:00:00 2001 From: Ramana Raja Date: Wed, 14 Jun 2023 16:17:09 -0400 Subject: [PATCH] mgr/rbd_support: add user-friendly stderr message ... when the rbd_support module is not ready. Fixes: https://tracker.ceph.com/issues/61688 Signed-off-by: Ramana Raja (cherry picked from commit 6351ef5c8e691e359b1bf913dde4dbc8a441be1d) --- src/pybind/mgr/rbd_support/module.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pybind/mgr/rbd_support/module.py b/src/pybind/mgr/rbd_support/module.py index c856418f99246..369face038ad2 100644 --- a/src/pybind/mgr/rbd_support/module.py +++ b/src/pybind/mgr/rbd_support/module.py @@ -38,7 +38,8 @@ def with_latest_osdmap(func: FuncT) -> FuncT: @functools.wraps(func) def wrapper(self: 'Module', *args: Any, **kwargs: Any) -> Tuple[int, str, str]: if not self.module_ready: - return -errno.EAGAIN, "", "" + return (-errno.EAGAIN, "", + "rbd_support module is not ready, try again") # ensure we have latest pools available self.rados.wait_for_latest_osdmap() try: -- 2.39.5