Hi Prachi,

Thanks for the quick response. Looks like we're going to go for option b. We're 
currently still running the Apache version of CS so upgrade to CP 303 is not an 
option atm. I'll reply again later today when I've tested option b.

Kind regards, 
Joris van Lieshout


-----Original Message-----
From: Prachi Damle [mailto:[email protected]] 
Sent: maandag 18 juni 2012 20:34
To: [email protected]
Subject: RE: Upgrade from 2214 to 302 failed on DB script 
schema-2214to30-cleanup.sql

One correction to option a) This fix is available in CloudPlatform 303 release, 
not CloudStack. The next release of CS should have the fix.

-----Original Message-----
From: Prachi Damle [mailto:[email protected]] 
Sent: Monday, June 18, 2012 11:25 AM
To: [email protected]
Subject: RE: Upgrade from 2214 to 302 failed on DB script 
schema-2214to30-cleanup.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 of 
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 
running this:

SELECT physical_network_id FROM `cloud`.`physical_network_traffic_types` where 
traffic_type = 'Public';

- Update the vlan entries having physical_network_id = 0 to this 
physical_network_id

- You might see a similar error on other tables like user_ip_address. You might 
need to apply the same workaround to that table.

Let me know if this works for you.

Thanks,
Prachi
 

-----Original Message-----
From: Joris van Lieshout [mailto:[email protected]] 
Sent: Monday, June 18, 2012 6:19 AM
To: '[email protected]'
Subject: Upgrade from 2214 to 302 failed on DB script 
schema-2214to30-cleanup.sql

Hi Guys,
 
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 upgrade to 
3.0.2. After starting the cloud-management service and tailing 
management-server.log I see the DB schema upgrade script 
schema-2214to30-cleanup.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 physical_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. 

Anyone any idea what I can do to fix this or where the root cause is? Thanks in 
advanced!
 
2012-06-05 17:20:59,555 DEBUG [utils.db.ScriptRunner] (main:null) ALTER TABLE 
`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 
executing: ALTER TABLE `cloud`.`vlan` ADD CONSTRAINT 
`fk_vlan__physical_network_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 add or update a child row: a foreign key constraint fails 
(`cloud`.<result 2 when exp  laining filename '#sql-125c_14'>, CONSTRAINT 
`fk_vlan__physical_network_id` FOREIGN KEY (`physical_network_id`) REFERENCES 
`physical_network` (`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-2214to30-cleanup.sql
 com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: 
Cannot add or update a child row: a foreign key constraint fails 
(`cloud`.<result 2 when explaining filename '#sql-125c_14'>, CONSTRAINT 
`fk_vlan__physical_ne  twork_id` FOREIGN KEY (`physical_network_id`) REFERENCES 
`physical_network` (`id`))  at 
com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:181)
 at com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:79)
 at 
com.cloud.upgrade.DatabaseUpgradeChecker.runScript(DatabaseUpgradeChecker.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

Reply via email to