From: Jason Dillaman Date: Wed, 21 Oct 2020 19:39:34 +0000 (-0400) Subject: librbd: migration execute should allow "EXECUTING" state X-Git-Tag: v16.1.0~702^2~11 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0ef9cec0bd60f26793fde53afa4057926fb21185;p=ceph.git librbd: migration execute should allow "EXECUTING" state If the "execute" action was interrupted, we need to be able to restart it. Signed-off-by: Jason Dillaman --- diff --git a/src/librbd/api/Migration.cc b/src/librbd/api/Migration.cc index d700bb36f4e8..fa0aaaa95d2b 100644 --- a/src/librbd/api/Migration.cc +++ b/src/librbd/api/Migration.cc @@ -633,7 +633,8 @@ int Migration::execute(librados::IoCtx& io_ctx, } } BOOST_SCOPE_EXIT_END; - if (dst_migration_spec.state != cls::rbd::MIGRATION_STATE_PREPARED) { + if (dst_migration_spec.state != cls::rbd::MIGRATION_STATE_PREPARED && + dst_migration_spec.state != cls::rbd::MIGRATION_STATE_EXECUTING) { lderr(cct) << "current migration state is '" << dst_migration_spec.state << "' (should be 'prepared')" << dendl; return -EINVAL;