Reviewed:  https://review.openstack.org/544105
Committed: 
https://git.openstack.org/cgit/openstack/glance/commit/?id=bac4595e08c23859345e8c80af8db5dd36c269b9
Submitter: Zuul
Branch:    master

commit bac4595e08c23859345e8c80af8db5dd36c269b9
Author: Brian Rosmaita <rosmaita.foss...@gmail.com>
Date:   Tue Feb 13 16:42:51 2018 -0500

    Use bool instead of int for boolean filter value
    
    At this layer, it's a boolean filter; we should let the ORM
    make the translation for whatever backend is in use.  MySQL
    didn't care, but PostgreSQL is a bit more picky.
    
    Co-authored-by: Scott McClymont <scott.mcclym...@verizonwireless.com>
    Co-authored-by: Brian Rosmaita <rosmaita.foss...@gmail.com>
    
    Change-Id: Id1e5d2cec3be48f6a5164582591f2fd2f565a96b
    Closes-bug: #1749297


** Changed in: glance
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1749297

Title:
  list-tasks call 500s with postgresql

Status in Glance:
  Fix Released

Bug description:
  Seeing this in the log when doing a list-tasks call with postgresql
  database:

  ERROR oslo_db.sqlalchemy.exc_filters [None 
req-6db7b718-f2db-4bea-a962-9d24f632bbfa admin admin] DBAPIError exception 
wrapped from (psycopg2.ProgrammingError) operator does not exist: boolean = 
integer
  LINE 1: ...66a90b2900405587821d90703fb926' AND tasks.deleted = 0 AND ta...
                                                               ^
  HINT:  No operator matches the given name and argument type(s). You might 
need to add explicit type casts.
  [SQL: 'UPDATE tasks SET updated_at=%(updated_at)s, deleted_at=%(deleted_at)s, 
deleted=%(deleted)s WHERE tasks.owner = %(owner_1)s AND tasks.deleted = 
%(deleted_1)s AND tasks.expires_at <= %(expires_at_1)s'] [parameters: 
{'expires_at_1': datetime.datetime(2018, 2, 13, 14, 42, 18, 419244), 'deleted': 
True, 'updated_at': datetime.datetime(2018, 2, 13, 14, 42, 18, 422231), 
'deleted_1': 0, 'owner_1': u'6b66a90b2900405587821d90703fb926', 'deleted_at': 
datetime.datetime(2018, 2, 13, 14, 42, 18, 419449)}] (Background on this error 
at: http://sqlalche.me/e/f405): ProgrammingError: operator does not exist: 
boolean = integer

  
  Looked at this with Scott McClymont, traced it back to Change-Id: 
I0bde982de948901f6bfbfab9e57cf84891c22052 that introduced the opportunistic 
soft-delete functionality into the image-list call; it uses 0 and 1 instead of 
boolean values.  MySQL doesn't care, but PostgreSQL is more picky.

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1749297/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to