View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
1463 | RackTables | default | public | 2015-04-20 19:18 | 2015-08-22 19:26 |
Reporter | perlstalker | Assigned To | adoom42 | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Apache | OS | Ubuntu | OS Version | 14.0 |
Product Version | 0.20.10 | ||||
Target Version | 0.20.11 | Fixed in Version | 0.20.11 | ||
Summary | 1463: Upgrade from 0.19.11 to 0.20.10 fails "Executing batch '0.20.8'" | ||||
Description | I'm upgrading our install of racktables from 0.19.11 to 0.20.10. The upgrade seems to work except when it hits the step "Executing batch '0.20.8'". All of the other steps complete and report "done". The error I'm getting posted below. ALTER TABLE PortInterfaceCompat ADD CONSTRAINT `PortInterfaceCompat-FK-oif_id` FOREIGN KEY (oif_id) REFERENCES PortOuterInterface (id) -- Cannot add or update a child row: a foreign key constraint fails (`racktables_db`.`#sql-6d6_300`, CONSTRAINT `PortInterfaceCompat-FK-oif_id` FOREIGN KEY (`oif_id`) REFERENCES `PortOuterInterface` (`id`)) ALTER TABLE PortCompat ADD CONSTRAINT `PortCompat-FK-oif_id1` FOREIGN KEY (type1) REFERENCES PortOuterInterface (id) -- Cannot add or update a child row: a foreign key constraint fails (`racktables_db`.`#sql-6d6_300`, CONSTRAINT `PortCompat-FK-oif_id1` FOREIGN KEY (`type1`) REFERENCES `PortOuterInterface` (`id`)) ALTER TABLE PortCompat ADD CONSTRAINT `PortCompat-FK-oif_id2` FOREIGN KEY (type2) REFERENCES PortOuterInterface (id) -- Cannot add or update a child row: a foreign key constraint fails (`racktables_db`.`#sql-6d6_300`, CONSTRAINT `PortCompat-FK-oif_id2` FOREIGN KEY (`type2`) REFERENCES `PortOuterInterface` (`id`)) INSERT INTO PatchCableOIFCompat (pctype_id, oif_id) VALUES (13,18),(14,18),(15,18),(16,18),(17,18),(999,18), -- 10Base-T: Cat.3+ TP (11,1198),(12,1198),(11,1199),(12,1199), -- 100Base-BX10: 1xSMF (5,1197),(6,1197), -- 100Base-LX10: 2xSMF (5,1200),(6,1200), -- 100Base-EX: 2xSMF (5,1201),(6,1201), -- 100Base-ZX: 2xSMF (1,1195),(2,1195),(3,1195),(4,1195), -- 100Base-FX: 2xMMF (1,1196),(2,1196),(3,1196),(4,1196), -- 100Base-SX: 2xMMF (13,19),(14,19),(15,19),(16,19),(17,19), -- 100Base-TX: Cat.5+ TP (11,1206),(12,1206),(11,1207),(12,1207), -- 1000Base-BX10: 1xSMF (5,1204),(6,1204), -- 1000Base-LX: 2xSMF (5,1205),(6,1205), -- 1000Base-LX10: 2xSMF (1,1202),(2,1202),(3,1202),(4,1202), -- 1000Base-SX: 2xMMF (1,1203),(2,1203),(3,1203),(4,1203), -- 1000Base-SX+: 2xMMF (13,24),(14,24),(15,24),(16,24),(17,24), -- 1000Base-T: Cat.5+ TP (5,34),(6,34), -- 1000Base-ZX: 2xSMF (23,1077), -- 1000Base direct attach: shielded (1,30),(2,30),(3,30),(4,30), -- 10GBase-SR: 2xMMF (5,36),(6,36), -- 10GBase-LR: 2xSMF (5,35),(6,35), -- 10GBase-ER: 2xSMF (5,38),(6,38), -- 10GBase-ZR: 2xSMF (1,39),(2,39),(3,39),(4,39),(5,39),(6,39), -- 10GBase-LX4: 2xMMF/2xSMF (1,37),(2,37),(3,37),(4,37), -- 10GBase-LRM: 2xMMF (14,1642),(15,1642),(16,1642),(17,1642), -- 10GBase-T: Cat.6+ TP (20,40), -- 10GBase-CX4: coax (24,1084),(25,1084),(26,1084),(27,1084), -- 10GBase direct attach: twinax (18,1663),(19,1663), -- 40GBase-SR4: 8xMMF (5,1664),(6,1664), -- 40GBase-LR4: 2xSMF (5,1662),(6,1662), -- 40GBase-ER4: 2xSMF (5,1660),(6,1660), -- 40GBase-FR: 2xSMF (21,1669),(22,1669), -- 100GBase-SR10: 20xMMF (18,1672),(19,1672), -- 100GBase-SR4: 8xMMF (5,1670),(6,1670), -- 100GBase-LR4: 2xSMF (5,1671),(6,1671) -- 100GBase-ER4: 2xSMF -- Cannot add or update a child row: a foreign key constraint fails (`racktables_db`.`PatchCableOIFCompat`, CONSTRAINT `PatchCableOIFCompat-FK-oif_id` FOREIGN KEY (`oif_id`) REFERENCES `PortOuterInterface` (`id`)) | ||||
Steps To Reproduce | 1) Start with a 0.19.11 database. 2) Run the upgrade from the 0.20.10 upgrade. | ||||
Tags | No tags attached. | ||||
related to | 1321 | closed | infrastation | ALTER TABLE PortInterfaceCompat ADD CONSTRAINT query failed during upgrade |
related to | 1501 | closed | adoom42 | The following queries failed while executing batch '0.20.8' |
The foreign keys cannot be added because existing data would cause violations. This issue would be easier to resolve if the data set could be examined. Please consider sending a mysqldump to devteam <at> racktables.org. | |
Closing due to lack of response. | |
perlstalker provided data and I reproduced the problem. Thanks for the report. The fix will be in version 0.20.11. For an immediate solution, upgrade to 0.20.0, then upgrade to 0.20.10. | |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-04-20 19:18 | perlstalker | New Issue | |
2015-08-09 22:12 | adoom42 | Relationship added | related to 1321 |
2015-08-09 22:17 | adoom42 | Note Added: 0002913 | |
2015-08-09 22:17 | adoom42 | Status | new => feedback |
2015-08-17 17:31 | adoom42 | Note Added: 0002927 | |
2015-08-17 17:31 | adoom42 | Status | feedback => closed |
2015-08-17 17:31 | adoom42 | Resolution | open => unable to reproduce |
2015-08-19 17:05 | adoom42 | Relationship added | related to 1501 |
2015-08-22 19:26 | adoom42 | Note Added: 0002935 | |
2015-08-22 19:26 | adoom42 | Assigned To | => adoom42 |
2015-08-22 19:26 | adoom42 | Resolution | unable to reproduce => fixed |
2015-08-22 19:26 | adoom42 | Product Version | => 0.20.10 |
2015-08-22 19:26 | adoom42 | Fixed in Version | => 0.20.11 |
2015-08-22 19:26 | adoom42 | Target Version | => 0.20.11 |