Network gateway flat connection fail because of None tenant_id

Bug #1462973 reported by Salvatore Orlando on 2015-06-08
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Undecided
Unassigned
Juno
Undecided
Salvatore Orlando
vmware-nsx
High
Salvatore Orlando

Bug Description

The NSX-mh backend does not accept "None" values for tags.
Tags are applied to all NSX-mh ports. In particular there is always a tag with the neutron tenant_id (q_tenant_id)

_get_tenant_id_for_create now in admin context returns the tenant_id of the resource being created, if there is one.
Otherwise still returns context.tenant_id.
The default L2 gateway unfortunately does not have a tenant_id, but has the tenant_id attribute in its data structure.
This means that _get_tenant_id_for_create will return None, and NSX-mh will reject the request.

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

Changed in vmware-nsx:
status: New → In Progress

Reviewed: https://review.openstack.org/189268
Committed: https://git.openstack.org/cgit/openstack/vmware-nsx/commit/?id=e3733b1b894adebcb1e4999a1c50cb6874b77abe
Submitter: Jenkins
Branch: master

commit e3733b1b894adebcb1e4999a1c50cb6874b77abe
Author: vmware_nsx_ci <email address hidden>
Date: Mon Jun 8 04:23:43 2015 -0700

    NSX-mh: fix default l2 gw connections

    This patch fixes connections to the default layer-2 gateway
    ensuring that:
    1) no "None" value is sent for tags to nsxlib. In particular this
       patch ensures that the tenant_id is populated when the request
       is sent with admin credentials.
    2) the segmentation_id attribute is converted to integer before
       validating whether it's a valid VLAN tag.

    Change-Id: I959edab036c32a3a2cfdbe4d7567daf29dc75797
    Closes-Bug: #1462973
    Closes-Bug: #1462974

Changed in vmware-nsx:
status: In Progress → Fix Committed

Reviewed: https://review.openstack.org/195579
Committed: https://git.openstack.org/cgit/openstack/vmware-nsx/commit/?id=d664c41c18718ee20d25be2a33140b8c5f85c007
Submitter: Jenkins
Branch: stable/kilo

commit d664c41c18718ee20d25be2a33140b8c5f85c007
Author: Salvatore Orlando <email address hidden>
Date: Thu Jun 25 06:34:37 2015 -0700

    NSX-mh: fix default l2 gw connections

    This patch fixes connections to the default layer-2 gateway
    ensuring that:
    1) no "None" value is sent for tags to nsxlib. In particular this
       patch ensures that the tenant_id is populated when the request
       is sent with admin credentials.
    2) the segmentation_id attribute is converted to integer before
       validating whether it's a valid VLAN tag.

    Cherry-picked from commit: e3733b1b894adebcb1e4999a1c50cb6874b77abe
    Change-Id: I959edab036c32a3a2cfdbe4d7567daf29dc75797
    Closes-Bug: #1462973
    Closes-Bug: #1462974

tags: added: in-stable-kilo
Alan Pevec (apevec) on 2015-11-14
Changed in neutron:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers