From: Jason Dillaman Date: Mon, 10 Oct 2016 15:57:03 +0000 (-0400) Subject: librbd: ignore notify errors on missing image header X-Git-Tag: v10.2.4~55^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3bb2a9ed9602b0d280a357f53bc90c6cf83ffe32;p=ceph.git librbd: ignore notify errors on missing image header 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 (cherry picked from commit fe3e2eafa087f81c9ab59f3fbc39600d6adaa9c2) --- diff --git a/src/librbd/Operations.cc b/src/librbd/Operations.cc index 0c6d8cdb80c..fa4b3b9e836 100644 --- a/src/librbd/Operations.cc +++ b/src/librbd/Operations.cc @@ -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;