Mechanism driver getting stale QoS data on network update

Bug #1649503 reported by Hong Hui Xiao
28
This bug affects 4 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Manjeet Singh Bhatia

Bug Description

When disassociate qos with network, the ml2 mechanism drivers will still be notified that the network has the stale qos policy.

This bug can be observed after cd7d63bde92e47a4b7bd4212b2e6c45f08c03143

The same issue will not happen for port.

neutron --debug net-update private --no-qos-policy

DEBUG: keystoneauth.session REQ: curl -g -i -X PUT http://192.168.31.90:9696/v2.0/networks/60e7627a-1722-439d-90d4-975fd431df7c.json -H "User-Agent: python-neutronclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}db3122bb702d9094793c5235c47f7b1e544315b2" -d '{"network": {"qos_policy_id": null}}'
DEBUG: keystoneauth.session RESP: [200] Content-Type: application/json Content-Length: 802 X-Openstack-Request-Id: req-7b551082-c2d3-452c-b58a-da9884b24d42 Date: Tue, 13 Dec 2016 08:05:35 GMT Connection: keep-alive
RESP BODY: {"network": {"provider:physical_network": null, "ipv6_address_scope": null, "revision_number": 11, "port_security_enabled": true, "mtu": 1450, "id": "60e7627a-1722-439d-90d4-975fd431df7c", "router:external": false, "availability_zone_hints": [], "availability_zones": [], "provider:segmentation_id": 77, "ipv4_address_scope": null, "shared": false, "project_id": "e33a0ae9e47e49e8b2b6d65efee75b43", "status": "ACTIVE", "subnets": ["230bcb4f-8c2b-4db2-a9aa-325351cd6064", "09aa4e9c-fe6b-42d5-b5ca-76443a6c380a"], "description": "", "tags": [], "updated_at": "2016-12-13T08:05:34Z", "qos_policy_id": "6cd40fa9-092f-43bb-8214-ed79e5174c4f", "name": "private", "admin_state_up": true, "tenant_id": "e33a0ae9e47e49e8b2b6d65efee75b43", "created_at": "2016-12-13T01:36:43Z", "provider:network_type": "vxlan"}}

Hong Hui Xiao (xiaohhui)
Changed in neutron:
assignee: nobody → Hong Hui Xiao (xiaohhui)
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/410101

Changed in neutron:
status: New → In Progress
tags: added: qos
Changed in neutron:
importance: Undecided → High
summary: - Mechanism driver can't be notified with updated network
+ Mechanism driver getting stale QoS data on network update
Changed in neutron:
assignee: Hong Hui Xiao (xiaohhui) → Reedip (reedip-banerjee)
Changed in neutron:
assignee: Reedip (reedip-banerjee) → Kevin Benton (kevinbenton)
Changed in neutron:
assignee: Kevin Benton (kevinbenton) → Reedip (reedip-banerjee)
Changed in neutron:
assignee: Reedip (reedip-banerjee) → Kevin Benton (kevinbenton)
Changed in neutron:
assignee: Kevin Benton (kevinbenton) → Manjeet Singh Bhatia (manjeet-s-bhatia)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit e5ad765484e546b9f857a91c0fea41ebfd87adab
Author: Hong Hui Xiao <email address hidden>
Date: Tue Dec 13 16:29:08 2016 +0800

    Retrieve fresh network DB data before getting it in ml2

    The DB objects that have join relationship with network, will be
    acquired once during a DB transaction.
    However, if they are updated after the first acquisition, the network
    DB model object maintains the older value, and doesnt update it.

    After cd7d63bde92e47a4b7bd4212b2e6c45f08c03143, the updated network
    is retrieved from the db causing this bug.
    This patch retrieves the latest data for these DB objects so that
    updated information can be used.

    Change-Id: Ic8935008515bed687ad3abd00c8ccaf656a30452
    Closes-Bug: #1649503

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 11.0.0.0b1

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

tags: added: newton-backport-potential ocata-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/465956

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

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/465958

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

Reviewed: https://review.openstack.org/465956
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=33f49eb195802bd08f85bcba05f626545cc8d7ce
Submitter: Jenkins
Branch: stable/ocata

commit 33f49eb195802bd08f85bcba05f626545cc8d7ce
Author: Hong Hui Xiao <email address hidden>
Date: Tue Dec 13 16:29:08 2016 +0800

    Retrieve fresh network DB data before getting it in ml2

    The DB objects that have join relationship with network, will be
    acquired once during a DB transaction.
    However, if they are updated after the first acquisition, the network
    DB model object maintains the older value, and doesnt update it.

    After cd7d63bde92e47a4b7bd4212b2e6c45f08c03143, the updated network
    is retrieved from the db causing this bug.
    This patch retrieves the latest data for these DB objects so that
    updated information can be used.

    Change-Id: Ic8935008515bed687ad3abd00c8ccaf656a30452
    Closes-Bug: #1649503
    (cherry-pick from commit e5ad765484e546b9f857a91c0fea41ebfd87adab)

tags: added: in-stable-ocata
tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/newton)

Reviewed: https://review.openstack.org/465958
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=7534c0066354a2e2df03dacfcf89820539d2306f
Submitter: Jenkins
Branch: stable/newton

commit 7534c0066354a2e2df03dacfcf89820539d2306f
Author: Hong Hui Xiao <email address hidden>
Date: Tue Dec 13 16:29:08 2016 +0800

    Retrieve fresh network DB data before getting it in ml2

    The DB objects that have join relationship with network, will be
    acquired once during a DB transaction.
    However, if they are updated after the first acquisition, the network
    DB model object maintains the older value, and doesnt update it.

    After cd7d63bde92e47a4b7bd4212b2e6c45f08c03143, the updated network
    is retrieved from the db causing this bug.
    This patch retrieves the latest data for these DB objects so that
    updated information can be used.

    In order to pass functional tests, get_network is still called instead
    of _make_network_dict as in original change.

    Change-Id: Ic8935008515bed687ad3abd00c8ccaf656a30452
    Closes-Bug: #1649503
    (cherry-pick from commit e5ad765484e546b9f857a91c0fea41ebfd87adab)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 9.4.0

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 10.0.2

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

tags: removed: newton-backport-potential ocata-backport-potential
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.