Changes in mutable fields (e.g. dicts) of Objects are not detected

Bug #1390432 reported by Tan Lin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Invalid
Wishlist
Tan Lin

Bug Description

when I change nodes' fields driver_info, this will not be regard as _change_fields.
for ex:
       node.driver_info['boot_device'] = device
I have to use:
      driver_info = node.driver_info
      driver_info['boot_device'] = device
      node.driver_info= driver_info

This is not so comfortable.

Tan Lin (tan-lin-good)
Changed in ironic:
assignee: nobody → Tan Lin (tan-lin-good)
Revision history for this message
Dmitry Tantsur (divius) wrote :

It's a valid bug, though I doubt it's possible to fix with reasonable effort. You can try, of course.

summary: - not detect the inner change of object fields
+ Changes in mutable fields (e.g. dicts) of Objects are not detected
Changed in ironic:
status: New → Confirmed
importance: Undecided → Wishlist
Revision history for this message
Ruby Loo (rloo) wrote :

Tan, the code in Ironic was copied from Nova, and there is now an oslo.versionedobjects library that contains that (or similar) code. Ironic should switch to using that library, so I don't think you should be modifying the object code in Ironic.

See https://bugs.launchpad.net/ironic/+bug/1461239

Revision history for this message
Jim Rollenhagen (jim-rollenhagen) wrote :

This is already fixed in oslo.versionedobjects, so closing as a duplicate of https://bugs.launchpad.net/ironic/+bug/1461239

It will be fixed when the migration is done.

Changed in ironic:
status: Confirmed → Invalid
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.