Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1565059

Summary: openstack router create - multiple routers with same name in same project
Product: Red Hat OpenStack Reporter: Noam Manos <nmanos>
Component: python-neutronclientAssignee: Assaf Muller <amuller>
Status: CLOSED NOTABUG QA Contact: Toni Freger <tfreger>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 13.0 (Queens)CC: amuller, bhaley, chrisw, jruzicka, nyechiel, srevivo
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-18 13:59:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Noam Manos 2018-04-09 09:44:55 UTC
Description of problem:

Unlike other openstack cli commands, that prevents duplicate objects creation with same name (returning "Conflict occurred attempting to store ..."), the "router create" command - does allow to create multiple routers with same name in same project.


Version-Release number of selected component:
OSP 13 - 2018-03-20.2

How reproducible: 
always


Steps to Reproduce:

(overcloud) [stack@undercloud-0 ~]$ 
$ openstack project create test_cloud --enable

Conflict occurred attempting to store project - it is not permitted to have two projects with the same name in the same domain : test_cloud. (HTTP 409) 

$ openstack user create tester --enable --password testerpass --project test_cloud 

Conflict occurred attempting to store user - Duplicate entry found with name tester at domain ID default. (HTTP 409) 


$ openstack router create internal_router
...
| id                      | a2b97aa1-50f7-4e44-abcd-41468998703b |
| name                    | internal_router                      |

$ openstack router create internal_router
...
| id                      | 8c2f09d3-0677-4632-9251-b498d570a96e |
| name                    | internal_router                      |

$ openstack router list
+--------------------------------------+-----------------+--------+-------+-------------+-------+----------------------------------+
| ID                                   | Name            | Status | State | Distributed | HA    | Project                          |
+--------------------------------------+-----------------+--------+-------+-------------+-------+----------------------------------+
| 8c2f09d3-0677-4632-9251-b498d570a96e | internal_router | ACTIVE | UP    | False       | False | 676572adef8e41999011e22234871c31 |
| a2b97aa1-50f7-4e44-abcd-41468998703b | internal_router | ACTIVE | UP    | False       | False | 676572adef8e41999011e22234871c31 |
+--------------------------------------+-----------------+--------+-------+-------------+-------+----------------------------------+


Expected results:

A second attempt to run "openstack router create internal_router" should probably return:

Conflict occurred attempting to store router - Duplicate entry found with name internal_router at project ID test_cloud. (HTTP 409)

Comment 1 Noam Manos 2018-04-09 10:04:12 UTC
A side note:
"openstack security group create" has the same behaviour - not preventing creation of duplicate security group names.

Comment 2 Noam Manos 2018-04-09 10:44:09 UTC
added launchpad bug link.

Comment 3 Brian Haley 2018-04-18 13:59:51 UTC
As noted in the upstream bug, having multiple routers with the same name is valid, as are other resources in neutron and other projects.  Changing it now would break users and break backwards-compatibility in the API.