cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject git commit: updated refs/heads/master to 2e0f11f
Date Fri, 02 Aug 2013 00:17:43 GMT
Updated Branches:
  refs/heads/master 986328773 -> 2e0f11f15


CLOUDSTACK-4002: [Upgrade][2.2.16 to 4.2] After upgrade creation of
volume from a snapshot which was existing before upgrade, fails with NPE


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

Branch: refs/heads/master
Commit: 2e0f11f15f27512c91a6f31edc57912858be4dc3
Parents: 9863287
Author: Min Chen <min.chen@citrix.com>
Authored: Thu Aug 1 17:04:40 2013 -0700
Committer: Min Chen <min.chen@citrix.com>
Committed: Thu Aug 1 17:08:49 2013 -0700

----------------------------------------------------------------------
 engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java   | 6 +++---
 .../cloudstack/storage/datastore/db/SnapshotDataStoreVO.java   | 2 +-
 .../cloudstack/storage/datastore/db/TemplateDataStoreVO.java   | 2 +-
 .../cloudstack/storage/datastore/db/VolumeDataStoreVO.java     | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2e0f11f1/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 b3fbdaf..20a8777 100644
--- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java
+++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java
@@ -1816,7 +1816,7 @@ public class Upgrade410to420 implements DbUpgrade {
         try {
 
             volStoreInsert = conn
-                    .prepareStatement("INSERT INTO `cloud`.`volume_store_ref` (store_id,
 volume_id, zone_id, created, last_updated, job_id, download_pct, size, physical_size, download_state,
checksum, error_str, local_path, install_path, url, destroyed, state) select host_id, volume_id,
zone_id, created, last_updated, job_id, download_pct, size, physical_size, download_state,
checksum, error_str, local_path, install_path, url, destroyed, 'Allocated' from `cloud`.`volume_host_ref`");
+                    .prepareStatement("INSERT INTO `cloud`.`volume_store_ref` (store_id,
 volume_id, zone_id, created, last_updated, job_id, download_pct, size, physical_size, download_state,
checksum, error_str, local_path, install_path, url, destroyed, update_count, ref_cnt, state)
select host_id, volume_id, zone_id, created, last_updated, job_id, download_pct, size, physical_size,
download_state, checksum, error_str, local_path, install_path, url, destroyed, 0, 0, 'Allocated'
from `cloud`.`volume_host_ref`");
             volStoreInsert.executeUpdate();
 
             volStoreUpdate = conn.prepareStatement("update `cloud`.`volume_store_ref` set
state = 'Ready' where download_state = 'DOWNLOADED'");
@@ -1847,7 +1847,7 @@ public class Upgrade410to420 implements DbUpgrade {
         try {
 
             tmplStoreInsert = conn
-                    .prepareStatement("INSERT INTO `cloud`.`template_store_ref` (store_id,
 template_id, created, last_updated, job_id, download_pct, size, physical_size, download_state,
error_str, local_path, install_path, url, destroyed, is_copy, store_role, state) select host_id,
template_id, created, last_updated, job_id, download_pct, size, physical_size, download_state,
error_str, local_path, install_path, url, destroyed, is_copy, 'Image', 'Allocated' from `cloud`.`template_host_ref`");
+                    .prepareStatement("INSERT INTO `cloud`.`template_store_ref` (store_id,
 template_id, created, last_updated, job_id, download_pct, size, physical_size, download_state,
error_str, local_path, install_path, url, destroyed, is_copy, update_count, ref_cnt, store_role,
state) select host_id, template_id, created, last_updated, job_id, download_pct, size, physical_size,
download_state, error_str, local_path, install_path, url, destroyed, is_copy, 0, 0, 'Image',
'Allocated' from `cloud`.`template_host_ref`");
             tmplStoreInsert.executeUpdate();
 
             tmplStoreUpdate = conn.prepareStatement("update `cloud`.`template_store_ref`
set state = 'Ready' where download_state = 'DOWNLOADED'");
@@ -1876,7 +1876,7 @@ public class Upgrade410to420 implements DbUpgrade {
 
         try {
             snapshotStoreInsert = conn
-                    .prepareStatement("INSERT INTO `cloud`.`snapshot_store_ref` (store_id,
 snapshot_id, created, size, parent_snapshot_id, install_path, state) select sechost_id, id,
created, size, prev_snap_id, path, 'Ready' from `cloud`.`snapshots` where status = 'BackedUp'
and sechost_id is not null and removed is null");
+                    .prepareStatement("INSERT INTO `cloud`.`snapshot_store_ref` (store_id,
 snapshot_id, created, size, parent_snapshot_id, install_path, volume_id, update_count, ref_cnt,
store_role, state) select sechost_id, id, created, size, prev_snap_id, path, volume_id, 0,
0, 'Image', 'Ready' from `cloud`.`snapshots` where status = 'BackedUp' and sechost_id is not
null and removed is null");
             snapshotStoreInsert.executeUpdate();
         }
         catch (SQLException e) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2e0f11f1/engine/schema/src/org/apache/cloudstack/storage/datastore/db/SnapshotDataStoreVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/org/apache/cloudstack/storage/datastore/db/SnapshotDataStoreVO.java
b/engine/schema/src/org/apache/cloudstack/storage/datastore/db/SnapshotDataStoreVO.java
index 300df1e..0fe5e08 100644
--- a/engine/schema/src/org/apache/cloudstack/storage/datastore/db/SnapshotDataStoreVO.java
+++ b/engine/schema/src/org/apache/cloudstack/storage/datastore/db/SnapshotDataStoreVO.java
@@ -193,7 +193,7 @@ public class SnapshotDataStoreVO implements StateObject<ObjectInDataStoreStateMa
     }
 
     public String toString() {
-        return new StringBuilder("VolumeHost[").append(id).append("-").append(snapshotId).append("-")
+        return new StringBuilder("SnapshotDataStore[").append(id).append("-").append(snapshotId).append("-")
                 .append(dataStoreId).append(installPath).append("]").toString();
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2e0f11f1/engine/schema/src/org/apache/cloudstack/storage/datastore/db/TemplateDataStoreVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/org/apache/cloudstack/storage/datastore/db/TemplateDataStoreVO.java
b/engine/schema/src/org/apache/cloudstack/storage/datastore/db/TemplateDataStoreVO.java
index b6af559..a890e4b 100755
--- a/engine/schema/src/org/apache/cloudstack/storage/datastore/db/TemplateDataStoreVO.java
+++ b/engine/schema/src/org/apache/cloudstack/storage/datastore/db/TemplateDataStoreVO.java
@@ -309,7 +309,7 @@ public class TemplateDataStoreVO implements StateObject<ObjectInDataStoreStateMa
 
     @Override
     public String toString() {
-        return new StringBuilder("TmplHost[").append(id).append("-").append(templateId).append("-").append(dataStoreId)
+        return new StringBuilder("TmplDataStore[").append(id).append("-").append(templateId).append("-").append(dataStoreId)
                 .append(installPath).append("]").toString();
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2e0f11f1/engine/schema/src/org/apache/cloudstack/storage/datastore/db/VolumeDataStoreVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/org/apache/cloudstack/storage/datastore/db/VolumeDataStoreVO.java
b/engine/schema/src/org/apache/cloudstack/storage/datastore/db/VolumeDataStoreVO.java
index 0d19d4e..e11071b 100755
--- a/engine/schema/src/org/apache/cloudstack/storage/datastore/db/VolumeDataStoreVO.java
+++ b/engine/schema/src/org/apache/cloudstack/storage/datastore/db/VolumeDataStoreVO.java
@@ -296,7 +296,7 @@ public class VolumeDataStoreVO implements StateObject<ObjectInDataStoreStateMach
     }
 
     public String toString() {
-        return new StringBuilder("VolumeHost[").append(id).append("-").append(volumeId).append("-").append(dataStoreId)
+        return new StringBuilder("VolumeDataStore[").append(id).append("-").append(volumeId).append("-").append(dataStoreId)
                 .append(installPath).append("]").toString();
     }
 


Mime
View raw message