Can't clear shared flag of unused network

Bug #1293184 reported by Mike Kolesnik
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Mike Kolesnik
Icehouse
Fix Released
Undecided
Mike Kolesnik

Bug Description

A network marked as external can be used as a gateway for tenant routers, even though it's not necessarily marked as shared.
If the 'shared' attribute is changed from True to False for such a network you get an error:
Unable to reconfigure sharing settings for network sharetest. Multiple tenants are using it

This is clearly not the intention of the 'shared' field, so if there are only service ports on the network there is no reason to block changing it from shared to not shared.

Mike Kolesnik (mkolesni)
Changed in neutron:
assignee: nobody → Mike Kolesnik (mkolesni)
status: New → Confirmed
Revision history for this message
Eugene Nikanorov (enikanorov) wrote :

> if there are only service ports on the network there is no reason to block changing it from shared to not shared.

If there are ports on the network belonging to different tenants that means that the network is shared, hence the check.
I think the bug is not valid

Changed in neutron:
status: Confirmed → Incomplete
Revision history for this message
Mike Kolesnik (mkolesni) wrote :

> If there are ports on the network belonging to different tenants that means that the network is shared, hence the check.
> I think the bug is not valid

As I explained, if a network is marked "external" then it can be set as a gateway for routers of other tenants. This creates a port for the router on the network.
If I mark this network as shared or not shared this doesn't affect these ports or the usage of the network as a gateway.

The problem is that if there are no instance ports on the network, the "shared" mark can't be removed even though it's not used by any instance.

For example, if I have a non-external network with no instance ports on it I can update it to shared and then immediately update to non-shared, this will work.
However, if I have an external network that is being used as a gateway then I can update it to shared but immediately updating to non-shared will fail because of the router port, and this is the cause of the bug.

Changed in neutron:
status: Incomplete → New
status: New → Incomplete
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/82352

Changed in neutron:
status: Incomplete → In Progress
tags: added: landscape
tags: removed: landscape
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit 7a2053c7a27bdec02e97b46736c5fcce5f2d053a
Author: Mike Kolesnik <email address hidden>
Date: Sun Mar 23 15:48:42 2014 +0200

    Allow unsharing a network used as gateway/floatingip

    If network has ports that connect it as gateway to another network, such
    as an external network, or "floating ip" ports it should still be
    possible to "unshare" it since these ports represent usage of the
    network as an external network, not as a VM data network.

    Change-Id: Ic33ae7ac193e4fc9fe06a4cfd579a4aacf0e6354
    Closes-bug: #1293184

Changed in neutron:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/111721

Thierry Carrez (ttx)
Changed in neutron:
milestone: none → juno-3
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/icehouse)

Reviewed: https://review.openstack.org/111721
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=161d465305777226a15ced334acfd06142597f85
Submitter: Jenkins
Branch: stable/icehouse

commit 161d465305777226a15ced334acfd06142597f85
Author: Mike Kolesnik <email address hidden>
Date: Sun Mar 23 15:48:42 2014 +0200

    Allow unsharing a network used as gateway/floatingip

    If network has ports that connect it as gateway to another network, such
    as an external network, or "floating ip" ports it should still be
    possible to "unshare" it since these ports represent usage of the
    network as an external network, not as a VM data network.

    Change-Id: Ic33ae7ac193e4fc9fe06a4cfd579a4aacf0e6354
    Closes-bug: #1293184
    (cherry picked from commit 7a2053c7a27bdec02e97b46736c5fcce5f2d053a)

tags: added: in-stable-icehouse
Thierry Carrez (ttx)
Changed in neutron:
milestone: juno-3 → 2014.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.