[Openstack] Neutron MySQL issues.

Ken D'Ambrosio ken at jots.org
Tue Sep 12 16:01:01 UTC 2017


Hey, all.  About a day ago, Neutron/MySQL started throwing errors on my 
Ubuntu/Newton cloud:

2017-09-12 15:39:35.591 95710 ERROR neutron.callbacks.manager 
DBReferenceError: (pymysql.err.IntegrityError) (1452, u'Cannot add or 
update a child row: a foreign key constraint fails 
(`neutron`.`segmenthostmappings`, CONSTRAINT 
`segmenthostmappings_ibfk_1` FOREIGN KEY (`segment_id`) REFERENCES 
`networksegments` (`id`) ON DELETE CASCADE)') [SQL: u'INSERT INTO 
segmenthostmappings (segment_id, host) VALUES (%(segment_id)s, 
%(host)s)'] [parameters: {'host': u'BL-D8-c6220-04-L', 'segment_id': 
u'a0e4e56a-47e2-4f1a-a9ff-b53f60a8b2f6'}]

2017-09-12 15:39:32.753 95684 ERROR neutron.callbacks.manager 
DBReferenceError: (pymysql.err.IntegrityError) (1452, u'Cannot add or 
update a child row: a foreign key constraint fails 
(`neutron`.`segmenthostmappings`, CONSTRAINT 
`segmenthostmappings_ibfk_1` FOREIGN KEY (`segment_id`) REFERENCES 
`networksegments` (`id`) ON DELETE CASCADE)') [SQL: u'INSERT INTO 
segmenthostmappings (segment_id, host) VALUES (%(segment_id)s, 
%(host)s)'] [parameters: ({'host': u'BL-D8-c6220-15-R', 'segment_id': 
u'8cf4ed19-1e9a-4125-8d65-f8fe0fa22032'}, {'host': u'BL-D8-c6220-15-R', 
'segment_id': u'3512bb5d-20a4-4873-a17a-17cd3c27efe5'}, {'host': 
u'BL-D8-c6220-15-R', 'segment_id': 
u'154cff0d-36a2-4083-9402-8bb977044b01'})]

etc.

I can't cause them (yet) by any individual action that I've thus-far 
found, but Heat orchestrations, for example, fail a lot of the time.  I 
do have hourly backups of my database -- should I cut my losses and 
revert?  Or can anyone think of some magick(tm) that could be applied?  
The database is HA, and the nodes are synced, so I don't *think* that 
this is a synchronization issue.  Sadly, while I'm adept as a sysadmin 
in MySQL, I'm not up to the point where I can t-shoot foreign key 
weirdness.

Thanks,

-Ken



More information about the Openstack mailing list