Red Hat Bugzilla – Bug 1261843
The later route will become used if the older one was deleted when those two routes are same
Last modified: 2016-02-01 09:48:50 EST
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):
openshift/origin-haproxy-router latest 7462c42450fb
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
4. Delete the 'route-edge' route
oc delete route route-edge
5. rsh into router and check mapping file again
the file 'os_edge_http_be.map' is empty
The other record route 'test2' should be written to file os_edge_http_be.map
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
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.
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.
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.
*** This bug has been marked as a duplicate of bug 1243664 ***