Bug 1760776 - Incorrect reconciliation of OpenShift Route based on K8s Ingress
Summary: Incorrect reconciliation of OpenShift Route based on K8s Ingress
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Routing
Version: 3.11.0
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: ---
: 4.4.0
Assignee: Miciah Dashiel Butler Masters
QA Contact: Hongan Li
URL:
Whiteboard:
Depends On:
Blocks: 1763340 1817463
TreeView+ depends on / blocked
 
Reported: 2019-10-11 10:10 UTC by amit anjarlekar
Modified: 2021-09-12 05:29 UTC (History)
7 users (show)

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.
Clone Of:
: 1763340 1817463 (view as bug list)
Environment:
Last Closed: 2020-05-13 21:52:04 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift openshift-controller-manager pull 53 0 'None' closed Bug 1760776: ingress: targetPortForService: Use port name only 2020-11-09 07:39:35 UTC
Red Hat Product Errata RHBA-2020:0581 0 None None None 2020-05-13 21:52:08 UTC

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


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