← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1292963] [NEW] postgres incompatibility in InstanceGroup.get_hosts()

 

Public bug reported:

When running InstanceGroup.get_hosts() on a havana installation that
uses postgres I get the following error:


RemoteError: Remote error: ProgrammingError (ProgrammingError) operator does not exist: timestamp without time zone ~ unknown
2014-03-14 09:58:57.193 8164 TRACE nova.compute.manager [instance: 83439206-3a88-495b-b6c7-6aea1287109f] LINE 3: ....uuid != instances.uuid AND (instances.deleted_at ~ 'None') ...
2014-03-14 09:58:57.193 8164 TRACE nova.compute.manager [instance: 83439206-3a88-495b-b6c7-6aea1287109f]                            ^
2014-03-14 09:58:57.193 8164 TRACE nova.compute.manager [instance: 83439206-3a88-495b-b6c7-6aea1287109f] HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.


I'm not a database expert, but after doing some digging, it seems that the problem is this line in get_hosts():

filters = {'uuid': filter_uuids, 'deleted_at': None}

It seems that current postgres doesn't allow implicit casts.  If I
change the line to:

filters = {'uuid': filter_uuids, 'deleted': 0}


Then it seems to work.

** Affects: nova
     Importance: Undecided
     Assignee: Chris Friesen (cbf123)
         Status: In Progress

** Changed in: nova
     Assignee: (unassigned) => Chris Friesen (cbf123)

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

-- 
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/1292963

Title:
  postgres incompatibility in InstanceGroup.get_hosts()

Status in OpenStack Compute (Nova):
  In Progress

Bug description:
  When running InstanceGroup.get_hosts() on a havana installation that
  uses postgres I get the following error:

  
  RemoteError: Remote error: ProgrammingError (ProgrammingError) operator does not exist: timestamp without time zone ~ unknown
  2014-03-14 09:58:57.193 8164 TRACE nova.compute.manager [instance: 83439206-3a88-495b-b6c7-6aea1287109f] LINE 3: ....uuid != instances.uuid AND (instances.deleted_at ~ 'None') ...
  2014-03-14 09:58:57.193 8164 TRACE nova.compute.manager [instance: 83439206-3a88-495b-b6c7-6aea1287109f]                            ^
  2014-03-14 09:58:57.193 8164 TRACE nova.compute.manager [instance: 83439206-3a88-495b-b6c7-6aea1287109f] HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.

  
  I'm not a database expert, but after doing some digging, it seems that the problem is this line in get_hosts():

  filters = {'uuid': filter_uuids, 'deleted_at': None}

  It seems that current postgres doesn't allow implicit casts.  If I
  change the line to:

  filters = {'uuid': filter_uuids, 'deleted': 0}

  
  Then it seems to work.

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


Follow ups

References