Bug 1243664

Summary: Identical routes created in 2 different projects
Product: OpenShift Container Platform Reporter: Jaspreet Kaur <jkaur>
Component: NetworkingAssignee: Ram Ranganathan <ramr>
Networking sub component: router QA Contact: zhaozhanqi <zzhao>
Status: CLOSED CURRENTRELEASE Docs Contact:
Severity: low    
Priority: high CC: aquiroga, caugello, ccoleman, dave.mccormick, eparis, erjones, jechoi, libra-bugs, misalunk, pep, ramr, sylvain.dejardin, xtian, zzhao
Version: 3.0.0Keywords: Reopened
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-14 12:02:28 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:
Bug Depends On:    
Bug Blocks: 1267746    

Description Jaspreet Kaur 2015-07-16 05:01:13 UTC
Description of problem:

If someone created a route "helloworld.cloudapps.example.com" in one project and another person is trying to create the same route in other project he is able to create it successfully

 
Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.  oc project test
Now using project "test" on server "https://master.openshift.jas.com:8443".
[joe@master ~]$ oc get route
NAME           HOST/PORT            PATH      SERVICE           LABELS
nodejs-route   myapp.apps.jas.com             nodejs-frontend   template=nodejs-example
2. oc project newtest

oc edit route eap-app-http-route
routes/eap-app-http-route

3. oc get route
NAME                 HOST/PORT            PATH      SERVICE   LABELS
eap-app-http-route   myapp.apps.jas.com             eap-app   application=eap-app,template=eap6-basic-sti


Actual results:

The user is able to create the route successfully and when trying to access both leads to the same page or application.


Expected results:

The user should be informed and the route should not be created


Additional info:

Comment 1 Paul Weil 2015-07-16 19:58:36 UTC

*** This bug has been marked as a duplicate of bug 1214243 ***

Comment 3 Eric Paris 2015-10-29 17:34:44 UTC
A uniqueness check was added so this should no longer be an issue.

Comment 4 Ram Ranganathan 2015-10-29 22:55:27 UTC
Setting status to on QA for testing for OSE. The test cases would be the same as the ones used for: https://bugzilla.redhat.com/show_bug.cgi?id=1214243

Comment 5 zhaozhanqi 2015-11-02 07:52:37 UTC
varified this bug. when those same route, the later one will refer to the oldest one.

Comment 6 Brenton Leanhardt 2015-11-23 14:26:33 UTC
This fix is available in OpenShift Enterprise 3.1.

Comment 13 Eric Paris 2016-02-01 14:48:42 UTC
*** Bug 1302287 has been marked as a duplicate of this bug. ***

Comment 14 Eric Paris 2016-02-01 14:48:45 UTC
*** Bug 1302298 has been marked as a duplicate of this bug. ***

Comment 15 Eric Paris 2016-02-01 14:48:50 UTC
*** Bug 1261843 has been marked as a duplicate of this bug. ***

Comment 17 Eric Paris 2016-02-15 18:04:06 UTC
*** Bug 1306216 has been marked as a duplicate of this bug. ***

Comment 18 Eric Paris 2016-02-15 18:04:12 UTC
*** Bug 1305641 has been marked as a duplicate of this bug. ***

Comment 19 Clayton Coleman 2016-02-15 19:24:04 UTC
Status write back (telling users what they got) will be in OSE 3.2.  The UI and CLI will display information about the hostname the router has on the edge, and the reasons they couldn't get a route created if they didn't.

The more general issue of two routes on the same hostname with different ports still needs resolution - we need to ensure it's future compatible with other developments, although we see the value in allowing multiple services to target multiple ports.  We can consider allowing a non protected route and protected route to coexist (when passthrough is desired).

Comment 23 Eric Paris 2016-04-12 18:34:15 UTC
We now (in 3.2) will report about the clash. It won't get blocked, but you will be informed.

Comment 24 zhaozhanqi 2016-04-13 09:36:55 UTC
verified this bug on ]# oc version
oc v3.2.0.14
kubernetes v1.2.0-36-g4a3f9c5


when created two same hostname route. the latest one will be 'HostAlreadyClaimed'

Comment 25 Eric Jones 2016-05-20 18:30:36 UTC
*** Bug 1334437 has been marked as a duplicate of this bug. ***

Comment 27 Josep 'Pep' Turro Mauri 2016-06-14 12:02:28 UTC
This issue was addressed in OpenShift Enterprise 3.2:

  https://access.redhat.com/errata/RHSA-2016:1064

As mentioned in its release notes:

  https://docs.openshift.com/enterprise/3.2/release_notes/ose_3_2_release_notes.html

  "Routers now report back status to the master about whether routes are
  accepted, rejected, or conflict with other users. The CLI will now display
  that error information, allowing users to know that the route is not being
  served."

If there are additional problems with this functionality please create a new bug report.