[openstack-dev] [magnum] versioned objects changes

Ryan Rossiter rlrossit at linux.vnet.ibm.com
Wed Aug 26 19:32:28 UTC 2015


I've been working with Nova's versioned objects lately to help catch 
people when object changes are made. There is a lot of object-related 
tests in Nova for this, and a major one I can see helping this situation 
is this test [1]. Looking through the different versioned objects within 
Magnum, I don't see any objects that hold subobjects, so tests like [2] 
are not really necessary yet.

I have uploaded a review for bringing [1] from Nova into Magnum [3]. I 
think this will be a major step in the right direction towards keeping 
track of object changes that will help with rolling upgrades.

[1]: 
https://github.com/openstack/nova/blob/master/nova/tests/unit/objects/test_objects.py#L1262-L1286
[2]: 
https://github.com/openstack/nova/blob/master/nova/tests/unit/objects/test_objects.py#L1314
[3]: https://review.openstack.org/#/c/217342/

On 8/26/2015 3:47 AM, Grasza, Grzegorz wrote:
>
> Hi,
>
> I noticed that right now, when we make changes (adding/removing 
> fields) in 
> https://github.com/openstack/magnum/tree/master/magnum/objects , we 
> don't change object versions.
>
> The idea of objects is that each change in their fields should be 
> versioned, documentation about the change should also be written in a 
> comment inside the object and the obj_make_compatible method should be 
> implemented or updated. See an example here:
>
> https://github.com/openstack/nova/commit/ad6051bb5c2b62a0de6708cd2d7ac1e3cfd8f1d3#diff-7c6fefb09f0e1b446141d4c8f1ac5458L27
>
> The question is, do you think magnum should support rolling upgrades 
> from next release or maybe it's still too early?
>
> If yes, I think core reviewers should start checking for these 
> incompatible changes.
>
> To clarify, rolling upgrades means support for running magnum services 
> at different versions at the same time.
>
> In Nova, there is an RPC call in the conductor to backport objects, 
> which is called when older code gets an object it doesn’t understand. 
> This patch does this in Magnum: https://review.openstack.org/#/c/184791/ .
>
> I can report bugs and propose patches with version changes for this 
> release, to get the effort started.
>
> In Mitaka, when Grenade gets multi-node support, it can be used to add 
> CI tests for rolling upgrades in Magnum.
>
> / Greg
>
>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

-- 
Thanks,

Ryan Rossiter

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150826/3dd10f6e/attachment.html>


More information about the OpenStack-dev mailing list