Return-Path: X-Original-To: apmail-cloudstack-dev-archive@www.apache.org Delivered-To: apmail-cloudstack-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B06D410D6A for ; Thu, 1 Aug 2013 13:17:17 +0000 (UTC) Received: (qmail 31570 invoked by uid 500); 1 Aug 2013 13:17:16 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 31255 invoked by uid 500); 1 Aug 2013 13:17:16 -0000 Mailing-List: contact dev-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list dev@cloudstack.apache.org Received: (qmail 31225 invoked by uid 99); 1 Aug 2013 13:17:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Aug 2013 13:17:14 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of harikrishna.patnala@citrix.com designates 203.166.19.134 as permitted sender) Received: from [203.166.19.134] (HELO SMTP.CITRIX.COM.AU) (203.166.19.134) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Aug 2013 13:17:08 +0000 X-IronPort-AV: E=Sophos;i="4.89,794,1367971200"; d="scan'208";a="4074981" Received: from sinpex01cl01.citrite.net ([10.151.46.32]) by SYDPIPO01.CITRIX.COM.AU with ESMTP/TLS/AES128-SHA; 01 Aug 2013 13:16:45 +0000 Received: from SINPEX01CL03.citrite.net ([169.254.3.145]) by SINPEX01CL01.citrite.net ([169.254.1.212]) with mapi id 14.02.0342.004; Thu, 1 Aug 2013 21:16:41 +0800 From: Harikrishna Patnala To: "" Subject: Re: upgrade path 4.1.1 -> 4.2/master Thread-Topic: upgrade path 4.1.1 -> 4.2/master Thread-Index: AQHOjq7gwEJG+2QJkE61rw1+kR2kTpl/zz6A Date: Thu, 1 Aug 2013 13:16:40 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.151.46.1] Content-Type: text/plain; charset="iso-8859-1" Content-ID: <7A4DB337371FE34EA449FFCAFE3D1798@citrix.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Hi Daan, Before upgrading to 4.2 we need to register the new system templates for ea= ch hypervisor with specific names so that during upgrade these new template= s are set to the system vms. It is mandatory to upgrade the system vm template if we want upgrade to 4.2= . Here seems like you have a Xen cluster. So you need to register xen system = template with name systemvm-xenserver-4.2. So for the existing clusters you need to register system vm template per hy= pervisor. System template names are for each hypervisor are 1) systemvm-xenserver-4.2=20 2) systemvm-kvm-4.2=20 3) systemvm-vmware-4.2=20 4) systemvm-hyperv-4.2=20 5) systemvm-lxc-4.2=20 Thank you Harikrishna =20 On 01-Aug-2013, at 5:29 PM, Daan Hoogland wrote: > H, >=20 > 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. >=20 > 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 >=20 > 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(Upgrade4= 10to420.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 da= tabase > at com.cloud.upgrade.DatabaseUpgradeChecker.upgrade(DatabaseUpgradeChecke= r.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(Upgrade4= 10to420.java:259) > ... > ... 5 more > 2013-07-31 21:50:50.802:INFO::Shutdown hook executing >=20 > I found that vm_template should contain a line for this; >=20 > //Get 4.2.0 system Vm template Id for > corresponding hypervisor > pstmt =3D conn.prepareStatement("select id from > `cloud`.`vm_template` where name =3D ? and removed is null order by id > desc limit 1"); > pstmt.setString(1, hypervisorAndTemplateName.getValue(= )); > rs =3D pstmt.executeQuery(); >=20 > Should I add a row by hand? > Is there a readme/howto-upgrade, I should read (or create using my findin= gs)? > Why is this not automatic this time? >=20 > sorry if I missed the mail thread explaining all of this, > Daan Hoogland