Hi Dan, Dan, Nikola, all Nova devs,

OK, so in reviewing Dan B's patch series that refactors the virt driver's get_available_resource() method [1], I am stuck between two concerns. I like (love even) much of the refactoring work involved in Dan's patches. They replace a whole bunch of our nested dicts that are used in the resource tracker with real objects -- and this is something I've been harping on for months that really hinders developer's understanding of Nova's internals.

However, all of the object classes that Dan B has introduced have been unversioned objects -- i.e. they have not derived from nova.objects.base.NovaObject. This means that these objects cannot be sent over the wire via an RPC API call. In practical terms, this issue has not yet reared its head, because the resource tracker still sends a dictified JSON representation of the object's fields directly over the wire, in the same format as Icehouse, therefore there have been no breakages in RPC API compatibility.

The problems with having all these objects not modelled by deriving from nova.objects.base.NovaObject are two-fold:

* The object's fields/schema cannot be changed -- or rather, cannot be changed without introducing upgrade problems. * The objects introduce a different way of serializing the object contents than is used in nova/objects -- it's not that much different, but it's different, and only has not caused a problem because the serialization routines are not yet being used to transfer data over the wire

So, what to do? Clearly, I think the nova/virt/hardware.py objects are badly needed. However, one of (the top?) priorities of the Nova project is upgradeability, and by not deriving from nova.objects.base.NovaObject, these nova.virt.hardware objects are putting that mission in jeopardy, IMO.

My proposal is that before we go and approve any BPs or patches that add to nova/virt/hardware.py, we first put together a patch series that moves the object models in nova/virt/hardware.py to being full-fledged objects in nova/objects/*

Thoughts?

-jay

[1] https://review.openstack.org/#/q/status:open+project:openstack/nova+branch:master+topic:bp/virt-driver-get-available-resources-object,n,z

_______________________________________________
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to