[openstack-dev] [nova] [bug?] possible postgres/mysql incompatibility in InstanceGroup.get_hosts()

Sean Dague sean at dague.net
Sat Mar 15 10:29:24 UTC 2014


On 03/15/2014 02:49 AM, Chris Friesen wrote:
> Hi,
> 
> I'm trying to run InstanceGroup.get_hosts() on a havana installation
> that uses postgres.  When I run the code, 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.  Is this change valid?

Yes, postgresql is strongly typed with it's data. That's a valid bug you
found, fixes appreciated!

	-Sean

-- 
Sean Dague
Samsung Research America
sean at dague.net / sean.dague at samsung.com
http://dague.net

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 482 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140315/0396c4b2/attachment.pgp>


More information about the OpenStack-dev mailing list