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