Skip to content

Commit 28f04c8

Browse files
Harikrishna PatnalaKishan Kavala
authored andcommitted
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.
1 parent 7894f55 commit 28f04c8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ private void updateSystemVmTemplates(Connection conn) {
306306
s_logger.debug("Updating " + hypervisorAndTemplateName.getKey() + " System Vms");
307307
try {
308308
//Get 4.2.0 system Vm template Id for corresponding hypervisor
309-
pstmt = conn.prepareStatement("select id from `cloud`.`vm_template` where name like ? and removed is null order by id desc limit 1");
309+
pstmt = conn.prepareStatement("select id from `cloud`.`vm_template` where name = ? and removed is null order by id desc limit 1");
310310
pstmt.setString(1, hypervisorAndTemplateName.getValue());
311311
rs = pstmt.executeQuery();
312312
if(rs.next()){

0 commit comments

Comments
 (0)