Bug 1369358

Summary: Could set non-existent service for route backends
Product: OpenShift Container Platform Reporter: Yan Du <yadu>
Component: NetworkingAssignee: Ben Bennett <bbennett>
Networking sub component: router QA Contact: zhaozhanqi <zzhao>
Status: CLOSED NOTABUG Docs Contact:
Severity: low    
Priority: medium CC: aos-bugs
Version: 3.3.0   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-21 17:15:11 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:

Description Yan Du 2016-08-23 08:10:45 UTC
Description of problem:
Create a route, then set non-exist service for the route backends. No warning show up


Version-Release number of selected component (if applicable):
oc v3.3.0.24-dirty
kubernetes v1.3.0+507d3a7


How reproducible:
Always


Steps to Reproduce:
1. Create a project then create a route with any service in current project
# oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/routing/abrouting/passthough/abrouting_pass_route.json
2. # oc set route-backends pth-route noexist1=1  noexist2=3
3. Check the backends


Actual results:
# oc set route-backends pth-route
NAME              KIND     TO        WEIGHT
routes/pth-route  Service  noexist1  1 (25%)
routes/pth-route  Service  noexist2  3 (75%)


Expected results:
Got some warning that the service doesn't exist.


Additional info:
If we set the backends to one exist service and one non-exist service, the non-exist service will not be accessed.

Comment 1 Ben Bennett 2016-09-21 17:15:11 UTC
This functions as designed.  You can create a route to a service that doesn't exist.  That just behaves like a route that points to a service with no endpoints.

That behavior lets you create a route and then create the service.  It also lets you delete a service that a route is pointing to.  If we had to check everything for consistency, that would be expensive.