cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wid...@apache.org
Subject [33/50] [abbrv] git commit: updated refs/heads/kvm-vnc-listen to 895c51d
Date Mon, 16 Sep 2013 09:11:31 GMT
CLOUDSTACK-4661:[DB Upgrade] SecondaryStorage entry in host table before
upgrade is not marked as removed after migrating them to image_store
table.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1042136c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1042136c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1042136c

Branch: refs/heads/kvm-vnc-listen
Commit: 1042136c23834f7eff87227fd2818b56f6e8197e
Parents: bc98bca
Author: Min Chen <min.chen@citrix.com>
Authored: Thu Sep 12 18:52:40 2013 -0700
Committer: Min Chen <min.chen@citrix.com>
Committed: Thu Sep 12 18:55:41 2013 -0700

----------------------------------------------------------------------
 engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1042136c/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java
index d27dfa7..02dd9c5 100755
--- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java
+++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java
@@ -2197,6 +2197,11 @@ public class Upgrade410to420 implements DbUpgrade {
                 storeInsert.setDate(9, nfs_created);
                 storeInsert.executeUpdate();
             }
+
+            s_logger.debug("Marking NFS secondary storage in host table as removed");
+            pstmt = conn.prepareStatement("UPDATE `cloud`.`host` SET removed = now() WHERE
type = 'SecondaryStorage' and removed is null");
+            pstmt.executeUpdate();
+            pstmt.close();
         }
         catch (SQLException e) {
             String msg = "Unable to migrate secondary storages." + e.getMessage();


Mime
View raw message