Bug 1380704
| Summary: | changing "to" service via "oc edit route" makes the old endpoints stuck in haproxy.config | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Marek Schmidt <maschmid> |
| Component: | Networking | Assignee: | Ben Bennett <bbennett> |
| Networking sub component: | router | QA Contact: | zhaozhanqi <zzhao> |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | high | ||
| Priority: | unspecified | CC: | aos-bugs, bbennett, bleanhar, bmeng, bperkins, eparis, pruan, vlaad |
| Version: | 3.3.0 | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
Cause: Services weren't being updated correctly on an edit.
Consequence: When you edited a service, both the old and new values for the services would remain, so requests would still go to the old service.
Fix: Change the code to handle the update correctly.
Result: The routes only send traffic to the new service.
|
Story Points: | --- |
| Clone Of: | Environment: |
openshift v3.3.0.32
kubernetes v1.3.0+52492b4
|
|
| Last Closed: | 2016-10-06 08:54:48 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: | |||
v3.3.0.34 has been released which fixes this bug however the process that automatically moves bugs to CLOSED status failed for this particular bug. 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-2016:1987 |
Description of problem: Having two services (foo, bar) with one pod each $ oc get endpoints NAME ENDPOINTS AGE bar 10.1.1.4:8080 1m foo 10.1.3.2:8080 1m Having a route pointing to the "foo" service $ oc get route NAME HOST/PORT PATH SERVICE TERMINATION LABELS route route.maschmid.apps.devel.xpaas foo After changing the route via "oc edit route" to change the route to point to the "bar" service instead, The old endpoint becomes stuck in the haproxy.config of the haproxy router, > backend be_http_maschmid_route > > mode http > option redispatch > option forwardfor > > balance leastconn > > timeout check 5000ms > http-request set-header X-Forwarded-Host %[req.hdr(host)] > http-request set-header X-Forwarded-Port %[dst_port] > http-request set-header X-Forwarded-Proto http if !{ ssl_fc } > http-request set-header X-Forwarded-Proto https if { ssl_fc } > > cookie 5c71f45f854552d2777d96bf5e471142 insert indirect nocache httponly > > http-request set-header Forwarded for=%[src];host=%[req.hdr(host)];proto=%[req.hdr(X-Forwarded-Proto)] > > server f74891b0593f7236790c6e7b52a2a107 10.1.1.4:8080 check inter 5000ms cookie f74891b0593f7236790c6e7b52a2a107 weight 100 > > server 013c708cebd0ecf0d065f4af8e8fdb21 10.1.3.2:8080 check inter 5000ms cookie 013c708cebd0ecf0d065f4af8e8fdb21 weight 100 (note that only 10.1.1.4:8080 is expcted to be there after the "oc edit route") Also, when in this state, deleting the route makes the endpoint (and the whole be_http_maschmid_route backend) still be present in the haproxy.config Version-Release number of selected component (if applicable): openshift3/ose-haproxy-router:v3.3.0.29 How reproducible: Always Steps to Reproduce: 1. create two services foo, bar, each with one pod 2. expose foo service as a route 3. oc edit route to switch "to" service from "foo" to "bar" 4. look at haproxy haproxy.config Actual results: Both foo and bar endpoints are present as the backend for the route Expected results: Only the bar endpoint should be present as the backend for the route Additional info: