Skip to content

Commit

Permalink
bug #4662: Do not double unlock on deploy/migrate operations
Browse files Browse the repository at this point in the history
(cherry picked from commit 61a2464)
  • Loading branch information
rsmontero committed Aug 1, 2016
1 parent 58206b5 commit 3ad4d27
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/dm/DispatchManagerActions.cc
Expand Up @@ -58,18 +58,14 @@ int DispatchManager::deploy (
goto error;
}

vm->unlock();

return 0;

error:

oss.str("");
oss << "Could not deploy VM " << vid
<< ", wrong state " << vm->state_str() << ".";
NebulaLog::log("DiM",Log::ERROR,oss);

vm->unlock();
return -1;
}

Expand Down Expand Up @@ -127,8 +123,6 @@ int DispatchManager::import (

vmpool->update_history(vm);

vm->unlock();

return 0;
}

Expand Down Expand Up @@ -164,8 +158,6 @@ int DispatchManager::migrate(
goto error;
}

vm->unlock();

return 0;

error:
Expand All @@ -174,7 +166,6 @@ int DispatchManager::migrate(
<< ", wrong state " << vm->state_str() << ".";
NebulaLog::log("DiM",Log::ERROR,oss);

vm->unlock();
return -1;
}

Expand Down Expand Up @@ -207,8 +198,6 @@ int DispatchManager::live_migrate(
goto error;
}

vm->unlock();

return 0;

error:
Expand All @@ -217,7 +206,6 @@ int DispatchManager::live_migrate(
<< ", wrong state " << vm->state_str() << ".";
NebulaLog::log("DiM",Log::ERROR,oss);

vm->unlock();
return -1;
}

Expand Down

0 comments on commit 3ad4d27

Please sign in to comment.