Update router gateway successful with existed floatingip association

Bug #1081877 reported by Alex Xu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Alex Xu
Folsom
Fix Released
Medium
Gary Kotton

Bug Description

Clear router gateway successful with existed floatingip association.

1.Create net1 with router:external=True and subnet
2.Create net2 and subnet
3.Create router1
4.Set router1 gateway to net1
5.Add net2 interface to router1
6.Create floatingip on net1
7.Create port on net2
8.Associate floatingip and port
9.Clear router1 gateway successful

Expect status code 409

--------------------------------------------------------
soulxu1204@soulxu1204-ThinkPad-T410:/home/soulxu$ quantum net-create net1 --router:external=True
Created a new network:
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| id | 427ec70b-d27f-46e6-a0b0-5bd427fe7f3e |
| name | net1 |
| provider:network_type | local |
| provider:physical_network | |
| provider:segmentation_id | |
| router:external | True |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | 4ce055fb0c67429c9ec7d668cad6f9bf |
+---------------------------+--------------------------------------+
soulxu1204@soulxu1204-ThinkPad-T410:/home/soulxu$ quantum subnet-create net1 192.168.0.0/24
Created a new subnet:
+------------------+--------------------------------------------------+
| Field | Value |
+------------------+--------------------------------------------------+
| allocation_pools | {"start": "192.168.0.2", "end": "192.168.0.254"} |
| cidr | 192.168.0.0/24 |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 192.168.0.1 |
| host_routes | |
| id | 414e4049-ac93-4105-a915-01e5d4a7139b |
| ip_version | 4 |
| name | |
| network_id | 427ec70b-d27f-46e6-a0b0-5bd427fe7f3e |
| tenant_id | 4ce055fb0c67429c9ec7d668cad6f9bf |
+------------------+--------------------------------------------------+

soulxu1204@soulxu1204-ThinkPad-T410:/home/soulxu$ quantum net-create net2
Created a new network:
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| id | 9defc9ba-44b0-4700-ad01-8f3b9a5ffeba |
| name | net2 |
| provider:network_type | local |
| provider:physical_network | |
| provider:segmentation_id | |
| router:external | False |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | 4ce055fb0c67429c9ec7d668cad6f9bf |
+---------------------------+--------------------------------------+
soulxu1204@soulxu1204-ThinkPad-T410:/home/soulxu$ quantum subnet-create net2 10.0.0.0/24
Created a new subnet:
+------------------+--------------------------------------------+
| Field | Value |
+------------------+--------------------------------------------+
| allocation_pools | {"start": "10.0.0.2", "end": "10.0.0.254"} |
| cidr | 10.0.0.0/24 |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 10.0.0.1 |
| host_routes | |
| id | d288c8ea-47d9-4cc6-bffb-b9f8b7d1f224 |
| ip_version | 4 |
| name | |
| network_id | 9defc9ba-44b0-4700-ad01-8f3b9a5ffeba |
| tenant_id | 4ce055fb0c67429c9ec7d668cad6f9bf |
+------------------+--------------------------------------------+

soulxu1204@soulxu1204-ThinkPad-T410:/home/soulxu$ quantum router-create router1
Created a new router:
+-----------------------+--------------------------------------+
| Field | Value |
+-----------------------+--------------------------------------+
| admin_state_up | True |
| external_gateway_info | |
| id | cabb6828-a642-4c4e-8709-fcf9322baa1f |
| name | router1 |
| status | ACTIVE |
| tenant_id | 4ce055fb0c67429c9ec7d668cad6f9bf |
+-----------------------+--------------------------------------+

soulxu1204@soulxu1204-ThinkPad-T410:/home/soulxu$ quantum router-interface-add router1 d288c8ea-47d9-4cc6-bffb-b9f8b7d1f224
Added interface to router router1

soulxu1204@soulxu1204-ThinkPad-T410:/home/soulxu$ quantum router-gateway-set router1 net1
Set gateway for router router1

soulxu1204@soulxu1204-ThinkPad-T410:/home/soulxu$ quantum floatingip-create net1
Created a new floatingip:
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| fixed_ip_address | |
| floating_ip_address | 192.168.0.4 |
| floating_network_id | 427ec70b-d27f-46e6-a0b0-5bd427fe7f3e |
| id | 89ad931c-19da-4b96-9d47-67e8fd5f7f2a |
| port_id | |
| router_id | |
| tenant_id | 4ce055fb0c67429c9ec7d668cad6f9bf |
+---------------------+--------------------------------------+

soulxu1204@soulxu1204-ThinkPad-T410:/home/soulxu$ quantum port-create net2
Created a new port:
+----------------+---------------------------------------------------------------------------------+
| Field | Value |
+----------------+---------------------------------------------------------------------------------+
| admin_state_up | True |
| device_id | |
| device_owner | |
| fixed_ips | {"subnet_id": "d288c8ea-47d9-4cc6-bffb-b9f8b7d1f224", "ip_address": "10.0.0.3"} |
| id | 8a3b7af7-4a49-41a4-bc4e-5a2a8f51dce8 |
| mac_address | fa:16:3e:10:b1:23 |
| name | |
| network_id | 9defc9ba-44b0-4700-ad01-8f3b9a5ffeba |
| status | ACTIVE |
| tenant_id | 4ce055fb0c67429c9ec7d668cad6f9bf |
+----------------+---------------------------------------------------------------------------------+

soulxu1204@soulxu1204-ThinkPad-T410:/home/soulxu$ quantum floatingip-associate 89ad931c-19da-4b96-9d47-67e8fd5f7f2a 8a3b7af7-4a49-41a4-bc4e-5a2a8f51dce8
Associated floatingip 89ad931c-19da-4b96-9d47-67e8fd5f7f2a

soulxu1204@soulxu1204-ThinkPad-T410:/home/soulxu$ quantum router-gateway-clear router1
Removed gateway from router router1

soulxu1204@soulxu1204-ThinkPad-T410:/home/soulxu$ quantum floatingip-list
+--------------------------------------+------------------+---------------------+--------------------------------------+
| id | fixed_ip_address | floating_ip_address | port_id |
+--------------------------------------+------------------+---------------------+--------------------------------------+
| 89ad931c-19da-4b96-9d47-67e8fd5f7f2a | 10.0.0.3 | 192.168.0.4 | 8a3b7af7-4a49-41a4-bc4e-5a2a8f51dce8 |
+--------------------------------------+------------------+---------------------+--------------------------------------+

Alex Xu (xuhj)
Changed in quantum:
assignee: nobody → Alex Xu (xuhj)
Revision history for this message
Gary Kotton (garyk) wrote :

Hi,
Does https://review.openstack.org/#/c/16584/solve this issue?
Thanks
Gary

Revision history for this message
Alex Xu (xuhj) wrote :

Hi Gary,
It can't fix this issue, I still can clear gateway.

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

This is a valid issue, and is something I probably should have cleaned up along with the last change-set to prevent deleting an interface. The check here is even simpler. I can fix it, though by the fact that Alex assigned the bug to him, I was thinking he wanted to fix it. I'm happy either way.

Revision history for this message
Alex Xu (xuhj) wrote :

Hi Dan,
Thank you, please just do it as the way that you think better :) If you want to update with last change-set, I can give up this.

Changed in quantum:
status: New → Confirmed
milestone: none → grizzly-2
importance: Undecided → Medium
Revision history for this message
dan wendlandt (danwent) wrote :

Alex, actually i'm very happy for you to do it. I can provide comments during the code review.

Gary Kotton (garyk)
tags: added: folsom-backport-potential
Alex Xu (xuhj)
summary: - Clear router gateway successful with existed floatingip association
+ Update router gateway successful with existed floatingip association
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/16880

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/16880
Committed: http://github.com/openstack/quantum/commit/1a44190cb42ae3c40a15005dc22df55305322678
Submitter: Jenkins
Branch: master

commit 1a44190cb42ae3c40a15005dc22df55305322678
Author: He Jie Xu <email address hidden>
Date: Mon Nov 26 15:23:15 2012 +0800

    Fixes update router gateway successful with existed floatingip association

    Fixes bug 1081877

    Change-Id: I77e6034a39dc9db85de691a9ba596b2c8ca9d124

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

Fix proposed to branch: stable/folsom
Review: https://review.openstack.org/18772

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

Reviewed: https://review.openstack.org/18772
Committed: http://github.com/openstack/quantum/commit/9c3812f8ab40ae6c69a6588812e09527e34239f8
Submitter: Jenkins
Branch: stable/folsom

commit 9c3812f8ab40ae6c69a6588812e09527e34239f8
Author: He Jie Xu <email address hidden>
Date: Mon Nov 26 15:23:15 2012 +0800

    Fixes update router gateway successful with existed floatingip association

    Fixes bug 1081877

    Change-Id: I77e6034a39dc9db85de691a9ba596b2c8ca9d124

tags: added: in-stable-folsom
Gary Kotton (garyk)
tags: removed: folsom-backport-potential
Thierry Carrez (ttx)
Changed in quantum:
status: Fix Committed → Fix Released
Mark McLoughlin (markmc)
tags: removed: in-stable-folsom
Thierry Carrez (ttx)
Changed in quantum:
milestone: grizzly-2 → 2013.1
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.