]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/rbd_support: add user-friendly stderr message
authorRamana Raja <rraja@redhat.com>
Wed, 14 Jun 2023 20:17:09 +0000 (16:17 -0400)
committerRamana Raja <rraja@redhat.com>
Tue, 8 Aug 2023 20:26:19 +0000 (16:26 -0400)
... when the rbd_support module is not ready.

Fixes: https://tracker.ceph.com/issues/61688
Signed-off-by: Ramana Raja <rraja@redhat.com>
(cherry picked from commit 6351ef5c8e691e359b1bf913dde4dbc8a441be1d)

Conflicts:
src/pybind/mgr/rbd_support/module.py
 - Above conflict was due to commit dcb51b0
   ("mgr/rbd_support: define commands using CLICommand") not in pacific

src/pybind/mgr/rbd_support/module.py

index f7f2101cfb3cf0b4d95f9ac80b76b45f51371808..79944a1d82c5ff5b972635b75dc61b35952f181d 100644 (file)
@@ -212,7 +212,8 @@ class Module(MgrModule):
 
     def handle_command(self, inbuf, cmd):
         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()