volume_type_extra_specs doesn't work on postgresql

Bug #1095401 reported by Sean Dague
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Sean Dague

Bug Description

When trying to run tempest tests on postgresql there are 4 fails on volume_type_extra_specs functions. The c-api stack trace is as follows:

2013-01-02 14:06:02 TRACE cinder.exception
2013-01-02 14:06:02 ERROR cinder.api.middleware.fault [req-02915bd2-a88b-4340-aaac-1b90089c8b7c da52107a1f024fdd80c06c78acc1a200 3f8ad23664f4400d8c7348c1dae7c369] Caught error: (ProgrammingError) column "deleted" is of type boolean but expression is of type integer
LINE 1: ...13-01-02T19:06:02.168296'::timestamp, NULL, NULL, 0, 'spec2'...
                                                             ^
HINT: You will need to rewrite or cast the expression.
 'INSERT INTO volume_type_extra_specs (created_at, updated_at, deleted_at, deleted, key, value, volume_type_id) VALUES (%(created_at)s, %(updated_at)s, %(deleted_at)s, %(deleted)s, %(key)s, %(value)s, %(volume_type_id)s) RETURNING volume_type_extra_specs.id' {'volume_type_id': u'1e460dd8-c473-4e40-8227-3033bb60d753', 'deleted': 0, 'created_at': datetime.datetime(2013, 1, 2, 19, 6, 2, 168296), 'updated_at': None, 'value': u'val1', 'key': u'spec2', 'deleted_at': None}
2013-01-02 14:06:02 TRACE cinder.api.middleware.fault Traceback (most recent call last):
2013-01-02 14:06:02 TRACE cinder.api.middleware.fault File "/opt/stack/cinder/cinder/api/middleware/fault.py", line 73, in __call__
2013-01-02 14:06:02 TRACE cinder.api.middleware.fault return req.get_response(self.application)
2013-01-02 14:06:02 TRACE cinder.api.middleware.fault File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1053, in get_response
2013-01-02 14:06:02 TRACE cinder.api.middleware.fault application, catch_exc_info=False)

The root cause is an update call that tries to set deleted=0, on mysql 0==False, on postgresql it's a typing error.

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

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

Changed in cinder:
assignee: nobody → Sean Dague (sdague-b)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/18834
Committed: http://github.com/openstack/cinder/commit/5f6cb2f1c19687ef3a40cf6988f12b25c5269193
Submitter: Jenkins
Branch: master

commit 5f6cb2f1c19687ef3a40cf6988f12b25c5269193
Author: Sean Dague <email address hidden>
Date: Wed Jan 2 14:16:19 2013 -0500

    use deleted = False, not 0 for update

    Fixes bug #1095401

    When running tempest on cinder on postgresql we get a number
    of errors because this call was trying to set deleted = 0.
    On mysql 0 == False, but on postgresql this is a type error.

    Change-Id: Ice85550e8138e0656c93a8a800afdbc5935e4bcc

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → grizzly-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: grizzly-2 → 2013.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.