Comment 6 for bug 1633734

Revision history for this message
Andrew Laski (alaski) wrote :

In looking at this with Melanie it appears that there is a code path in Mitaka that would allow this to happen. And it then becomes an issue in Newton because there is code that uses the build_requests table for instance list/show requests.

I'm not sure it's worth trying to address the cause of this at this point since we'll want some proactive protection against these bad entries in Newton for deployments that already have these faulty entries. But something like https://review.openstack.org/#/c/357396/8 is what would address it, the cleanup in the 'except Exception' block.

A good fix would be to have an online migration that looks for and cleans these up during upgrade, or to have Nova log these when found and then ignore them in the API response. They correspond to failed instance boots so it's okay to clean up. And there will most likely be an instance record that corresponds to the build request, and if not it's because the instance record could not be created in the db, so it's safe to clean up either way.