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

** Changed in: neutron
       Status: Expired => In Progress

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1430345

Title:
  Manually created port by admin can be assigned as a second gateway to
  an existing router

Status in neutron:
  In Progress

Bug description:
  ____________
  Description:
  As an admin one can manually create a port on a network and assign it to a 
router (which already have a gateway) as a gateway by adding "Device Owner" = 
"network:router_gateway" and "Device ID" = "<router ID>"  
   
  basically I see two issues here:
  1. When Manually creating a port on an external network it cannot be deleted 
via API access (Horizon or CLI command)
  2. The manually created port can be assign as a "Device Owner" = 
network:router_gateway to a router that already have a default gateway which 
cause one router to have two default gateways.

  ________________
  Version-Release:
  openstack 6.0.3-0
  openstack-neutron-2014.2.2-3
  horizon-2014.2.2-2
  ____________
  Environment:
  All-in-One
  RHEL 7.1

  ___________________
  Steps to Reproduce:
  1. Create Neutron external network and a subnet
  2. Create a router and set a gateway the external network
  3. Add a port and assign it to the router you created with "Device Owner" = 
"network:router_gateway" and "Device ID" = "<router ID>"
  4. Try to delete the manually created port
  _______________
  Actual results:
  Port cannot be deleted with the following: Error: Failed to delete port: Port 
0ff48364-dcb1-44a4-b064-b1df5e9cb911 has owner network:router_gateway and 
therefore cannot be deleted directly via the port API.

  _________________
  Expected results:
  Port can be deleted
  Cannot assign two gateways to one router.

  ________________
  Additional Info:

  # neutron port-list
  
+--------------------------------------+----------+-------------------+--------------------------------------------------------------------------------------+
  | id                                   | name     | mac_address       | 
fixed_ips                                                                       
     |
  
+--------------------------------------+----------+-------------------+--------------------------------------------------------------------------------------+
  | 08b934f3-7daf-4895-8494-42ef944e7fe1 |          | fa:16:3e:a7:b5:be | 
{"subnet_id": "d0533169-c649-456e-9aba-03672b6c2321", "ip_address": "x.x.x.x"}  
     |
  | 0ff48364-dcb1-44a4-b064-b1df5e9cb911 | Man-port | fa:16:3e:89:89:ca | 
{"subnet_id": "d0533169-c649-456e-9aba-03672b6c2321", "ip_address": "x.x.x.x"}  
     |
  | 5bea96f1-c3a8-43fc-90cb-db87f8dd92dd |          | fa:16:3e:93:77:3f | 
{"subnet_id": "6140e6fa-d0a5-4621-bb15-472893e0fe85", "ip_address": "x.x.x.x"}  
     |
  | 80b8a6fe-67b1-4f72-86b6-9368611239c4 |          | fa:16:3e:89:00:1b | 
{"subnet_id": "6140e6fa-d0a5-4621-bb15-472893e0fe85", "ip_address": "x.x.x.x"}  
     |
  | a49c7caf-a8cf-44e9-b7e6-6ba724ab9f7e |          | fa:16:3e:5c:d3:bc | 
{"subnet_id": "d0533169-c649-456e-9aba-03672b6c2321", "ip_address": "x.x.x.x"}  
     |
  
+--------------------------------------+----------+-------------------+--------------------------------------------------------------------------------------+
  # neutron port-show 0ff48364-dcb1-44a4-b064-b1df5e9cb911
  
+-----------------------+------------------------------------------------------------------------------------+
  | Field                 | Value                                               
                               |
  
+-----------------------+------------------------------------------------------------------------------------+
  | admin_state_up        | True                                                
                               |
  | allowed_address_pairs |                                                     
                               |
  | binding:host_id       |                                                     
                               |
  | binding:profile       | {}                                                  
                               |
  | binding:vif_details   | {}                                                  
                               |
  | binding:vif_type      | unbound                                             
                               |
  | binding:vnic_type     | normal                                              
                               |
  | device_id             | 123dd109-1b37-4e69-9905-df2e1e233e25                
                               |
  | device_owner          | network:router_gateway                              
                               |
  | extra_dhcp_opts       |                                                     
                               |
  | fixed_ips             | {"subnet_id": 
"d0533169-c649-456e-9aba-03672b6c2321", "ip_address": "x.x.x.x"}     |
  | id                    | 0ff48364-dcb1-44a4-b064-b1df5e9cb911                
                               |
  | mac_address           | fa:16:3e:89:89:ca                                   
                               |
  | name                  | Man-port                                            
                               |
  | network_id            | 07febdca-2189-4238-9891-9bde173863dd                
                               |
  | security_groups       |                                                     
                               |
  | status                | DOWN                                                
                               |
  | tenant_id             | cc8ce0117f264950976bd8f932e68c58                    
                               |
  
+-----------------------+------------------------------------------------------------------------------------+
  # neutron port-show 08b934f3-7daf-4895-8494-42ef944e7fe1
  
+-----------------------+------------------------------------------------------------------------------------+
  | Field                 | Value                                               
                               |
  
+-----------------------+------------------------------------------------------------------------------------+
  | admin_state_up        | True                                                
                               |
  | allowed_address_pairs |                                                     
                               |
  | binding:host_id       | hhh.hhh.hhh.hhh                                     
               |
  | binding:profile       | {}                                                  
                               |
  | binding:vif_details   | {"port_filter": true, "ovs_hybrid_plug": true}      
                               |
  | binding:vif_type      | ovs                                                 
                               |
  | binding:vnic_type     | normal                                              
                               |
  | device_id             | 123dd109-1b37-4e69-9905-df2e1e233e25                
                               |
  | device_owner          | network:router_gateway                              
                               |
  | extra_dhcp_opts       |                                                     
                               |
  | fixed_ips             | {"subnet_id": 
"d0533169-c649-456e-9aba-03672b6c2321", "ip_address": "x.x.x.x"}     |
  | id                    | 08b934f3-7daf-4895-8494-42ef944e7fe1                
                               |
  | mac_address           | fa:16:3e:a7:b5:be                                   
                               |
  | name                  |                                                     
                               |
  | network_id            | 07febdca-2189-4238-9891-9bde173863dd                
                               |
  | security_groups       |                                                     
                               |
  | status                | ACTIVE                                              
                               |
  | tenant_id             |                                                     
                               |
  
+-----------------------+------------------------------------------------------------------------------------+

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1430345/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to