Return-Path: X-Original-To: apmail-incubator-cloudstack-users-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 588599044 for ; Mon, 18 Jun 2012 18:35:14 +0000 (UTC) Received: (qmail 23531 invoked by uid 500); 18 Jun 2012 18:35:14 -0000 Delivered-To: apmail-incubator-cloudstack-users-archive@incubator.apache.org Received: (qmail 23508 invoked by uid 500); 18 Jun 2012 18:35:14 -0000 Mailing-List: contact cloudstack-users-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-users@incubator.apache.org Delivered-To: mailing list cloudstack-users@incubator.apache.org Received: (qmail 23500 invoked by uid 99); 18 Jun 2012 18:35:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Jun 2012 18:35:14 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of Prachi.Damle@citrix.com designates 66.165.176.63 as permitted sender) Received: from [66.165.176.63] (HELO SMTP02.CITRIX.COM) (66.165.176.63) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Jun 2012 18:35:07 +0000 X-IronPort-AV: E=Sophos;i="4.75,793,1330923600"; d="scan'208";a="199169079" Received: from sjcpmailmx01.citrite.net ([10.216.14.74]) by FTLPIPO02.CITRIX.COM with ESMTP/TLS/RC4-MD5; 18 Jun 2012 14:34:17 -0400 Received: from SJCPMAILBOX01.citrite.net ([10.216.4.73]) by SJCPMAILMX01.citrite.net ([10.216.14.74]) with mapi; Mon, 18 Jun 2012 11:34:17 -0700 From: Prachi Damle To: "cloudstack-users@incubator.apache.org" Date: Mon, 18 Jun 2012 11:34:15 -0700 Subject: RE: Upgrade from 2214 to 302 failed on DB script schema-2214to30-cleanup.sql Thread-Topic: Upgrade from 2214 to 302 failed on DB script schema-2214to30-cleanup.sql Thread-Index: Ac1NVL21FHr/8MViSfaZFJbm95HVuwAKY8cQAACdQMA= Message-ID: <7A92FF96DF135843B4B608FB576BFC3E012D9BB944E4@SJCPMAILBOX01.citrite.net> References: <4D9DCADF1A008447AE2243EFA123154722345965@SBPOMB401.sbp.lan> <7A92FF96DF135843B4B608FB576BFC3E012D9BB944E0@SJCPMAILBOX01.citrite.net> In-Reply-To: <7A92FF96DF135843B4B608FB576BFC3E012D9BB944E0@SJCPMAILBOX01.citrite.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 One correction to option a) This fix is available in CloudPlatform 303 rele= ase, not CloudStack. The next release of CS should have the fix. -----Original Message----- From: Prachi Damle [mailto:Prachi.Damle@citrix.com]=20 Sent: Monday, June 18, 2012 11:25 AM To: cloudstack-users@incubator.apache.org Subject: RE: Upgrade from 2214 to 302 failed on DB script schema-2214to30-c= leanup.sql Hi Joris, This is a known issues reported as bug 13944. Looks like you have hit this = issue where there are multiple physical networks. There are two options to solve this: a) This issue has been fixed in 303 version of CS, is there a possibility o= f upgrading to 303 instead of 302? b) One workaround you could try is: - Find the id of the physical_network having the public traffic_type by ru= nning this: SELECT physical_network_id FROM `cloud`.`physical_network_traffic_types` wh= ere traffic_type =3D 'Public'; - Update the vlan entries having physical_network_id =3D 0 to this physical= _network_id - You might see a similar error on other tables like user_ip_address. You m= ight need to apply the same workaround to that table. Let me know if this works for you. Thanks, Prachi =20 -----Original Message----- From: Joris van Lieshout [mailto:JvanLieshout@schubergphilis.com]=20 Sent: Monday, June 18, 2012 6:19 AM To: 'cloudstack-users@incubator.apache.org' Subject: Upgrade from 2214 to 302 failed on DB script schema-2214to30-clean= up.sql Hi Guys, =20 I already posted this on the CS forum where I get the recommendation to ask= it here. We have an existing 2.2.14 installation that we are trying to upg= rade to 3.0.2. After starting the cloud-management service and tailing mana= gement-server.log I see the DB schema upgrade script schema-2214to30-cleanu= p.sql fail when creating a constraint on the vlan table (exact error below)= . When i inspect the vlan and physical_network tables i can see that the ph= ysical_network_id colomn for cloud.vlan has been set to 0 for all lines and= that the table cloud.physical_network does not contain any lines with id 0= .=20 Anyone any idea what I can do to fix this or where the root cause is? Thank= s in advanced! =20 2012-06-05 17:20:59,555 DEBUG [utils.db.ScriptRunner] (main:null) ALTER TAB= LE `cloud`.`vlan` ADD CONSTRAINT `fk_vlan__physical_network_id` FOREIGN KEY= (`physical_network_id`) REFERENCES `physical_network`(`id`) 2012-06-05 17:20:59,581 ERROR [utils.db.ScriptRunner] (main:null) Error exe= cuting: ALTER TABLE `cloud`.`vlan` ADD CONSTRAINT `fk_vlan__physical_networ= k_id` FOREIGN KEY (`physical_network_id`) REFERENCES `physical_network`(`id= `) 2012-06-05 17:20:59,582 ERROR [utils.db.ScriptRunner] (main:null) com.mysql= .jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot a= dd or update a child row: a foreign key constraint fails (`cloud`., CONSTRAINT `fk_vlan__physical_= network_id` FOREIGN KEY (`physical_network_id`) REFERENCES `physical_networ= k` (`id`)) 2012-06-05 17:20:59,583 ERROR [cloud.upgrade.DatabaseUpgradeChecker] (main= :null) Unable to execute upgrade script: /usr/share/cloud/setup/db/schema-2= 214to30-cleanup.sql com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException= : Cannot add or update a child row: a foreign key constraint fails (`cloud`= ., CONSTRAINT `fk_vlan__p= hysical_ne twork_id` FOREIGN KEY (`physical_network_id`) REFERENCES `physi= cal_network` (`id`)) at com.cloud.utils.db.ScriptRunner.runScript(ScriptRu= nner.java:181) at com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:79) at com.cloud.upgrade.DatabaseUpgradeChecker.runScript(DatabaseUpgradeCheck= er.java:154) at com.cloud.upgrade.DatabaseUpgradeChecker.upgrade(DatabaseUpgradeChecker= .java:287) at com.cloud.upgrade.DatabaseUpgradeChecker.check(Databa..... TRUNCATED Kind regards, Joris van Lieshout Schuberg Philis schubergphilis.com