_get_changed_synthetic_fields() does not guarantee returned fields to be updatable

Bug #1750353 reported by Lujin Luo on 2018-02-19
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Undecided
Lujin Luo

Bug Description

While revising [1], I discovered an issue of _get_changed_synthetic_fields(): it does not guarantee returned fields to be updatable.

How to reproduce:
 Set a breakpoint in [2] and then run neutron.tests.unit.objects.test_ports.DistributedPortBindingIfaceObjTestCase.test_update_updates_from_db_object, the returned fields are
-> return fields
(Pdb) fields
{'host': u'c2753a12ec', 'port_id': 'ae5700cd-f872-4694-bf36-92b919b0d3bf'}
where 'host' and 'port_id' are not updatable.

[1] https://review.openstack.org/#/c/544206/
[2] https://github.com/openstack/neutron/blob/master/neutron/objects/base.py#L696

Lujin Luo (luo-lujin) on 2018-02-19
Changed in neutron:
assignee: nobody → Lujin Luo (luo-lujin)
description: updated
Lujin Luo (luo-lujin) on 2018-02-19
description: updated

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

Changed in neutron:
status: New → In Progress

Reviewed: https://review.openstack.org/545799
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=d5f27524819bc95530d0d5856782546fd02d65f8
Submitter: Zuul
Branch: master

commit d5f27524819bc95530d0d5856782546fd02d65f8
Author: Lujin <email address hidden>
Date: Mon Feb 19 20:06:07 2018 +0900

    Ensure _get_changed_synthetic_fields() return updatable fields

    Currently _get_changed_synthetic_fields() does not guarantee
    returned fields to be updatable. This patch adds this guarantee.

    Change-Id: I123ae390bec489a931180a2e33f4bf7b1d51edb2
    Closes-Bug: #1750353

Changed in neutron:
status: In Progress → Fix Released

This issue was fixed in the openstack/neutron 13.0.0.0b1 development milestone.

tags: added: neutron-proactive-backport-potential
tags: added: neutron-easy-proactive-backport-potential

Reviewed: https://review.openstack.org/573620
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=ce13674afdc1888616b488562cca9f6fba2dc0d2
Submitter: Zuul
Branch: stable/ocata

commit ce13674afdc1888616b488562cca9f6fba2dc0d2
Author: Lujin <email address hidden>
Date: Mon Feb 19 20:06:07 2018 +0900

    Ensure _get_changed_synthetic_fields() return updatable fields

    Currently _get_changed_synthetic_fields() does not guarantee
    returned fields to be updatable. This patch adds this guarantee.

    Change-Id: I123ae390bec489a931180a2e33f4bf7b1d51edb2
    Closes-Bug: #1750353
    (cherry picked from commit d5f27524819bc95530d0d5856782546fd02d65f8)

tags: added: in-stable-ocata

Reviewed: https://review.openstack.org/573617
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=75d08e2b0c44859c55152fbadeb5e23204aeee4b
Submitter: Zuul
Branch: stable/queens

commit 75d08e2b0c44859c55152fbadeb5e23204aeee4b
Author: Lujin <email address hidden>
Date: Mon Feb 19 20:06:07 2018 +0900

    Ensure _get_changed_synthetic_fields() return updatable fields

    Currently _get_changed_synthetic_fields() does not guarantee
    returned fields to be updatable. This patch adds this guarantee.

    Change-Id: I123ae390bec489a931180a2e33f4bf7b1d51edb2
    Closes-Bug: #1750353
    (cherry picked from commit d5f27524819bc95530d0d5856782546fd02d65f8)

tags: added: in-stable-queens
Boden R (boden) on 2018-06-25
Changed in neutron:
status: Fix Released → In Progress
Slawek Kaplonski (slaweq) wrote :

We can't backport it to stable branches as it cause issues with some stadium projects

tags: removed: in-stable-ocata in-stable-queens neutron-easy-proactive-backport-potential neutron-proactive-backport-potential

Change abandoned by Slawek Kaplonski (<email address hidden>) on branch: stable/pike
Review: https://review.openstack.org/573618
Reason: as we had to revert it from Queens we will not backport it also here

This issue was fixed in the openstack/neutron 12.0.4 release.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers