Bug 1904010
Summary: | Ingress controller incorrectly routes traffic to non-ready pods/backends. | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | OpenShift BugZilla Robot <openshift-bugzilla-robot> |
Component: | Networking | Assignee: | Andrew McDermott <amcdermo> |
Networking sub component: | router | QA Contact: | Arvind iyengar <aiyengar> |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | urgent | ||
Priority: | urgent | CC: | aiyengar, amcdermo, aos-bugs, aos-network-edge-staff, arthur.barr, hongli, kshpak, openshift-bugs-escalate, rcarrier, yhe |
Version: | 4.6 | Keywords: | UpcomingSprint |
Target Milestone: | --- | ||
Target Release: | 4.6.z | ||
Hardware: | All | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-12-14 13:51:28 UTC | Type: | --- |
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: | 1903206 | ||
Bug Blocks: |
Description
OpenShift BugZilla Robot
2020-12-03 11:27:39 UTC
Tagging with UpcomingSprint while investigation is either ongoing or pending. Will be considered for earlier release versions when diagnosed and resolved. Moving this back to POST: https://bugzilla.redhat.com/show_bug.cgi?id=1903206#c9 Moving this back to POST: https://bugzilla.redhat.com/show_bug.cgi?id=1903206#c9 (and this time actually moving the state). The PR merge made into the "4.6.0-0.nightly-2020-12-05-144004" release version. With this payload, it is noted that the fix effectively resolves the problem where the PODs when in a "Not ready" state, the haproxy configuration has an empty backend pool and curl to the external route fails as expected. When one or all the pods are available and in a ready state, The Haproxy backend pool gets populated with the entries of the ready pod, and the external route traffic is sent to the specifically ready pods only: * With no pods in the "ready" state: ------- $ oc get clusterversion NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version 4.6.0-0.nightly-2020-12-05-144004 True False 14m Cluster version is 4.6.0-0.nightly-2020-12-05-144004 $ oc create -f nginx-demoshell-deployment.yaml deployment.apps/nginxdemoshello-deployment created $ oc create -f nginx-demoshell-service.yaml service/nginxdemoshello-service created $ oc create -f nginx-demoshell-route.yaml route.route.openshift.io/nginxdemoshello-route created $ oc get pods NAME READY STATUS RESTARTS AGE pod/nginxdemoshello-deployment-5b46f96478-557fh 0/1 Running 0 83s pod/nginxdemoshello-deployment-5b46f96478-kdzcr 0/1 Running 0 83s $ oc -n openshift-ingress exec router-default-6557c6f85f-9gbxx -- cat haproxy.config | grep -A15 -i "nginxdemoshello" backend be_http:test1:nginxdemoshello-route mode http option redispatch option forwardfor balance leastconn timeout check 5000ms http-request add-header X-Forwarded-Host %[req.hdr(host)] http-request add-header X-Forwarded-Port %[dst_port] http-request add-header X-Forwarded-Proto http if !{ ssl_fc } http-request add-header X-Forwarded-Proto https if { ssl_fc } http-request add-header X-Forwarded-Proto-Version h2 if { ssl_fc_alpn -i h2 } http-request add-header Forwarded for=%[src];host=%[req.hdr(host)];proto=%[req.hdr(X-Forwarded-Proto)] cookie 1384d216b7b1811db4625b94ff95ea56 insert indirect nocache httponly $ curl nginxdemoshello-drb-test1.apps.aiyengar-oc46-1904010-patched.qe.devcluster.openshift.com -I HTTP/1.0 503 Service Unavailable Pragma: no-cache Cache-Control: private, max-age=0, no-cache, no-store Connection: close Content-Type: text/html ------- * With one pod in "ready" state: ------ $ oc exec nginxdemoshello-deployment-5b46f96478-557fh -- touch /tmp/ready $ oc get pods -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES nginxdemoshello-deployment-5b46f96478-557fh 1/1 Running 0 5m42s 10.129.2.15 ip-10-0-179-34.us-east-2.compute.internal <none> <none> nginxdemoshello-deployment-5b46f96478-kdzcr 0/1 Running 0 5m42s 10.128.2.8 ip-10-0-154-227.us-east-2.compute.internal <none> <none> $ oc -n openshift-ingress exec router-default-6557c6f85f-9gbxx -- cat haproxy.config | grep -A15 -i "nginxdemoshello" backend be_http:test1:nginxdemoshello-route mode http option redispatch option forwardfor balance leastconn timeout check 5000ms http-request add-header X-Forwarded-Host %[req.hdr(host)] http-request add-header X-Forwarded-Port %[dst_port] http-request add-header X-Forwarded-Proto http if !{ ssl_fc } http-request add-header X-Forwarded-Proto https if { ssl_fc } http-request add-header X-Forwarded-Proto-Version h2 if { ssl_fc_alpn -i h2 } http-request add-header Forwarded for=%[src];host=%[req.hdr(host)];proto=%[req.hdr(X-Forwarded-Proto)] cookie 1384d216b7b1811db4625b94ff95ea56 insert indirect nocache httponly server pod:nginxdemoshello-deployment-5b46f96478-557fh:nginxdemoshello-service::10.129.2.15:8080 10.129.2.15:8080 cookie e619f7d64d6550afe74f2856a2fb035a weight 256 $ curl nginxdemoshello-drb-test1.apps.aiyengar-oc46-1904010-patched.qe.devcluster.openshift.com -I HTTP/1.1 200 OK Server: nginx/1.16.1 Date: Tue, 08 Dec 2020 11:30:54 GMT Content-Type: text/plain Content-Length: 175 Expires: Tue, 08 Dec 2020 11:30:53 GMT Cache-Control: no-cache Set-Cookie: 1384d216b7b1811db4625b94ff95ea56=e619f7d64d6550afe74f2856a2fb035a; path=/; HttpOnly ------ 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 (Moderate: OpenShift Container Platform 4.6.8 security and bug fix update), 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/RHSA-2020:5259 *** Bug 1908290 has been marked as a duplicate of this bug. *** |