create response for networks and ports is missing extensions

Bug #1541774 reported by Kevin Benton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-midonet
Fix Released
High
YAMAMOTO Takashi
networking-ovn
Fix Released
Undecided
Richard Theis
neutron
Fix Released
High
Kevin Benton

Bug Description

when issuing a create port or a create network, any extensions loaded via the dictionary extension mechanisms are not included in the response.

Changed in neutron:
assignee: nobody → Kevin Benton (kevinbenton)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Changed in neutron:
status: New → In Progress
Changed in neutron:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/276219
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=b6d091279fffe441f6d28e687313ad031a24a3ec
Submitter: Jenkins
Branch: master

commit b6d091279fffe441f6d28e687313ad031a24a3ec
Author: Kevin Benton <email address hidden>
Date: Wed Feb 3 23:49:11 2016 -0800

    ML2: Call _dict_extend in create_(net|port) ops

    The extensions fields were not being added to the response being
    sent back to the user for ports and networks that weren't from
    ML2 extensions (e.g. availability zones). This created an
    inconsistent response between creates and updates/gets. It also
    resulted in incomplete data in the AMQP create notification emitted
    in the API layer.

    This patch adjusts ML2 to call the _apply_dict_extend_functions
    method after creating ports and networks. To make this work, another
    DB lookup to get the latest model state was necessary. However, this
    is part of an already expensive operation (create) so the performance
    impact should be minimal.

    This issue stems from the fact that db_base_plugin_v2 does not
    process extensions when its create_port, create_network methods
    are called. This original skipping behavior was added back in
    patch If0f0277191884aab4dcb1ee36826df7f7d66a8fa as a performance
    improvement to deal with dictionary extension functions that
    performed DB lookups. However, at this point the dictionary
    extension functions should have been optimized to skip any DB
    lookups to avoid the massive performance penalties they incur
    during list operations.

    An alternative to this patch was to adjust the db_base_plugin_v2
    to stop skipping extensions. However, because this is usually
    called by inheriting plugins before they process extensions
    for the new port/network, the extensions do not yet have the
    required information to extend the dict and will fail. So each
    core plugin will need to apply similar logic to support extensions
    that rely on the extend_dict functions.

    Closes-Bug: #1541774
    Change-Id: Iea2c0e7f9ee5eeae28b99797874ca8a8e5790ec2

Changed in neutron:
status: In Progress → Fix Released
Richard Theis (rtheis)
Changed in networking-ovn:
assignee: nobody → Richard Theis (rtheis)
Changed in networking-ovn:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-ovn (master)

Reviewed: https://review.openstack.org/277844
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=100cae19dfefad5ebcfb2af38667870f1146dbae
Submitter: Jenkins
Branch: master

commit 100cae19dfefad5ebcfb2af38667870f1146dbae
Author: Richard Theis <email address hidden>
Date: Tue Feb 9 08:03:34 2016 -0600

    Add extension fields on network and port create

    Add extension fields to the response on network and port create.
    This patch set is based on [1] which calls for each core plugin
    to apply similar logic to support extensions that rely on
    extend_dict functions. For the OVN plugin, this applies to the
    network_availability_zone extension for networks and the
    extra_dhcp_opt extension for ports.

    [1] https://review.openstack.org/#/c/276219/

    Change-Id: I2fa69102ec3562a818fdf9b18f319da7981e4bf5
    Closes-Bug: #1541774
    Related-Bug: #1539274

Changed in networking-ovn:
status: In Progress → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/neutron 8.0.0.0b3

This issue was fixed in the openstack/neutron 8.0.0.0b3 development milestone.

Changed in networking-midonet:
importance: Undecided → High
Changed in networking-midonet:
assignee: nobody → YAMAMOTO Takashi (yamamoto)
milestone: none → 2.0.0
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-midonet (master)

Reviewed: https://review.openstack.org/289208
Committed: https://git.openstack.org/cgit/openstack/networking-midonet/commit/?id=d8189d621b1115ecf7f4fe50a597bb37902adf50
Submitter: Jenkins
Branch: master

commit d8189d621b1115ecf7f4fe50a597bb37902adf50
Author: YAMAMOTO Takashi <email address hidden>
Date: Mon Mar 7 16:44:01 2016 +0900

    Call _dict_extend in create_(net|port) ops

    Co-authored-by: Kevin Benton <email address hidden>
    The corresponding ML2 change: Iea2c0e7f9ee5eeae28b99797874ca8a8e5790ec2
    Closes-Bug: #1541774
    Change-Id: Iedd880aa2879fe2e6a3dfafbc9d23d8e8ca0fcff

Changed in networking-midonet:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/297017

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/297021

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (stable/kilo)

Change abandoned by Dave Walker (<email address hidden>) on branch: stable/kilo
Review: https://review.openstack.org/297021
Reason:
stable/kilo closed for 2015.1.4

This release is now pending its final release and no freeze exception has
been seen for this changeset. Therefore, I am now abandoning this change.

If this is not correct, please urgently raise a thread on openstack-dev.

More details at: https://wiki.openstack.org/wiki/StableBranch

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (stable/liberty)

Change abandoned by Ihar Hrachyshka (<email address hidden>) on branch: stable/liberty
Review: https://review.openstack.org/297017
Reason: Liberty is in CVE only mode.

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.