Objects remotable decorator fails to properly handle ListOfObjects field if it is in the updates dict

Bug #1360656 reported by Nikola Đipanov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Nikola Đipanov

Bug Description

Since this change https://review.openstack.org/#/c/98607/, if the conductor sends back a field of type ListOfObjects field in the updates dictionary after a remotable decorator has called the object_action RPC method, restoring them into objects will fail since they will already be 'hydrated' but the field's from_primitive logic won't know hot to deal with that.

tags: added: unified-objects
Revision history for this message
Matt Riedemann (mriedem) wrote :

Can you add a trace?

Revision history for this message
Nikola Đipanov (ndipanov) wrote :

It turns out this will be hit only if an object has a remotable method and a ListOfObjects field that ends up being updated by the remotable action, and none of the current in-tree objects have it, so it's not such a big deal

Changed in nova:
importance: Critical → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/116475

Changed in nova:
assignee: nobody → Nikola Đipanov (ndipanov)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/116475
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=b32912f8b47f50f72a59d97387fc7f28e3e096a1
Submitter: Jenkins
Branch: master

commit b32912f8b47f50f72a59d97387fc7f28e3e096a1
Author: Nikola Dipanov <email address hidden>
Date: Sat Aug 23 20:34:55 2014 +0200

    Make Object FieldType from_primitive pass objects

    In case we have a ListOfObjects field on an object with a remotable
    method, due to NovaObjectsSerializer now looking into dicts recursively,
    and thus also into the updates dict that object_action returns,
    it is possible that objects inside a list have already been
    deserialized, so we make the Fields from_primitive just pass them on,
    since the job was already done by the NovaObjectsSerializer.

    Change-Id: Ib2a34a115cb2d0a2a0765c81d5dd7ef331077eb5
    Closes-bug: #1360656

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-3 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.