cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chipchild...@apache.org
Subject git commit: updated refs/heads/4.1 to 4dbeefc
Date Fri, 03 May 2013 15:03:40 GMT
Updated Branches:
  refs/heads/4.1 fcab1e3f1 -> 4dbeefcc0


CLOUDSTACK-2303: upgrade failed from 2.2.14 to 4.1.0 - part2

Signed-off-by: Chip Childers <chip.childers@gmail.com>


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

Branch: refs/heads/4.1
Commit: 4dbeefcc0d9d637d039f61f587f9581bdc88595b
Parents: fcab1e3
Author: Wei Zhou <w.zhou@leaseweb.com>
Authored: Fri May 3 16:01:44 2013 +0100
Committer: Chip Childers <chip.childers@gmail.com>
Committed: Fri May 3 16:01:44 2013 +0100

----------------------------------------------------------------------
 .../src/com/cloud/upgrade/dao/Upgrade2214to30.java |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4dbeefcc/server/src/com/cloud/upgrade/dao/Upgrade2214to30.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/upgrade/dao/Upgrade2214to30.java b/server/src/com/cloud/upgrade/dao/Upgrade2214to30.java
index 817231f..2d77429 100644
--- a/server/src/com/cloud/upgrade/dao/Upgrade2214to30.java
+++ b/server/src/com/cloud/upgrade/dao/Upgrade2214to30.java
@@ -630,7 +630,7 @@ public class Upgrade2214to30 extends Upgrade30xBase implements DbUpgrade
{
     		//XenServer
     		try {
                //Get 3.0.0 or later xenserer system Vm template Id
-               pstmt = conn.prepareStatement("select id from `cloud`.`vm_template` where
name like 'systemvm-xenserver-%' and removed is null");
+               pstmt = conn.prepareStatement("select max(id) from `cloud`.`vm_template` where
name like 'systemvm-xenserver-%' and removed is null");
     			rs = pstmt.executeQuery();
     			if(rs.next()){
     				long templateId = rs.getLong(1);
@@ -661,7 +661,7 @@ public class Upgrade2214to30 extends Upgrade30xBase implements DbUpgrade
{
     		s_logger.debug("Updating KVM System Vms");
     		try {
                //Get 3.0.0 or later KVM system Vm template Id
-               pstmt = conn.prepareStatement("select id from `cloud`.`vm_template` where
name like 'systemvm-kvm-%' and removed is null");
+               pstmt = conn.prepareStatement("select max(id) from `cloud`.`vm_template` where
name like 'systemvm-kvm-%' and removed is null");
     			rs = pstmt.executeQuery();
     			if(rs.next()){
     				long templateId = rs.getLong(1);
@@ -692,7 +692,7 @@ public class Upgrade2214to30 extends Upgrade30xBase implements DbUpgrade
{
     		s_logger.debug("Updating VMware System Vms");
     		try {
                //Get 3.0.0 or later VMware system Vm template Id
-               pstmt = conn.prepareStatement("select id from `cloud`.`vm_template` where
name like 'systemvm-vmware-%' and removed is null");
+               pstmt = conn.prepareStatement("select max(id) from `cloud`.`vm_template` where
name like 'systemvm-vmware-%' and removed is null");
     			rs = pstmt.executeQuery();
     			if(rs.next()){
     				long templateId = rs.getLong(1);


Mime
View raw message