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.
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 09T19:52: 01.355919' AND
WHERE host = 'oxygen') AND updated_at < '2011-02-
instance_id IS NOT NULL AND allocated = 0;
Gave me this result: 756273| 2011-02- 09 20:01:43. 789045| |0|4|10. 0.0.3|1| 363|0|1| 0
2011-02-09 12:25:23.
So "2011-02-09 20:01:43.789045" sorts earlier than 09T19:52: 01.355919" , strongly suggesting that because we're
"2011-02-
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.
-- linux2go. dk/ www.ubuntu. com/ www.openstack. org/
Soren Hansen | http://
Ubuntu Developer | http://
OpenStack Developer | http://