commit b1aa3ed01769f75b2fff16fb4e77269686c061b3
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
(cherry picked from commit e727437b0ccdcc15e8ccd9b7a7c232a878dadd2d)
Reviewed: https:/ /review. openstack. org/524157 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=b1aa3ed0176 9f75b2fff16fb4e 77269686c061b3
Committed: https:/
Submitter: Zuul
Branch: stable/pike
commit b1aa3ed01769f75 b2fff16fb4e7726 9686c061b3
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 _from_db_ object code was blindly trying to set
and when we load those out of the database, the
PciDevice.
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: I5de0979e280004 c1ce0acc99d69cc 96089a704f8 5e8ccd9b7a7c232 a878dadd2d)
Closes-Bug: #1735188
(cherry picked from commit e727437b0ccdcc1