Network cannot be created in NEC plugin when OFC network ID is unique inside a tenant

Bug #1127664 reported by Akihiro Motoki
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Akihiro Motoki
Folsom
Fix Released
High
Akihiro Motoki

Bug Description

Network cannot be created in NEC plugin when OFC network ID is unique inside a tenant

Some OFC implmenetations generate a network ID unique inside a tenant. In this case generated network IDs on can be duplicated in system-wide. However, the current implementation of NEC plugin expects both IDs are expected to be globally unique and it results in a failure of network creation.

Tags: nec
Changed in quantum:
status: New → In Progress
Revision history for this message
Akihiro Motoki (amotoki) wrote :

The review is avilable at https://review.openstack.org/#/c/21627/

Revision history for this message
dan wendlandt (danwent) wrote :

this is a monster patch... really a feature hiding as a bug, I suspect :) Please merge this by the end of this week, or we'll bump it to Havana.

Changed in quantum:
milestone: grizzly-3 → grizzly-rc1
Revision history for this message
dan wendlandt (danwent) wrote :

looks like this is going to merge for G-3

Changed in quantum:
milestone: grizzly-rc1 → grizzly-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to quantum (master)

Reviewed: https://review.openstack.org/21627
Committed: http://github.com/openstack/quantum/commit/7a7675c748a0bd5b7e554f0ad61cb979fa4e9513
Submitter: Jenkins
Branch: master

commit 7a7675c748a0bd5b7e554f0ad61cb979fa4e9513
Author: Akihiro MOTOKI <email address hidden>
Date: Thu Jan 31 13:51:28 2013 +0900

    plugin/nec: Make sure resources on OFC is globally unique.

    Fixes bug 1127664

    Network cannot be created in NEC plugin when OFC network ID is
    unique inside a tenant. Some OFC implmenetations generate a network
    ID unique inside a tenant. In this case generated network IDs on can
    be duplicated in system-wide. To fix it, this changes resource ID on
    OFC to REST URI to make sure IDs on OFC globally unique.

    Fixes bug 1120962

    Make sure NEC plugin creates shared networks

    In Quantum resource relationship is not limited inside a tenant.
    E.g., a non-owner tenant can create a port on a shared network.
    To deal with it the provider layer should not be aware of tenants
    each resource belongs to even when it has a kind of tenant concept.

    This commit changes ofc_manager to pass a parent resource for resource
    creation and identify a resouce by REST URI used to access OFC resources.
    It decouples Quantum resource access model from OFC resource models.
    OFC IDs created before this commit are also looked up.

    Primary keys of OFC ID mapping tables are changed to quantum_id because
    most of all accesses to these mapping tables are done by quantum_id.
    However the current version of alembic does not support changing primary
    keys, so new OFC ID mapping tables for tenant, network, port and packet
    filter are created. Dropping the previous mapping tables will be done
    along with the data migration logic.

    This commit also changes the following minor issues.
    - Make sure ID on ProgrammableFlow OpenFlow controller (PFC) is less than
      32 chars. The current PFC accepts only 31 chars max as ID and 127 chars
      as a description string.
    - Some database accesses created their own session and did not support
      subtransactions. Make sure to use context.session passed from the API layer.
    - Removes Unused methods (update_network, update_port) in trema/pfc drivers.

    Change-Id: Ib4bb830e5f537c789974fa7b77f06eaeacb65333

Changed in quantum:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in quantum:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in quantum:
milestone: grizzly-3 → 2013.1
Revision history for this message
Mark McLoughlin (markmc) wrote :

stable/folsom proposal is here: https://review.openstack.org/26360

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

Reviewed: https://review.openstack.org/26360
Committed: http://github.com/openstack/quantum/commit/a31069a96725b610da6b0641c7dc3045256a9fe3
Submitter: Jenkins
Branch: stable/folsom

commit a31069a96725b610da6b0641c7dc3045256a9fe3
Author: Akihiro MOTOKI <email address hidden>
Date: Fri Apr 5 04:22:25 2013 +0900

    plugin/nec: Make sure resources on OFC is globally unique.

    V3 and V4 of NEC ProgrammableFlow controller (PFC) generates a network ID
    unique inside a tenant. On the other hand, ID mapping table in NEC plugin
    expects ID on OFC is globally unique. As a result creation of a network
    will fail. To fix it, quantum network ID is passed as ID on OFC.
    The same issue happens in port creation too.

    In Grizzly this bug was fixed in another way (to support shared network),
    but this change is quite big and it cannot be backported.
    The minimum way to fix this bug is to specify OFC network ID from Quantum.

    Since V3 of PFC does not return network/port ID in the response when ID is
    passed in the request, create_network/port is changed to return an ID
    passed to the controller instead of extracting ID from the response.

    Fixes bug #1127664

    Change-Id: Iad1961ee2469b547598e87e63a4a3dc4ac9c6e97

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.