]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: ignore notify errors on missing image header 11395/head
authorJason Dillaman <dillaman@redhat.com>
Mon, 10 Oct 2016 15:57:03 +0000 (11:57 -0400)
committerJason Dillaman <dillaman@redhat.com>
Mon, 10 Oct 2016 15:57:03 +0000 (11:57 -0400)
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>
src/librbd/Operations.cc

index 304545f8b739636064f93fcecf087fd8559668ea..933e412b8b8f0c2930e591aad25a5ed944a77e31 100644 (file)
@@ -56,6 +56,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;