Bug 1261843 - The later route will become used if the older one was deleted when those two routes are same
The later route will become used if the older one was deleted when those two ...
Status: CLOSED DUPLICATE of bug 1243664
Product: OpenShift Origin
Classification: Red Hat
Component: Routing (Show other bugs)
3.x
All All
medium Severity low
: ---
: ---
Assigned To: Ram Ranganathan
zhaozhanqi
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-10 05:55 EDT by zhaozhanqi
Modified: 2016-02-01 09:48 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-01 09:48:50 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description zhaozhanqi 2015-09-10 05:55:34 EDT
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 14:55:46 EDT
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-23 20:12:25 EDT
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-23 20:15:47 EDT
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 09:48:50 EST

*** 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.