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 <dillaman@redhat.com>
This commit is contained in:
Jason Dillaman 2020-10-21 15:39:34 -04:00
parent d63a564f22
commit 0ef9cec0bd

View File

@ -633,7 +633,8 @@ int Migration<I>::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;