]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: don't log error if get mirror status fails due to mirroring disabled
authorMykola Golub <mgolub@suse.com>
Thu, 11 Feb 2021 09:24:49 +0000 (09:24 +0000)
committerJason Dillaman <dillaman@redhat.com>
Fri, 12 Feb 2021 13:24:11 +0000 (08:24 -0500)
Fixes: https://tracker.ceph.com/issues/49245
Signed-off-by: Mykola Golub <mgolub@suse.com>
(cherry picked from commit 1d303e6faa51ab71e5b5b909053fd6120c981081)

src/librbd/mirror/GetStatusRequest.cc

index 6e8b066602f25db5ebcf00cbf5a2de366adcfe4a..40d4a664b690d580c9c92e266e7be01d785a61ee 100644 (file)
@@ -50,8 +50,10 @@ void GetStatusRequest<I>::handle_get_info(int r) {
   ldout(cct, 20) << "r=" << r << dendl;
 
   if (r < 0) {
-    lderr(cct) << "failed to retrieve mirroring state: " << cpp_strerror(r)
-               << dendl;
+    if (r != -ENOENT) {
+      lderr(cct) << "failed to retrieve mirroring state: " << cpp_strerror(r)
+                 << dendl;
+    }
     finish(r);
     return;
   } else if (m_mirror_image->state != cls::rbd::MIRROR_IMAGE_STATE_ENABLED) {