Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1760776

Summary: Incorrect reconciliation of OpenShift Route based on K8s Ingress
Product: OpenShift Container Platform Reporter: amit anjarlekar <aanjarle>
Component: NetworkingAssignee: Miciah Dashiel Butler Masters <mmasters>
Networking sub component: router QA Contact: Hongan Li <hongli>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: aos-bugs, dhansen, dmace, gferrazs, mmasters, skrenger, ssadhale
Version: 3.11.0   
Target Milestone: ---   
Target Release: 4.4.0   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: An Ingress object specifies backends, where each backend specifies a target port name or number on some Service object. The Service's port in turn specifies a target port on a Pod object. Similarly to an Ingress backend, a Route object may specify a target port on a Service. When translating an Ingress backend to a Route, the ingress-to-route controller used the Service port's target port for the Route's target port when it should have used the Service port's name or number. Consequence: If an Ingress object used a Service port that had a target port with a different name or number from the Service port's name or number, the ingress-to-route controller could produce an invalid Route object. Fix: When translating the target port of an Ingress backend to the target port for a Route, the ingress-to-route controller now uses the Service port's name rather than its target port, or omits the target port entirely if it is not needed (as in the case of a Service that has only 1 port). Result: Ingress objects are now correctly translated to Route objects even if an Ingress backend targets a Service port that has a different name or number from the Service port's target port.
Story Points: ---
Clone Of:
: 1763340 1817463 (view as bug list) Environment:
Last Closed: 2020-05-13 21:52:04 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: 1763340, 1817463    

Description amit anjarlekar 2019-10-11 10:10:21 UTC
Description of problem:

Customers word from case description :

One of our developers created a ticket for openshift origin: 

https://github.com/openshift/origin/issues/23937 

Is there a solution from redhat available for his issue?

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

OpenShift Master: v3.11.141
Kubernetes Master: v1.11.0+d4cacc0

How reproducible:

Always as suggested in above github link.

Steps to Reproduce:

Refer https://github.com/openshift/origin/issues/23937 

Actual results:

Refer https://github.com/openshift/origin/issues/23937 

Expected results:

Refer https://github.com/openshift/origin/issues/23937 

Additional info:

Will link the case to BZ for more information.

Comment 2 Dan Mace 2019-11-01 00:02:47 UTC
Miciah, would you mind taking this one over? You've done a huge amount of work on it already.

Comment 6 Dan Mace 2020-01-17 17:52:35 UTC
https://github.com/openshift/openshift-controller-manager/pull/53 has been merged for a while now, looks like the bug fell out of sync with GitHub. I fixed it.

Comment 8 Hongan Li 2020-02-10 12:17:12 UTC
Verified with 4.4.0-0.nightly-2020-02-09-220310 and the issue has been fixed.

the route is created as below:
  spec:
    host: app.test.com
    path: /
    port:
      targetPort: http-default
    to:
      kind: Service
      name: app

Comment 11 Dan Mace 2020-03-26 11:47:33 UTC
Created https://bugzilla.redhat.com/show_bug.cgi?id=1817463 to track a possible 3.11 backport

Comment 13 Daneyon Hansen 2020-05-08 18:50:22 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=1763340 is being used to track a possible 3.11 backport.

Comment 14 errata-xmlrpc 2020-05-13 21:52:04 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-2020:0581