flavor-create fails on postgresql DB

Bug #968190 reported by Bernhard M. Wiedemann
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
J. Daniel Schmidt

Bug Description

this is very similar to bug 765782

when running
nova flavor-create smaller 12 1024 20 1
on a postgresql DB
it fails with
2012-03-29 07:56:38 ERROR nova.api.openstack [...] Caught error: (ProgrammingError) operator does not exist: character varying = integer
LINE 4: ...ance_types.deleted = false AND instance_types.flavorid = 12

It does not automatically convert the integer 12 into a varchar(255), unlike mysql/sqlite
Changing flavorid to integer type would be best.

tags: added: postgresql
removed: postgres
Revision history for this message
Bernhard M. Wiedemann (ubuntubmw) wrote :

made a patch of the alternative approach

tags: added: essex-rc-potential
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/5991

Changed in nova:
assignee: nobody → J. Daniel Schmidt (jdsn)
status: New → In Progress
Changed in nova:
assignee: J. Daniel Schmidt (jdsn) → Vish Ishaya (vishvananda)
Changed in nova:
assignee: Vish Ishaya (vishvananda) → J. Daniel Schmidt (jdsn)
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (milestone-proposed)

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/6046

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

Reviewed: https://review.openstack.org/5991
Committed: http://github.com/openstack/nova/commit/6ec0ac30c760328aa52474ad77d0ace40550e3d3
Submitter: Jenkins
Branch: master

commit 6ec0ac30c760328aa52474ad77d0ace40550e3d3
Author: J. Daniel Schmidt <email address hidden>
Date: Fri Mar 30 12:20:21 2012 +0200

    fixed postgresql flavor-create

    fixes bug 968190
    nova flavor-create failed on postgresql DB
    because sqlalchemy tried to write an integer into a varchar field

    Change-Id: Ib47d8d10e96fedb2158f454503fe1ca3493c16bb
    Signed-Off-By: Bernhard M. Wiedemann <bwiedemann suse.com>

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (milestone-proposed)

Reviewed: https://review.openstack.org/6046
Committed: http://github.com/openstack/nova/commit/ffa0c47452dc9f84c088757acfaf41d121e9d256
Submitter: Jenkins
Branch: milestone-proposed

commit ffa0c47452dc9f84c088757acfaf41d121e9d256
Author: J. Daniel Schmidt <email address hidden>
Date: Fri Mar 30 12:20:21 2012 +0200

    fixed postgresql flavor-create

    fixes bug 968190
    nova flavor-create failed on postgresql DB
    because sqlalchemy tried to write an integer into a varchar field

    Change-Id: Ib47d8d10e96fedb2158f454503fe1ca3493c16bb
    Signed-Off-By: Bernhard M. Wiedemann <bwiedemann suse.com>

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