From 25d1a8dc4a1f834c73efe4a2352193757d739998 Mon Sep 17 00:00:00 2001 From: anthony Date: Thu, 17 Mar 2011 19:17:44 -0700 Subject: [PATCH] bug 8993: throw exception if creating snapshot on primary storage fails it may be due to previous creation desn't finish status 8993: resolved fixed --- .../src/com/cloud/storage/snapshot/SnapshotManagerImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java index c47a6cf38ed..07843f0c47d 100755 --- a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java +++ b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java @@ -388,7 +388,9 @@ public class SnapshotManagerImpl implements SnapshotManager, SnapshotService, Ma if (!backedUp) { throw new CloudRuntimeException("Created snapshot: " + snapshot + " on primary but failed to backup on secondary"); } - } + } else { + throw new CloudRuntimeException("Failed to create snapshot: " + snapshot + " on primary storage"); + } } finally { // Cleanup jobs to do after the snapshot has been created; decrement resource count if (snapshot != null) {