Bug 1261843 - The later route will become used if the older one was deleted when those two routes are same
Summary: The later route will become used if the older one was deleted when those two ...
Keywords:
Status: CLOSED DUPLICATE of bug 1243664
Alias: None
Product: OKD
Classification: Red Hat
Component: Routing
Version: 3.x
Hardware: All
OS: All
medium
low
Target Milestone: ---
: ---
Assignee: Ram Ranganathan
QA Contact: zhaozhanqi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-10 09:55 UTC by zhaozhanqi
Modified: 2016-02-01 14:48 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-01 14:48:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description zhaozhanqi 2015-09-10 09:55:34 UTC
Description of problem:
Create two same hostname routes, if the older one was deleted, the other one did not become available.

Version-Release number of selected component (if applicable):
oc v1.0.5-318-g1fb52fd
kubernetes v1.1.0-alpha.0-1605-g44c91b1
openshift/origin-haproxy-router    latest      7462c42450fb

How reproducible:
always

Steps to Reproduce:
1. Create router with the latest haproxy-router images
2. Create two same hostname with different metadata name
   # oc get route
NAME         HOST/PORT         PATH      SERVICE       LABELS    TLS TERMINATION
route-edge   www.example.com             hello-nginx             edge
test2        www.example.com             hello-nginx             edge
3. rsh into router and check mapping file
   # cat os_edge_http_be.map 
   www.example.com default_route-edge
4. Delete the 'route-edge' route
   oc delete route route-edge
5. rsh into router and check mapping file again
          

Actual results:
   step 5. 
   the file 'os_edge_http_be.map' is empty

Expected results:
  step 5. 
  The other record route 'test2' should be written to file os_edge_http_be.map

Additional info:
 seems this need one event to trigger it for example:  if we create anyone route this time, then this record will be added to os_edge_http_be.map

Comment 1 Paul Weil 2015-09-11 18:55:46 UTC
The second route you defined was rejected by the router and not held in a queue waiting to take over the host if the first route was deleted.  If you run your router with a higher loglevel you should see something like:

I0911 18:51:36.216168       1 unique_host.go:99] Route default/route2 cannot take www.example.com from default/route1
E0911 18:51:36.216176       1 controller.go:83] route default/route1 holds www.example.com and is older than default/hello-pod


This needs to be better reporting to the user.  I think the actual use case here is that the user would recognize the duplicate and delete the bad route. Not let it sit and wait.

Comment 2 Ram Ranganathan 2015-09-24 00:12:25 UTC
This would probably be mitigated by just rejecting the second route.

At route addition/creation time check a registry (we could possibly appropriate the 
cluster internal skydns service for this registry) for duplicate entries and reject
if its a duplicate. And of course, add/deletes/modifications to a route need to
update that skydns registry.

Comment 3 Ram Ranganathan 2015-09-24 00:15:47 UTC
Note on this bug's severity - marking this as low because in the first place the duplicate route is not even in the traffic mix. Bump up if you disagree.

Comment 4 Eric Paris 2016-02-01 14:48:50 UTC

*** This bug has been marked as a duplicate of bug 1243664 ***


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