tenant_id is set to ''(empty string) by l3 plugin

Bug #1464806 reported by Isaku Yamahata
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Expired
Undecided
Unassigned

Bug Description

L3 plugin code (neutorn/db/l3_*_db.py) calls l2 plugin with tenant_id=''(empty string) for creation port and subnet for internal use.
e.g. gateway port, floating ip port, port used by dvr.

This is ugly hack and some L2 plugin or ML2 mechanism driver doesn't expect it and be confused with it.
It is better to fix it.

tenant_id=''(empty string) is used for those purpose.
- prevent (non-admin) user from updating
  NeutronDbPluginV2._enforce_device_owner_not_router_intf_or_device_id
- prevent (non-admin) user from deleting
 NeutronDbPluginV2 ._delete_port
- don't count for quota
  Controller.create

This dirty hack was firstly introduced by
the changeset of a7326a947bc0b30778e06acd772dd38bcb28d96d
the change id of Ice72fc6d3b1c613d596c037818ed66d7e9ed841d
with only one line comment. The followers just use it without any special attention/comments.

description: updated
yalei wang (yalei-wang)
Changed in neutron:
assignee: nobody → yalei wang (yalei-wang)
Revision history for this message
Isaku Yamahata (yamahata) wrote :

I dug the history a bit and the documentation.
Per documentation according to

 https://wiki.openstack.org/wiki/Neutron/APIv2-specification

http://developer.openstack.org/api-ref-networking-v2.html

tenant_id is uuid string. (at least user visible one)

On the other hand, per the current implementation, tenant_id is free string whose length is up to 255 bytes.
It predates to quantum v2 api is introduced.

http://git.openstack.org/cgit/openstack/neutron/commit/?id=e791e9e3703d0426a80cb0d4423a9501c2445335

Add API v2 supportrefs/changes/39/8039/16
* Implements BP v2-api-melange-integration
* Adds v2 Plugin specification
* Refactors SQLAlchemy usage for multiple BASE's

Change-Id: I45f008f181c18269afdfe4a9b589a7c5ae56d225

It means the tanant_id was freestring of 255 bytes from the beginning of v2 api.

Revision history for this message
Isaku Yamahata (yamahata) wrote :

The original issue to come up with is https://bugs.launchpad.net/networking-odl/+bug/1464807

Revision history for this message
Isaku Yamahata (yamahata) wrote :

Regarding to the neutron api documentation, the issue was filed

https://bugs.launchpad.net/openstack-api-site/+bug/1465827

Revision history for this message
Eugene Nikanorov (enikanorov) wrote :

So is there a bug after all?
Empty tenant is used for unassociated floatingip ports to indicate no ownership.

Any suggestions for an alternative mechanism?

Changed in neutron:
status: New → Incomplete
Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

This bug is > 172 days without activity. We are unsetting assignee and milestone and setting status to Incomplete in order to allow its expiry in 60 days.

If the bug is still valid, then update the bug status.

Changed in neutron:
assignee: yalei wang (yalei-wang) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for neutron because there has been no activity for 60 days.]

Changed in neutron:
status: Incomplete → Expired
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.