Bug 1565059 - openstack router create - multiple routers with same name in same project
Summary: openstack router create - multiple routers with same name in same project
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-neutronclient
Version: 13.0 (Queens)
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Assaf Muller
QA Contact: Toni Freger
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-09 09:44 UTC by Noam Manos
Modified: 2018-04-18 13:59 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-18 13:59:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1762376 0 None None None 2018-04-09 10:44:09 UTC

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.


Note You need to log in before you can comment on or make changes to this bug.