- 
                Notifications
    You must be signed in to change notification settings 
- Fork 485
Closed
Labels
Description
When starting kube-router v0.3.1 on an up-to-date Archlinux system it fails with the following messages:
I0630 23:50:37.444048   13682 network_services_controller.go:840] sync ipvs services took 9.644662ms
E0630 23:50:37.444200   13682 network_services_controller.go:426] Error syncing IPVS services: Failed setup PBR for DSR due to: Failed to verify required default route exists. Failed to setup policy routing required for DSR due to exit status 2
F0630 23:50:37.444272   13682 network_services_controller.go:349] Failed to perform initial full sync Failed setup PBR for DSR due to: Failed to verify required default route exists. Failed to setup policy routing required for DSR due to exit status 2
It looks like the error occurs here:
https://github.com/cloudnativelabs/kube-router/blob/v0.3.1/pkg/controllers/proxy/network_services_controller.go#L2138
Running the command manually also returns 2:
$ sudo ip route list table 78; echo $?
Error: ipv4: FIB table does not exist.
Dump terminated
2
The current iproute2 version on Arch is v5.1.0.
I have found this discussion that mentions that the ip command changed it's behaviour regarding exit codes for non-existing tables sometime before5.0:
https://www.mail-archive.com/netdev@vger.kernel.org/msg291763.html
Adding a simple route to the table fixed the issue:
$ sudo ip route add 192.168.2.0/24 via 192.168.1.1 table 78
$ sudo ip route list table 78; echo $?
192.168.2.0/24 via 192.168.1.1 dev enp1s0
0