From: Jason Dillaman Date: Thu, 10 May 2018 12:54:41 +0000 (-0400) Subject: librbd: don't assert if parent pool doesn't exist X-Git-Tag: v13.1.1~1^2~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=51e29a3c5567f67170d013533124f6adcfc71e09;p=ceph.git librbd: don't assert if parent pool doesn't exist Signed-off-by: Jason Dillaman (cherry picked from commit 88436b58bca5b271403f583f6b95e1d30ea81f8f) --- diff --git a/src/librbd/image/RefreshParentRequest.cc b/src/librbd/image/RefreshParentRequest.cc index f1c2d1cb564db..1b76efa11b7f4 100644 --- a/src/librbd/image/RefreshParentRequest.cc +++ b/src/librbd/image/RefreshParentRequest.cc @@ -99,7 +99,11 @@ void RefreshParentRequest::send_open_parent() { librados::IoCtx parent_io_ctx; int r = rados.ioctx_create2(m_parent_md.spec.pool_id, parent_io_ctx); - assert(r == 0); + if (r < 0) { + lderr(cct) << "failed to create IoCtx: " << cpp_strerror(r) << dendl; + send_complete(r); + return; + } // since we don't know the image and snapshot name, set their ids and // reset the snap_name and snap_exists fields after we read the header