Comment 6 for bug 714577

Revision history for this message
Soren Hansen (soren) wrote : Re: [Bug 714577] Re: IP's are recycled too quickly

Ok, I've managed to replicate it now (I had to get an ip to deallocate,
but not get released):

SELECT * FROM fixed_ips WHERE network_id IN (SELECT id FROM networks
WHERE host = 'oxygen') AND updated_at < '2011-02-09T19:52:01.355919' AND
instance_id IS NOT NULL AND allocated = 0;

Gave me this result:
2011-02-09 12:25:23.756273|2011-02-09 20:01:43.789045||0|4|10.0.0.3|1|363|0|1|0

So "2011-02-09 20:01:43.789045" sorts earlier than
"2011-02-09T19:52:01.355919", strongly suggesting that because we're
passing a string, we end up doing lexicographical comparison rather than
temporal ditto. We could probably be in good shape if the used
isoformat(' ') instead of just isoformat(), but I think this handling
belongs in the db layer.

I'll propose my branch as is.

--
Soren Hansen        | http://linux2go.dk/
Ubuntu Developer    | http://www.ubuntu.com/
OpenStack Developer | http://www.openstack.org/