Bug 1391878 - [networking_public_222]The later host name should mark as 'HostAlreadyClaimed' when creating two same wildcard route
Summary: [networking_public_222]The later host name should mark as 'HostAlreadyClaimed...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 3.4.0
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: ---
Assignee: Ram Ranganathan
QA Contact: zhaozhanqi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-04 09:58 UTC by zhaozhanqi
Modified: 2022-08-04 22:20 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2017-01-18 12:49:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Origin (Github) 11849 0 None None None 2016-11-09 16:44:08 UTC
Red Hat Product Errata RHBA-2017:0066 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.4 RPM Release Advisory 2017-01-18 17:23:26 UTC

Description zhaozhanqi 2016-11-04 09:58:50 UTC
Description of problem:
When creating two wildcard route
test1.example.com to service1
test2.example.com to service2
actually, both two route will be mapping '*.example.com'. whatever access test1.example.com or test2.example.com. both two will be route to service1. so we should mark the later one to 'HostAlreadyClaimed'

Version-Release number of selected component (if applicable):
# openshift version
openshift v3.4.0.21+ca4702d
kubernetes v1.4.0+776c994
etcd 3.1.0-rc.0


How reproducible:
always

Steps to Reproduce:
1. make sure the router is running
2. enable wildcard route for router
   #oc env dc router ROUTER_ALLOW_WILDCARD_ROUTES=true
3. Create app/service/edge route
 $ oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/routing/caddy-docker.json -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/routing/edge/service_unsecure.json -f https://raw.githubusercontent.com/zhaozhanqi/subdomain/master/route_edge.json

4. Create another service/route
  oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/routing/reencrypt/service_secure.json -f https://raw.githubusercontent.com/zhaozhanqi/subdomain/master/route_reen.json

5. # oc get route
NAME                 HOST/PORT               PATH      SERVICES           PORT      TERMINATION
aecured-edge-route   test-edge.example.com             service-unsecure   <all>     edge
route-reencrypt      test-reen.example.com             service-secure     <all>     reencrypt

6. access the edge route 

Actual results:
step 6: 
 curl --resolve test-edge.example.com:443:$router_ip https://test-edge.example.com -k
Hello-OpenShift-1 https-8443

Expected results:
1. step 6. should return 'Hello-OpenShift-1 http-8080'
2. step 4 route should mark as 'HostAlreadyClaimed'

Additional info:

Comment 1 Ram Ranganathan 2016-11-08 04:17:41 UTC
We don't displace hosts within the same owner namespace - so this is working as designed. Am still on the fence/mulling making this fix as it does introduce other issues we would need to fix (older->newer->older and newer->older->newer transitionary routes would give different statuses). 
If we do fix this, then bugz https://bugzilla.redhat.com/show_bug.cgi?id=1391338 would be related.

Comment 2 Ram Ranganathan 2016-11-08 22:33:31 UTC
Fixes in PR: https://github.com/openshift/origin/pull/11849

Comment 3 Troy Dawson 2016-11-11 19:33:18 UTC
This has been merged into ose and is in OSE v3.4.0.25 or newer.

Comment 5 zhaozhanqi 2016-11-14 02:18:31 UTC
Verified this issue on OSE v3.4.0.25

The later route will be as 'HostAlreadyClaimed'

Comment 7 errata-xmlrpc 2017-01-18 12:49:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:0066


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