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.
Reviewed: https:/ /review. openstack. org/523914 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=e727437b0cc dcc15e8ccd9b7a7 c232a878dadd2d
Committed: https:/
Submitter: Zuul
Branch: master
commit e727437b0ccdcc1 5e8ccd9b7a7c232 a878dadd2d
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
Closes-Bug: #1735188