haproxytech / vmware-haproxy

Apache License 2.0
52 stars 25 forks source link

Ensure link-scoped routes are deleted when route-tables.service is shut down #10

Open brakthehack opened 3 years ago

brakthehack commented 3 years ago

As part of d6124637d77e60f9c8d53fb353eb4af071e75a72 we created linked-scoped routes that send traffic out the adjacent L2 network. This required a new routing rule to be added into route-tables.cfg here: https://github.com/haproxytech/vmware-haproxy/commit/d6124637d77e60f9c8d53fb353eb4af071e75a72#diff-321d57ac6a7554b516a6365a1d4b53a72f2ffa8b3ba114aa3f6298b7ce2486fdR336

When the route-tables.service is restarted, we expect that the routes are cleared out and then re-added. Instead, it seems this route lingers inside the active route tables preventing the service to delete the route table and re-add the routes later. We need to revisit this logic to either fix the bug or simply make the route deletion logic less brittle.

Another option is to move this entire configuration into systemd-networkd and have it program routes for us.