]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: ignore notify errors on missing image header 11420/head
authorJason Dillaman <dillaman@redhat.com>
Mon, 10 Oct 2016 15:57:03 +0000 (11:57 -0400)
committerLoic Dachary <ldachary@redhat.com>
Tue, 11 Oct 2016 08:58:42 +0000 (10:58 +0200)
The rename op on v1 images fails since the header no longer exists. In
the general case, the removal of the header object will also fail the
watcher which has its own recovery path.

Fixes: http://tracker.ceph.com/issues/17549
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit fe3e2eafa087f81c9ab59f3fbc39600d6adaa9c2)

src/librbd/Operations.cc

index 0c6d8cdb80c58c0cff549fd7a10538462433160f..fa4b3b9e83650da8a928fc8c061716c05e20537f 100644 (file)
@@ -50,6 +50,10 @@ struct C_NotifyUpdate : public Context {
         // don't fail the op if a peer fails to get the update notification
         lderr(cct) << "update notification timed-out" << dendl;
         r = 0;
+      } else if (r == -ENOENT) {
+        // don't fail if header is missing (e.g. v1 image rename)
+        ldout(cct, 5) << "update notification on missing header" << dendl;
+        r = 0;
       } else if (r < 0) {
         lderr(cct) << "update notification failed: " << cpp_strerror(r)
                    << dendl;