]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
librbd: don't assert if parent pool doesn't exist
authorJason Dillaman <dillaman@redhat.com>
Thu, 10 May 2018 12:54:41 +0000 (08:54 -0400)
committerJason Dillaman <dillaman@redhat.com>
Tue, 15 May 2018 20:30:16 +0000 (16:30 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/image/RefreshParentRequest.cc

index f1c2d1cb564db28d09f8200bb95b7417277c25db..1b76efa11b7f4cf2e9b2ac05047326f008555856 100644 (file)
@@ -99,7 +99,11 @@ void RefreshParentRequest<I>::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