Skip to content

Commit 350e893

Browse files
committed
CLOUDSTACK-4754: it's a race condition: delete template, and deploy vm from the template happened at the same time,
1 parent f3c917d commit 350e893

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/DataMotionServiceImpl.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ public class DataMotionServiceImpl implements DataMotionService {
4141

4242
@Override
4343
public void copyAsync(DataObject srcData, DataObject destData, AsyncCompletionCallback<CopyCommandResult> callback) {
44+
if (srcData.getDataStore() == null || destData.getDataStore() == null) {
45+
throw new CloudRuntimeException("can't find data store");
46+
}
4447

4548
if (srcData.getDataStore().getDriver().canCopy(srcData, destData)) {
4649
srcData.getDataStore().getDriver().copyAsync(srcData, destData, callback);

0 commit comments

Comments
 (0)