Scary "Cannot add or update a child row: a foreign key constraint fails" ERROR

Bug #1385257 reported by Attila Fazekas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Eugene Nikanorov

Bug Description

I see similar message in non dvr setups as mentioned in #1371696.

http://logstash.openstack.org/#eyJzZWFyY2giOiJtZXNzYWdlOlwiQ2Fubm90IGFkZCBvciB1cGRhdGUgYSBjaGlsZCByb3dcXDogYSBmb3JlaWduIGtleSBjb25zdHJhaW50IGZhaWxzXCIiLCJmaWVsZHMiOltdLCJvZmZzZXQiOjAsInRpbWVmcmFtZSI6IjYwNDgwMCIsImdyYXBobW9kZSI6ImNvdW50IiwidGltZSI6eyJ1c2VyX2ludGVydmFsIjowfSwic3RhbXAiOjE0MTQxNTQ0NTgzNDcsIm1vZGUiOiIiLCJhbmFseXplX2ZpZWxkIjoiIn0=

2014-10-24 12:01:09.517 1409 TRACE neutron.agent.l3_agent RemoteError: Remote error: DBReferenceError (IntegrityError) (1452, 'Cannot add or update a child row: a foreign key constraint fails (`neutron`.`routerl3agentbindings`, CONSTRAINT `routerl3agentbindings_ibfk_2` FOREIGN KEY (`router_id`) REFERENCES `routers` (`id`) ON DELETE CASCADE)') 'INSERT INTO routerl3agentbindings (router_id, l3_agent_id) VALUES (%s, %s)' ('63e69dd6-2964-42a2-ad67-9e7048c044e8', '24b9520c-0543-4968-9b2c-f4e86c5d26e4')

The ERROR most likely harmless, but very annoying when searching for a real issue.
Only a shorter message with lower error level (DEBUG) should be logged on a concurrent delete event.

Tags: l3-ipam-dhcp
yalei wang (yalei-wang)
Changed in neutron:
assignee: nobody → yalei wang (yalei-wang)
Changed in neutron:
assignee: yalei wang (yalei-wang) → Eugene Nikanorov (enikanorov)
importance: Undecided → High
status: New → Confirmed
tags: added: l3-ipam-dhcp
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/135011

Changed in neutron:
status: Confirmed → In Progress
Changed in neutron:
importance: High → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/135011
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=e0e8a2e9e81c2f6293eaa8556c5ecdac910358cb
Submitter: Jenkins
Branch: master

commit e0e8a2e9e81c2f6293eaa8556c5ecdac910358cb
Author: Eugene Nikanorov <email address hidden>
Date: Mon Nov 17 20:49:09 2014 +0400

    Catch DBReferenceError exception during binding a router

    In some cases (Concurrent API tests) router can be deleted
    before it is bound to an agent by scheduler.
    That may lead to traces on L3 agent side returned via RPC.
    Need to handle this case in more graceful way.

    Change-Id: Ic52c26ace7f32a615150bd6098b244ae0b98250c
    Closes-Bug: #1385257

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → kilo-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: kilo-1 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.