diff --git a/coriolis/conductor/rpc/server.py b/coriolis/conductor/rpc/server.py index e31c0f89..548aee1b 100644 --- a/coriolis/conductor/rpc/server.py +++ b/coriolis/conductor/rpc/server.py @@ -911,9 +911,9 @@ def _check_task_cls_param_requirements(task, instance_task_info_keys): @replica_synchronized def execute_replica_tasks(self, ctxt, replica_id, shutdown_instances): replica = self._get_replica(ctxt, replica_id, include_task_info=True) - self._check_reservation_for_replica(replica) self._check_replica_running_executions(ctxt, replica) self._check_minion_pools_for_action(ctxt, replica) + self._check_reservation_for_replica(replica) execution = models.TasksExecution() execution.id = str(uuid.uuid4()) @@ -1396,7 +1396,6 @@ def deploy_replica_instances( instance_osmorphing_minion_pool_mappings=None, skip_os_morphing=False, user_scripts=None): replica = self._get_replica(ctxt, replica_id, include_task_info=True) - self._check_reservation_for_replica(replica) self._check_replica_running_executions(ctxt, replica) self._check_valid_replica_tasks_execution(replica, force) user_scripts = user_scripts or replica.user_scripts @@ -1445,6 +1444,7 @@ def deploy_replica_instances( migration.instance_osmorphing_minion_pool_mappings.update( instance_osmorphing_minion_pool_mappings) self._check_minion_pools_for_action(ctxt, migration) + self._check_reservation_for_replica(replica) execution = models.TasksExecution() migration.executions = [execution]