Bug 1395545

Summary: the route still can be reached via F5 server after deleting related service
Product: OpenShift Container Platform Reporter: Hongan Li <hongli>
Component: NetworkingAssignee: Rajat Chopra <rchopra>
Networking sub component: router QA Contact: zhaozhanqi <zzhao>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: aos-bugs, bbennett, bmeng, tdawson
Version: 3.4.0Keywords: Regression
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-18 12:55:14 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:

Description Hongan Li 2016-11-16 07:32:05 UTC
Description of problem:
create pod, service and route, make sure the route can be reached via F5 server. Then delete the service, but the route still can be reached.
Checked the pools and polices on F5, found that the service was not removed from the pools after deleting service.

Version-Release number of selected component (if applicable):
openshift v3.4.0.26+f7e109e
kubernetes v1.4.0+776c994
etcd 3.1.0-rc.0


How reproducible:
always

Steps to Reproduce:
1. oadm router f5router...
2. Create pod, service and route.
   #oc create -f  https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/routing/list_for_pods.json
   #oc expose svc service-unsecure 
3. curl the route.
   #curl --resolve $route:80:$f5-ip http://$route
4. delete the service
   #oc delete sve servie-unsecure
5. repeat step 3

Actual results:
the route can be reached in both step3 and step5.

Expected results:
the route should be unreachable in step5 since the service and endpoint has been deleted.

Additional info:
after deleting the service, no endpoints for the route
[root@hongli-34-master ~]# oc describe route
Name:			service-unsecure
Namespace:		u1p1
Created:		2 hours ago
Labels:			name=service-unsecure
Annotations:		openshift.io/host.generated=true
Requested Host:		service-unsecure-u1p1.router.default.svc.cluster.local
			  exposed on router f5router 2 hours ago
Path:			<none>
TLS Termination:	<none>
Insecure Policy:	<none>
Endpoint Port:		http

Service:	service-unsecure
Weight:		100 (100%)
Endpoints:	<error: endpoints "service-unsecure" not found>

Comment 1 openshift-github-bot 2016-11-17 15:27:40 UTC
Commit pushed to master at https://github.com/openshift/origin

https://github.com/openshift/origin/commit/b1d8e0b9ede8d7684e84fa50d99887c8c9d26f2d
Fixes bug 1395545 [link](https://bugzilla.redhat.com/show_bug.cgi?id=1395545)
empty the pool, or delete the pool when endpoints are deleted

Comment 2 Ben Bennett 2016-11-17 21:34:54 UTC
3.4 cherry-pick PR https://github.com/openshift/origin/pull/11956

Comment 3 Troy Dawson 2016-11-18 17:37:57 UTC
This has been merged into ocp and is in OCP v3.4.0.28 or newer.

Comment 5 Hongan Li 2016-11-22 02:30:50 UTC
verified in OCP v3.4.0.28, the bug has been fixed.

Comment 7 errata-xmlrpc 2017-01-18 12:55:14 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-2017:0066