Bug 1570143 - [3.9] Wildcard routes take precedence over other routes that start with a number
Summary: [3.9] Wildcard routes take precedence over other routes that start with a number
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 3.6.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 3.9.z
Assignee: Ram Ranganathan
QA Contact: Meng Bo
URL:
Whiteboard:
Depends On: 1561752
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-20 17:49 UTC by Ben Bennett
Modified: 2022-08-04 22:20 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1561752
Environment:
Last Closed: 2018-05-21 07:15:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift origin issues 16724 0 None None None 2018-04-20 17:49:21 UTC
Origin (Github) 19219 0 None None None 2018-04-20 17:49:21 UTC
Red Hat Product Errata RHBA-2018:1628 0 None None None 2018-05-21 07:15:15 UTC

Description Ben Bennett 2018-04-20 17:49:22 UTC
+++ This bug was initially created as a clone of Bug #1561752 +++

Description of problem: when we enable this optional wildcard route: It takes precedence over other routes, rendering them unreachable, but we have noticed that it only overrides routes starting with a number.


Version-Release number of selected component (if applicable): kubernetes v1.6.1+5115d708d7

How reproducible: 100%


Steps to Reproduce:
1. https://gist.github.com/jmprusi/929ab4ffdf6dcda14dde704184421e80

curl service1.127.0.0.1.nip.io -> hits service1
curl random.127.0.0.1.nip.io -> hits route-wildcard, this is expected.
curl service2.127.0.0.1.nip.io -> hits service2
curl 3service127.0.0.1.nip.io -> hits route-wildcard, this is NOT expected


Additional info:

--- Additional comment from Eric Rich on 2018-03-28 15:59:29 EDT ---

A PR to fix this issue seems to be proposed: https://github.com/openshift/origin/pull/19076

--- Additional comment from Ram Ranganathan on 2018-04-09 15:26:09 EDT ---

Based on Clayton's review comments on the previous PR, 
created a new PR:  https://github.com/openshift/origin/pull/19219

--- Additional comment from Ram Ranganathan on 2018-04-12 14:11:42 EDT ---

Setting to modified (is that the right workflow, @ben/@mengbo?) as the PR got merged.

Comment 1 Ben Bennett 2018-04-20 17:51:19 UTC
@ramr: Can you backport this to OSE 3.9 please.

Comment 3 Ram Ranganathan 2018-04-23 18:58:22 UTC
Just spoke to Ben about this right now. On the original PR set, there was some comments and a follow on PR is in the works. 
So rather than merge an intermediate change - will merge the changes in based on the new PR (yet-to-be-created) getting approved.

Comment 4 Ram Ranganathan 2018-04-26 18:18:34 UTC
The second version of the original fix in origin is: https://github.com/openshift/origin/pull/19492

waiting for that to merge (in origin) before I backport this.

Comment 5 Ram Ranganathan 2018-05-07 23:50:59 UTC
@Ben, just realized a back port is going to require more cherry picks than I had initially thought. 

The template simplification changes (for backends) were done as part of 3.10 work and the fixes for the sorting are based on those template simplification changes. 

Should I cherry pick those changes as well? Otherwise we will have to make changes to the sort template helper code specifically for 3.9 - which does create some divergence. 

Let me know how you want me to proceed on this. My 2c is to pull in the template simplification changes. 
Thanks.

Comment 6 Ben Bennett 2018-05-08 18:19:36 UTC
@Ram: Let's just backport the sort in bash for this... I'm getting nervous if we have to backport too much.

Comment 7 Ram Ranganathan 2018-05-08 20:50:19 UTC
@Ben, cool - that is definitely safer. 

Created a PR: https://github.com/openshift/ose/pull/1252
Note: this is the original commit + fixes specific to OSE 3.9

Comment 12 errata-xmlrpc 2018-05-21 07:15:12 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-2018:1628

Comment 13 Ben Bennett 2018-05-29 14:59:55 UTC
*** Bug 1582875 has been marked as a duplicate of this bug. ***


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