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
