ipaddr is not assigned when creating a port on shared network with different tenant_id

Bug #1037589 reported by Akihiro Motoki
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Salvatore Orlando

Bug Description

When I create a port on a shared network with different tenant_id,
IP address is not assigned to the port created.

After ./stack.sh,
(1) (User=admin/Tenant=admin) creates public network 'pub1' and subnet.
(2) (User=demo/Tenant=invisible_to_admin) can see 'pub1'. It is ok.
(3) Then, (User=demo/Tenant=invisible_to_admin) creates a port on
    public network 'pub1'.
(4) The port creation succeeds but fixed_ips are not assigned.

I expects IP address will be assinged on the created port.

In the above case, get_subnets() in db_base_plugin_v2 returns an empty list.
Since subnet has no attribute 'shared', _model_query() for subnets queries "subnets" table with tenant_id.
It seems "shared" attribute is necessasry for "subnets" table.

I hope my understanding of public network is correct.

Revision history for this message
Akihiro Motoki (amotoki) wrote :

Detail commandlines are as follows:
http://paste.openstack.org/show/20344/

Revision history for this message
Akihiro Motoki (amotoki) wrote :

The commandline above is wrong.
Correct one is here: http://paste.openstack.org/show/20372/

Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

I will look into this as soon as possible.
I suspect something in the underlying data model is preventing us to fetch all subnets for a given shared network.
What is probably happening is that only the subnets owned by the tenant which owns the network are being fetched.

Changed in quantum:
importance: Undecided → High
assignee: nobody → Salvatore Orlando (salvatore-orlando)
milestone: none → folsom-rc1
Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

We need to ensure a tenant is able to access subnets on a shared network.
Given the current default policies, it makes sense to assume that the owner of a shared network will want to give users access to all subnets in that network.

Changed in quantum:
status: New → Incomplete
status: Incomplete → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to quantum (master)

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

Changed in quantum:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to quantum (master)

Reviewed: https://review.openstack.org/11672
Committed: http://github.com/openstack/quantum/commit/b7f5f8e2fadb787a7de270790b347f1563d190f0
Submitter: Jenkins
Branch: master

commit b7f5f8e2fadb787a7de270790b347f1563d190f0
Author: Salvatore Orlando <email address hidden>
Date: Tue Aug 21 03:53:31 2012 -0700

    Fix IP allocation on shared networks ports.

    Fixes bug 1037589

    Ensure non-owner ports on shared networks get an IP address for
    each subnet configured on the shared network.

    Change-Id: Ib687444b7ad75f3c773b0cb41c25ac3f700fbf0f

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: folsom-rc1 → 2012.2
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.