mirror of https://github.com/apache/cloudstack.git
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.
This commit is contained in:
parent
7894f5541b
commit
28f04c8ecc
|
|
@ -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()){
|
||||
|
|
|
|||
Loading…
Reference in New Issue