Bug 1369358 - Could set non-existent service for route backends
Summary: Could set non-existent service for route backends
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Ben Bennett
QA Contact: zhaozhanqi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-23 08:10 UTC by Yan Du
Modified: 2022-08-04 22:20 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-21 17:15:11 UTC
Target Upstream Version:


Attachments (Terms of Use)

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.


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