From 0ef9cec0bd60f26793fde53afa4057926fb21185 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Wed, 21 Oct 2020 15:39:34 -0400 Subject: [PATCH] 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 --- src/librbd/api/Migration.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/librbd/api/Migration.cc b/src/librbd/api/Migration.cc index d700bb36f4e..fa0aaaa95d2 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;