A new instance_mapping record will have queued_for_delete set to NULL

Bug #1814913 reported by Surya Seetharaman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Dan Smith
Rocky
Fix Committed
Medium
Surya Seetharaman

Bug Description

After this change: https://review.openstack.org/#/c/584504, where we changed the default value of queued_for_delete column from False to NULL in the sqla code for the instance_mappings object (to do the data migration for queued_for_delete), we forgot to set the default value as False upon creation of the new instance_mappings in the create() method. Hence new instance_mappings always ended up with NULL values in the db meaning the data migration "populate_queued_for_delete" would never finish.

So in the InstanceMapping.create() function queued_for_delete should always be set to False() explicitly so that new mappings get False as the default value.

Tags: cells
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
assignee: Dan Smith (dansmith) → Dan Smith (danms)
status: New → In Progress
Matt Riedemann (mriedem)
Changed in nova:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/635185
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=ccec9ba82de7c9525981a34bb126e9ca98042d04
Submitter: Zuul
Branch: master

commit ccec9ba82de7c9525981a34bb126e9ca98042d04
Author: Dan Smith <email address hidden>
Date: Wed Feb 6 06:54:00 2019 -0800

    Fix InstanceMapping to always default queued_for_delete=False

    This object has a default=False setting for queued_for_delete, but never
    actually sets that value. All newly created records should have a non-NULL
    value for this field, and we have a migration to fix them, so this
    change explicitly forces that =False, unless the object is being created
    with a value set.

    Closes-Bug: #1814913
    Change-Id: I99c5cc24c7e9bf5e2e72ffc868990b87b0e8e3f8

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/635534

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/rocky)

Reviewed: https://review.openstack.org/635534
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=cb65d3d69c2b36a1a18d3fe4347b445f17f6d856
Submitter: Zuul
Branch: stable/rocky

commit cb65d3d69c2b36a1a18d3fe4347b445f17f6d856
Author: Dan Smith <email address hidden>
Date: Wed Feb 6 06:54:00 2019 -0800

    Fix InstanceMapping to always default queued_for_delete=False

    This object has a default=False setting for queued_for_delete, but never
    actually sets that value. All newly created records should have a non-NULL
    value for this field, and we have a migration to fix them, so this
    change explicitly forces that =False, unless the object is being created
    with a value set.

    Closes-Bug: #1814913
    Change-Id: I99c5cc24c7e9bf5e2e72ffc868990b87b0e8e3f8
    (cherry picked from commit ccec9ba82de7c9525981a34bb126e9ca98042d04)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 19.0.0.0rc1

This issue was fixed in the openstack/nova 19.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 18.2.0

This issue was fixed in the openstack/nova 18.2.0 release.

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.