quota_usages and pci_devices tables have columns with mismatching nullable attribute

Bug #1343331 reported by Johannes Erdfelt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Johannes Erdfelt

Bug Description

The database model defines these columns:

quota_usages
    resource = Column(String(255), nullable=False)

pci_devices
    deleted = Column(Integer, default=0)
    vendor_id = Column(String(4), nullable=False)
    product_id = Column(String(4), nullable=False)
    dev_type = Column(String(8), nullable=False)

However, the tables where created with different nullable attributes in the database migrations:

quota_usages
        Column('resource', String(length=255)),

pci_devices
        Column('deleted', Integer, default=0, nullable=False),
        Column('product_id', String(4)),
        Column('vendor_id', String(4)),
        Column('dev_type', String(8)),

It appears that the model is correct in all cases and a database migration should be added to make the applied schema match the model

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/107736

Changed in nova:
assignee: nobody → Johannes Erdfelt (johannes.erdfelt)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/107736
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=0e98f5a522c08b17c98ed108459a179d14eacd4a
Submitter: Jenkins
Branch: master

commit 0e98f5a522c08b17c98ed108459a179d14eacd4a
Author: Johannes Erdfelt <email address hidden>
Date: Wed Jul 16 16:47:16 2014 -0700

    Update database columns nullable to match model

    Some columns were created with a different nullable value than the model
    defines.

    Closes-Bug: 1343331
    Change-Id: Iafc72e571648ba1763f457ae00ac84a63c94e0cd

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-3 → 2014.2
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.