Exception is raised in servicegroup db driver. But the table is actually
the service table.

This is  my mistake. I forgot to sync my db after merging the latest
code. So there is a mismatch between model and db tables.

I am closing this bug.

** Changed in: nova
       Status: In Progress => Invalid

** Changed in: nova
     Assignee: Wenhao Xu (wenhao-x) => (unassigned)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1114485

Title:
  The type/value for Model's deleted field should be boolean

Status in OpenStack Compute (Nova):
  Invalid

Bug description:
  branch: master
  database: postgresql

  I have met the following exceptions in nova-conductor:

  2013-02-04 01:31:55,291.291 11525 TRACE nova.servicegroup.drivers.db 
ProgrammingError: (ProgrammingError) operator does not exist: boolean = integer
  2013-02-04 01:31:55,291.291 11525 TRACE nova.servicegroup.drivers.db LINE 5: 
...vice_id = anon_1.services_id AND compute_nodes_1.deleted = 0
  2013-02-04 01:31:55,291.291 11525 TRACE nova.servicegroup.drivers.db          
                                                           ^
  2013-02-04 01:31:55,291.291 11525 TRACE nova.servicegroup.drivers.db HINT:  
No operator matches the given name and argument type(s). You might need to add 
explicit type casts.

  Cause:
  postgresql has a native boolean type which doesn't allow the integer (0/1) 
value.

  Extra:
  The model's deleted type is boolean defined in db migration, but in 
nova/db/sqlalchemy/models.py, it is defined as an integer. 

  class NovaBase(object):
      """Base class for Nova Models."""
      __table_initialized__ = False
      created_at = Column(DateTime, default=timeutils.utcnow)
      updated_at = Column(DateTime, onupdate=timeutils.utcnow)
      deleted_at = Column(DateTime)
      deleted = Column(Integer, default=0)
      metadata = None

  
  deleted should be a boolean. 

  And query filter on it should be sth like ".deleted=False", not
  ".deleted=0"

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to