H, I am testing an upgrade of my code for sdn based vpc private gateways (not in the mainstream code). It runs on a custom 4.1.1 based on the 4.1 branch. I have tested it against a 4.0 database and it upgrades fine.
Now I try to have a master version to which I applied my code to run against the same environment. I added _upgradeMap.put("4.1.1", new DbUpgrade[] {new Upgrade410to420()}); to the class com.cloud.upgrade.DatabaseUpgradeChecker. I have the systemvm.iso ready on the hypervisors, but not on my (windows) development machine. When I start my version in eclipse I get INFO [c.c.u.DatabaseUpgradeChecker] (Timer-2:null) Database upgrade must be performed from 4.1.1 to 4.2.0-SNAPSHOT WARN [c.c.u.d.Upgrade410to420] (Timer-2:null) 4.2.0 Hyperv SystemVm template not found. Hyperv hypervisor is not used, so not failing upgrade WARN [c.c.u.d.Upgrade410to420] (Timer-2:null) 4.2.0 KVM SystemVm template not found. KVM hypervisor is not used, so not failing upgrade ERROR [c.c.u.DatabaseUpgradeChecker] (Timer-2:null) Unable to upgrade the database com.cloud.utils.exception.CloudRuntimeException: 4.2.0 XenServer SystemVm template not found. Cannot upgrade system Vms at com.cloud.upgrade.dao.Upgrade410to420.updateSystemVmTemplates(Upgrade410to420.java:259) ... ERROR [c.c.u.c.ComponentContext] (Timer-2:null) System integrity check failed. Refuse to startup com.cloud.utils.exception.CloudRuntimeException: Unable to upgrade the database at com.cloud.upgrade.DatabaseUpgradeChecker.upgrade(DatabaseUpgradeChecker.java:296) ... Caused by: com.cloud.utils.exception.CloudRuntimeException: 4.2.0 XenServer SystemVm template not found. Cannot upgrade system Vms at com.cloud.upgrade.dao.Upgrade410to420.updateSystemVmTemplates(Upgrade410to420.java:259) ... ... 5 more 2013-07-31 21:50:50.802:INFO::Shutdown hook executing I found that vm_template should contain a line for this; //Get 4.2.0 system Vm template Id for corresponding hypervisor 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(); Should I add a row by hand? Is there a readme/howto-upgrade, I should read (or create using my findings)? Why is this not automatic this time? sorry if I missed the mail thread explaining all of this, Daan Hoogland