summaryrefslogtreecommitdiffstats
path: root/nova/openstack
diff options
context:
space:
mode:
authorRussell Bryant <rbryant@redhat.com>2012-11-28 15:43:37 -0500
committerRussell Bryant <rbryant@redhat.com>2012-11-28 16:22:45 -0500
commit66e1a8b47544e225721f0ccd3a33580dde337793 (patch)
tree7b9018917dd84bef77ef340e77f130f3d71d4258 /nova/openstack
parent595168c711bd9ba82c1b7e59c847dbc9c8f92af4 (diff)
downloadnova-66e1a8b47544e225721f0ccd3a33580dde337793.tar.gz
nova-66e1a8b47544e225721f0ccd3a33580dde337793.tar.xz
nova-66e1a8b47544e225721f0ccd3a33580dde337793.zip
Convert datetimes for conductor instance_update.
This patch ensures that jsonutils.to_primitive() is used on the updates being sent to conductor's instance_update method. This is primarily so that we convert datetimes to a string using a very specific format defined in the timeutils module. Then, in the conductor manager, convert these fields back into datetime objects using timeutils. The conversion to a string was already happening implicitly if you were using the kombu rpc driver. The reason is that kombu uses anyjson, which we hook in to and will automatically use our own to_primitive() to fix serialization problems for kombu. Doing it explicitly is better, and is required for the other rpc drivers to work. This is to address a problem with sqlite where it would raise an exception when we try to do an update to a datetime field with a string. Fix bug 1084240. Change-Id: I2d703a92df1e85f0f3a7a793b301fe16cbd81ff5
Diffstat (limited to 'nova/openstack')
0 files changed, 0 insertions, 0 deletions