From dbe7cdf4b03a0439129fd97d2e8262d101821381 Mon Sep 17 00:00:00 2001 From: Edison Su Date: Mon, 29 Aug 2011 15:23:33 -0700 Subject: [PATCH] bug 11217: only work on the snapshot whose state is "backedup" and is not removed status 11217: resolved fixed --- server/src/com/cloud/upgrade/dao/Upgrade229to2210.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/com/cloud/upgrade/dao/Upgrade229to2210.java b/server/src/com/cloud/upgrade/dao/Upgrade229to2210.java index 6cf18e82251..188863e57e5 100644 --- a/server/src/com/cloud/upgrade/dao/Upgrade229to2210.java +++ b/server/src/com/cloud/upgrade/dao/Upgrade229to2210.java @@ -73,7 +73,7 @@ public class Upgrade229to2210 implements DbUpgrade { ResultSet rs = null; long currentSnapshotId = 0; try { - pstmt = conn.prepareStatement("select id, prev_snap_id from snapshots where sechost_id is NULL and prev_snap_id is not NULL order by id"); + pstmt = conn.prepareStatement("select id, prev_snap_id from snapshots where sechost_id is NULL and prev_snap_id is not NULL and status=\"BackedUp\" and removed is NULL order by id"); rs = pstmt.executeQuery(); while (rs.next()) { long id = rs.getLong(1);