Comment 3 for bug 1735188

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

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

commit e727437b0ccdcc15e8ccd9b7a7c232a878dadd2d
Author: Matt Riedemann <email address hidden>
Date: Wed Nov 29 10:36:22 2017 -0500

    Fix ValueError when loading old pci device record

    Old pci_devices records might not have a uuid value set
    and when we load those out of the database, the
    PciDevice._from_db_object code was blindly trying to set
    the PciDevice.uuid field to None, which fails because the
    PciDevice.uuid field is not nullable.

    This change fixes the problem by skipping the 'uuid' field
    if it's not set in the db record so that we can auto-generate
    a uuid later and update the object with it, which also performs
    our online data migration.

    This is similar to how we handle the uuid online migration for
    other objects like compute nodes, services and migrations.

    Change-Id: I5de0979e280004c1ce0acc99d69cc96089a704f8
    Closes-Bug: #1735188