Ask Your Question

Get CONSTRAINT DBReferenceError when trying to boot bare metal instance

asked 2017-10-25 23:32:44 -0500

diegoinsh gravatar image

I am trying to boot an instance on baremetal node like this: nova boot --flavor ${baremetal_flavor} --image baremetal-ubuntu-1604 ${baremetal_instance_name} --nic net-id=8a3ebd2f-592c-45f8-be40-36f309027441

The horizon ui shows that the instance was Scheduling all the time. While look into the nova-conductor.log, get ERROR log like:

nova-conductor.log:2017-10-26 09:47:05.286 70637 ERROR oslo_messaging.rpc.server DBReferenceError: (pymysql.err.IntegrityError) (1452, u'Cannot add or update a child row: a foreign key constraint fails (`nova`.`instance_actions`, CONSTRAINT `fk_instance_actions_instance_uuid` FOREIGN KEY (`instance_uuid`) REFERENCES `instances` (`uuid`))') [SQL: u'INSERT INTO instance_actions (created_at, updated_at, deleted_at, deleted, action, instance_uuid, request_id, user_id, project_id, start_time, finish_time, message) VALUES (%(created_at)s, %(updated_at)s, %(deleted_at)s, %(deleted)s, %(action)s, %(instance_uuid)s, %(request_id)s, %(user_id)s, %(project_id)s, %(start_time)s, %(finish_time)s, %(message)s)'] [parameters: {'instance_uuid': 'd2ef529c-8e90-435e-9c68-60fe8f90014b', 'deleted_at': None, 'user_id': u'48b992c8304e41f7a609d080e17b01ae', 'deleted': 0, 'start_time': datetime.datetime(2017, 10, 26, 1, 47, 3, 212217), 'updated_at': None, 'finish_time': None, 'request_id': u'req-7703c493-bbf8-4e26-940e-b3b7add6cc8b', 'action': 'create', 'message': None, 'project_id': u'22fe444535bd4bd4b45f55da52b19257', 'created_at': datetime.datetime(2017, 10, 26, 1, 47, 5, 277036)}]

And the weird thing is when I checkup in the database, I cannot find any instance in Nova.instaces table whose uuid is d2ef529c-8e90-435e-9c68-60fe8f90014b as mentioned in the log. I wondering if the instance was rollback or something, but what is the instance showed on horizon ui? This is the second question.


edit retag flag offensive close merge delete


nova-api log:

2017-10-26 15:04:54.735 109397 INFO nova.api.openstack.wsgi [req-8de885a9-aa92-4f80-91d3-b03d9f9db85f - - - - -] HTTP exception thrown: Instance 0e608ff0-a9a5-495b-a7eb-9645fc4c8ae5 could not be found.
diegoinsh gravatar imagediegoinsh ( 2017-10-26 03:50:03 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2017-10-29 08:09:39 -0500

diegoinsh gravatar image

ended up with rolling back to last backup, hope this will not happen again

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2017-10-25 23:32:44 -0500

Seen: 135 times

Last updated: Oct 29 '17