Bug 1380704 - changing "to" service via "oc edit route" makes the old endpoints stuck in haproxy.config
Summary: changing "to" service via "oc edit route" makes the old endpoints stuck in ha...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Ben Bennett
QA Contact: zhaozhanqi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-30 11:46 UTC by Marek Schmidt
Modified: 2022-08-04 22:20 UTC (History)
8 users (show)

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.
Clone Of:
Environment:
openshift v3.3.0.32 kubernetes v1.3.0+52492b4
Last Closed: 2016-10-06 08:54:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift ose pull 388 0 None None None 2016-09-30 13:40:25 UTC
Red Hat Product Errata RHBA-2016:1987 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.3.0.34 images bug fix update 2016-10-04 17:38:20 UTC

Description Marek Schmidt 2016-09-30 11:46:32 UTC
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:

Comment 4 Scott Dodson 2016-10-04 14:31:56 UTC
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.

Comment 5 errata-xmlrpc 2016-10-06 08:54:48 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-2016:1987


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