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: v14.0.0~95^2~14 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=88436b58bca5b271403f583f6b95e1d30ea81f8f;p=ceph.git librbd: don't assert if parent pool doesn't exist Signed-off-by: Jason Dillaman --- diff --git a/src/librbd/image/RefreshParentRequest.cc b/src/librbd/image/RefreshParentRequest.cc index f1c2d1cb564d..1b76efa11b7f 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