Comment 4 for bug 1529084

Revision history for this message
Balazs Gibizer (balazs-gibizer) wrote :

I dig deeper.

In a devstack we call the NovaObjectSerializer that does not do anything with a datetime entity. Then the message, still containing datetime objects goes to the messaging driver that calls jsonutils.dumps on it [1]. The jsonutil.dumps call handles datetime properly.

The FakeDriver used in the nova functional test is a lot more strict. It uses the json.dumps to check if the message passed to the driver is serializable to json. And it blows on datetime objects.

Moreover every in tree drivers that implements the RPC send calls jsonutils.dumps except the FakeDriver.

Going to post a fix for this.

[1] https://opendev.org/openstack/oslo.messaging/src/branch/master/oslo_messaging/_drivers/amqpdriver.py#L599
[2] https://github.com/openstack/oslo.messaging/blob/4dd644ac201ee0fe247d648a2f735998416bf2c7/oslo_messaging/_drivers/impl_fake.py#L176-L185