Updated Branches: refs/heads/4.2 7894f5541 -> 28f04c8ec
CLOUDSTACK-3969: Upgrade failed from 3.0.3 to 4.2 in KVM host with error 4.2.0 KVM SystemVm template not found though systemvm-kvm-4.2 template is uploaded during 3.0.3 setup This is due to mysql version conflict with '=' and 'LIKE'. Changing to '=' while searching for new system template. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/28f04c8e Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/28f04c8e Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/28f04c8e Branch: refs/heads/4.2 Commit: 28f04c8ecc26b67b07d21a2ed66edb66a4fef603 Parents: 7894f55 Author: Harikrishna Patnala <[email protected]> Authored: Wed Jul 31 12:40:40 2013 +0530 Committer: Kishan Kavala <[email protected]> Committed: Wed Jul 31 15:11:41 2013 +0530 ---------------------------------------------------------------------- engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/28f04c8e/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 5052573..8960c91 100644 --- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java +++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java @@ -306,7 +306,7 @@ public class Upgrade410to420 implements DbUpgrade { s_logger.debug("Updating " + hypervisorAndTemplateName.getKey() + " System Vms"); try { //Get 4.2.0 system Vm template Id for corresponding hypervisor - pstmt = conn.prepareStatement("select id from `cloud`.`vm_template` where name like ? and removed is null order by id desc limit 1"); + pstmt = conn.prepareStatement("select id from `cloud`.`vm_template` where name = ? and removed is null order by id desc limit 1"); pstmt.setString(1, hypervisorAndTemplateName.getValue()); rs = pstmt.executeQuery(); if(rs.next()){
