Reviewed: https://review.openstack.org/475891 Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=be8e9fc425b39090fedd2d530db1cd1143ec13d6 Submitter: Jenkins Branch: master
commit be8e9fc425b39090fedd2d530db1cd1143ec13d6 Author: Manjeet Singh Bhatia <manjeet.s.bha...@intel.com> Date: Tue Jun 20 18:10:37 2017 +0000 Add provider info to network for update Ml2 Plugin is not sending provider info while update_network to mechanism update_precommit, due to which network becomes un-usable, This patch extends the updated_network to include provider info. Change-Id: I1838ce375b80f26ad37ede4bf438317f3bbd439f Closes-Bug: #1698804 ** Changed in: neutron Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/1698804 Title: Update to existing neutron network results in un-usable network Status in networking-odl: Confirmed Status in neutron: Fix Released Bug description: Updating an existing Neutron Network with the OpenDaylight V2 Driver, renders that Neutron Network un-usable inside OpenDaylight Controller. This is because, when we update existing network the ML2 ODL-V2 Driver removes the network-type and segment-information when the update- network REST API is invoked towards the ODL controller. This results in Neutron Northbound in the ODL controller leaving the network with no provider-type and thus renders that network un-usable further for any operations. Steps for the problem: neutron net-create ghi neutron net-update ghi --description "bye" Below is the Ocata V2 ML2 Driver logs when the incident occurred: OCATA V2 DRIVER 2017-06-16 10:33:35.987 INFO networking_odl.journal.journal [^[[00;36m-] ^[[01;35mSyncing create network e2cbdd60-f6af-4c00-901c-cbb6047c4d44^[[00m 2017-06-16 10:33:35.988 DEBUG networking_odl.common.client [^[[00;36m-] ^[[01;35mSending METHOD (post) URL (http://192.168.56.1:8080/controller/nb/v2/neutron/networks) JSON ({ "network": { "name": "ghi", "provider:physical_network": null, "admin_state_up": true, "tenant_id": "b77ab8e96b7f4593b0848c46e1f0894c", "mtu": 1500, "router:external": false, "provider:network_type": "vxlan", "port_security_enabled": true, "shared": false, "project_id": "b77ab8e96b7f4593b0848c46e1f0894c", "id": "e2cbdd60-f6af-4c00-901c-cbb6047c4d44", "provider:segmentation_id": 101 } OST /v2.0/networks.json HTTP/1.1" 201 867 2.248803^[[00m 2017-06-16 10:33:36.033 DEBUG networking_odl.common.client [^[[00;36m-] ^[[01;35mGot response: ({^M "network" : {^M "id" : "e2cbdd60-f6af-4c00-901c-cbb6047c4d44",^M "tenant_id" : "b77ab8e96b7f4593b0848c46e1f0894c",^M "name" : "ghi",^M "admin_state_up" : true,^M "status" : "ACTIVE",^M "shared" : false,^M "router:external" : false,^M "provider:network_type" : "vxlan",^M "status" : "ACTIVE",^M "shared" : false,^M "router:external" : false,^M "provider:network_type" : "vxlan",^M "status" : "ACTIVE",^M "shared" : false,^M "router:external" : false,^M "provider:network_type" : "vxlan",^M "provider:segmentation_id" : "101",^M "mtu" : 1500^M }^M 2017-06-16 10:35:39.274 INFO networking_odl.journal.journal [^[[00;36m-] ^[[01;35mSyncing update network e2cbdd60-f6af-4c00-901c-cbb6047c4d44^[[00m 2017-06-16 10:35:39.275 DEBUG networking_odl.common.client [^[[00;36m-] ^[[01;35mSending METHOD (put) URL (http://192.168.56.1:8080/controller/nb/v2/neutron/networks/e2cbdd60-f6af-4c00-901c-cbb6047c4d44) JSON ({ "network": { "availability_zone_hints": [], "availability_zones": [], "name": "ghi", "admin_state_up": true, "port_security_enabled": true, "created_at": "2017-06-16T05:03:34Z", "tags": [], "updated_at": "2017-06-16T05:05:34Z", "ipv6_address_scope": null, "router:external": false, "revision_number": 4, "ipv4_address_scope": null, "vlan_transparent": null, "shared": false, "mtu": 1500, "description": "bye" } })^[[00m ^[[00;33mfrom (pid=17074) request /opt/stack/networking-odl/networking_odl/common/client.py:86^[[00m 2017-06-16 10:35:39.307 DEBUG networking_odl.common.client [^[[00;36m-] ^[[01;35mGot response: ({^M "network" : {^M "id" : "e2cbdd60-f6af-4c00-901c-cbb6047c4d44",^M "tenant_id" : "b77ab8e96b7f4593b0848c46e1f0894c",^M "name" : "ghi",^M "admin_state_up" : true,^M "status" : "ACTIVE",^M "shared" : false,^M "router:external" : false,^M "segments" : [ ]^M }^M })^[[00m ^[[00;33mfrom (pid=17074) _check_rensponse /opt/stack/networking-odl/networking_odl/common/client.py:141^[[00m Similar trials on Newton release with V2-Driver for ML2 works correctly. The logs from Newton runs thus: As you can see below, during the update-network REST API invocation to ODL Controller, the ML2 V2 Driver supplies the provider-type attributes to ODL Controller, thereby enabling ODL controller to retain that information in the Neutron Network. NEWTON V2 DRIVER 2017-06-19 18:19:31.310 ^[[00;32mDEBUG networking_odl.common.client [^[[00;36m-^[[00;32m] ^[[01;35m^[[00;32mSending METHOD (post) URL (http://192.168.56.1:8080/controller/nb/v2/neutron/networks) JSON ({ "network": { "name": "xyz", "provider:physical_network": null, "admin_state_up": true, "tenant_id": "9e82531e25644f94ab5276661cfc6c47", "mtu": 1500, "router:external": false, "provider:network_type": "vxlan", "port_security_enabled": true, "shared": false, "project_id": "9e82531e25644f94ab5276661cfc6c47", "id": "4e48b39c-dc73-45ff-a9a3-bf1b40ccfe1c", "provider:segmentation_id": 21 } })^[[00m ^[[00;33mfrom (pid=25489) request /opt/stack/networking-odl/networking_odl/common/client.py:86^[[00m 2017-06-19 18:19:31.812 ^[[00;32mDEBUG networking_odl.common.client [^[[00;36m-^[[00;32m] ^[[01;35m^[[00;32mGot response: ({^M "network" : {^M "id" : "4e48b39c-dc73-45ff-a9a3-bf1b40ccfe1c",^M "tenant_id" : "9e82531e25644f94ab5276661cfc6c47",^M "name" : "xyz",^M "admin_state_up" : true,^M "status" : "ACTIVE",^M "shared" : false,^M "router:external" : false,^M "provider:network_type" : "vxlan",^M "provider:segmentation_id" : "21",^M "mtu" : 1500^M }^M 2017-06-19 18:20:25.814 ^[[00;32mDEBUG networking_odl.common.client [^[[00;36m-^[[00;32m] ^[[01;35m^[[00;32mSending METHOD (put) URL (http://192.168.56.1:8080/controller/nb/v2/neutron/networks/4e48b39c-dc73-45ff-a9a3-bf1b40ccfe1c) JSON ({ "network": { "provider:physical_network": null, "ipv6_address_scope": null, "revision_number": 4, "port_security_enabled": true, "provider:network_type": "vxlan", "router:external": false, "availability_zone_hints": [], "availability_zones": [], "ipv4_address_scope": null, "shared": false, "description": "Hello xyz", "tags": [], "updated_at": "2017-06-19T12:50:25Z", "provider:segmentation_id": 21, "name": "xyz", "admin_state_up": true, "created_at": "2017-06-19T12:49:29Z", "mtu": 1450, "vlan_transparent": null } })^[[00m ^[[00;33mfrom (pid=25489) request /opt/stack/networking-odl/networking_odl/common/client.py:86^[[00m 2017-06-19 18:20:25.840 ^[[00;32mDEBUG networking_odl.common.client [^[[00;36m-^[[00;32m] ^[[01;35m^[[00;32mGot response: ({^M "network" : {^M "id" : "4e48b39c-dc73-45ff-a9a3-bf1b40ccfe1c",^M "tenant_id" : "9e82531e25644f94ab5276661cfc6c47",^M "name" : "xyz",^M "admin_state_up" : true,^M "status" : "ACTIVE",^M "shared" : false,^M "router:external" : false,^M "provider:network_type" : "vxlan",^M "provider:segmentation_id" : "21",^M "segments" : [ ]^M }^M })^[[00m ^[[00;33mfrom (pid=25489) _check_rensponse /opt/stack/networking-odl/networking_odl/common/client.py:141^[[00m To manage notifications about this bug go to: https://bugs.launchpad.net/networking-odl/+bug/1698804/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp