Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1446627 - Routes that specify a path ending in a / do not route to subpaths correctly
Routes that specify a path ending in a / do not route to subpaths correctly
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Routing (Show other bugs)
3.5.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Ben Bennett
zhaozhanqi
:
Depends On: 1446360 1448218
Blocks:
  Show dependency treegraph
 
Reported: 2017-04-28 09:03 EDT by Ben Bennett
Modified: 2017-08-16 15 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Matching logic changed, and trailing slashed inadvertently broke. Consequence: Subpaths with trailing /s no longer work. Fix: Corrected the code that matches them. Result: The previous behavior was restored.
Story Points: ---
Clone Of: 1446360
Environment:
Last Closed: 2017-08-10 01:21:25 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Origin (Github) 13867 None None None 2017-04-28 09:03 EDT
Red Hat Product Errata RHEA-2017:1716 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.6 RPM Release Advisory 2017-08-10 05:02:50 EDT

  None (edit)
Description Ben Bennett 2017-04-28 09:03:39 EDT
+++ This bug was initially created as a clone of Bug #1446360 +++

Description of problem:

If a Route object specifies a path ending in a /, subpaths are not routed correctly


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


How reproducible:
Always

Steps to Reproduce:
1. Create a route with a path of / routing to a pod
2. Access the route's hostname at the following URLs:
  https://<host>
  https://<host>/
  https://<host>/test

Actual results:
The root paths work. The /test subpath fails to route

Expected results:
All three paths route correctly.


Additional info:

--- Additional comment from Jordan Liggitt on 2017-04-27 14:01:46 EDT ---

Fixed upstream in master in https://github.com/openshift/origin/pull/13867
Fixed upstream in 1.5 in https://github.com/openshift/origin/pull/13923
Fixed in 3.5 in https://github.com/openshift/ose/pull/726

Testcase:

Create three routes using the same host, routing to different pods (so you can identify which route served which request)
Route 1: path of /
Route 2: path of /subpath
Route 3: path of /subpath/

Ensure the following urls are served by the expected routes:

route 1:
https://<host>
https://<host>/
https://<host>/test

route 2:
https://<host>/subpath

route 3:
https://<host>/subpath/
https://<host>/subpath/subsubpath

--- Additional comment from Meng Bo on 2017-04-27 21:48:35 EDT ---

What if an user wants to allow to access the http(s)://<host>/ only but none of the subpath?

--- Additional comment from Jordan Liggitt on 2017-04-27 21:59:05 EDT ---

That is not an option today
Comment 1 Ben Bennett 2017-04-28 09:04:33 EDT
This is to track the fix that went in for 3.6.
Comment 3 zhaozhanqi 2017-05-30 23:30:05 EDT
verified this bug on v3.6.86


oc get route service-unsecure
NAME               HOST/PORT                                          PATH      SERVICES           PORT      TERMINATION   WILDCARD
service-unsecure   service-unsecure-default.0531-9ye.qe.rhcloud.com   /         service-unsecure   http                    None


$ curl service-unsecure-default.0531-9ye.qe.rhcloud.com
Hello-OpenShift-1 http-8080

curl service-unsecure-default.0531-9ye.qe.rhcloud.com/path/second/
second-test http-8080
 curl service-unsecure-default.0531-9ye.qe.rhcloud.com/path/
ocp-test http-8080
Comment 5 errata-xmlrpc 2017-08-10 01:21:25 EDT
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/RHEA-2017:1716

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