Trait_* models have a different type for key in migrate scripts

Bug #1449752 reported by Rohit Jaiswal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Medium
Rohit Jaiswal

Bug Description

In ceilometer/storage/sqlalchemy/models.py,

 each of the Trait_* models have the key column definition as : key = Column(Integer, primary_key=True)

, whereas in ceilometer/storage/sqlalchemy/migrate_repo/versions/041_expand_event_traits.py:

sa.Column('key', sa.String(255), primary_key=True),

The column definition should match the sqlalchemy model definition, sa.Integer

Changed in ceilometer:
assignee: nobody → Rohit Jaiswal (rohit-jaiswal-3)
Revision history for this message
gordon chung (chungg) wrote :

just to confirm. it should be sa.String and not sa.Integer

Changed in ceilometer:
status: New → Incomplete
status: Incomplete → Triaged
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (master)

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

Changed in ceilometer:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/178448
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=b11d24afe7969c41ad4d4b72a3d2da97db88a7bd
Submitter: Jenkins
Branch: master

commit b11d24afe7969c41ad4d4b72a3d2da97db88a7bd
Author: Rohit Jaiswal <email address hidden>
Date: Tue Apr 28 16:03:43 2015 -0700

    Trait_* models have incorrect type for key

    Each of the TraitText, TraintInt, TraitFloat
    and TraitDatetime have key column which has
    its type defined incorrectly as Integer. The
    migrate script correctly defines the type as
    String(255).

    This fix updates the sqlalchemy Trait* models
    to define key as String(255).

    Closes-Bug: 1449752

    Change-Id: I5ac2e9b811e3baa53e329732233cd0011a4d25b9

Changed in ceilometer:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: none → liberty-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: liberty-1 → 5.0.0
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.