Comment 16 for bug 1633734

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to nova (stable/newton)

Reviewed: https://review.openstack.org/408725
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=608105a7c508ed48055dca6e2d327c944ecb18ea
Submitter: Jenkins
Branch: stable/newton

commit 608105a7c508ed48055dca6e2d327c944ecb18ea
Author: Matt Riedemann <email address hidden>
Date: Thu Dec 8 12:09:59 2016 -0500

    Provide an online data migration to cleanup orphaned build requests

    This exhibits the failure reported in bug 1633734 when upgrading
    from mitaka to newton with some bad build request records that
    weren't cleaned up, and were created before API DB migration
    013_build_request_extended_attrs when we didn't have the
    instance_uuid or instance records in the database.

    After 013_build_request_extended_attrs and the object change to
    BuildRequest in a5d3b57c3d4fb785c5f5eebf2559e495595a6b34 if we try
    loading up a 'dirty' build request DB record without the
    instance_uuid it fails with a ValueError, as shown in the functional
    test in this change.

    This also provides an online data migration (which will be backported
    to Newton for upgrades from Mitaka) that will query the API DB for
    build requests where instance_uuid=NULL and delete them.

    Change-Id: I8a05ee01ec7f6a6f88b896f78414fb5487e0071e
    Related-Bug: #1633734
    (cherry picked from commit ab05b90295c64ff7e6925591dd87a467ef85c00f)