changed fields of versionedobjects not tracked properly when down-versioning object
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo.versionedobjects |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Sorry for the complicated write-up below, but the issue is complicated.
I'm running into a problem between Mitaka and Kilo, but I *think* it'll also hit Mitaka/Liberty. The problem scenario is when we have older and newer services talking to each other. The problem occurs when nova-conductor writes to an object field that is removed in obj_make_
In oslo_versionedo
self._
This blindly sets the local self._changed_
This is a problem because the far end can include fields that don't actually exist in the older object version. On the far end (which may be newer) in nova.conductor.
updates[
Since this is called against the newer object code, it can specify fields that do not exist in the older version of the object if nova-conductor has written those fields.
The only workaround I've been able to come up with for this is to modify oslo_versionedo
I think there's another related issue. In VersionedObject
if self.obj_
Since we call self.obj_
It seems to me that in obj_to_primitive() we should not allow fields to be included in obj[self.
Where this gets really problematic in the case of PciDevice is that the older compute node preserves 'parent_addr' as a changed field and includes it as such the next time it calls device.save(). On the nova-conductor side in PciDevice.save() we then call updates = self.obj_ get_changes( ), which does this:
for key in self.obj_ what_changed( ):
changes[ key] = getattr(self, key)
but in this code 'parent_addr' is listed in self.obj_ what_changed( ), but the attribute isn't actually set. This results in the following exception:
NotImplementedE rror: Cannot load 'parent_addr' in the base class