mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-8224: Don't try to unlock if template is not locked
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
9198859dcf
commit
8cfd374f04
|
|
@ -558,14 +558,12 @@ public class VolumeServiceImpl implements VolumeService {
|
|||
DataObject templateOnPrimaryStoreObj = context.destObj;
|
||||
if (!result.isSuccess()) {
|
||||
templateOnPrimaryStoreObj.processEvent(Event.OperationFailed);
|
||||
_tmpltPoolDao.releaseFromLockTable(context.getTemplatePoolId());
|
||||
res.setResult(result.getResult());
|
||||
future.complete(res);
|
||||
return null;
|
||||
}
|
||||
|
||||
templateOnPrimaryStoreObj.processEvent(Event.OperationSuccessed, result.getAnswer());
|
||||
_tmpltPoolDao.releaseFromLockTable(context.getTemplatePoolId());
|
||||
createVolumeFromBaseImageAsync(context.volume, templateOnPrimaryStoreObj, context.dataStore, future);
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue