Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kube-router fails to setup policy routing for DSR #750

Closed
M3t0r opened this issue Jul 1, 2019 · 0 comments · Fixed by #865
Closed

kube-router fails to setup policy routing for DSR #750

M3t0r opened this issue Jul 1, 2019 · 0 comments · Fixed by #865

Comments

@M3t0r
Copy link

M3t0r commented Jul 1, 2019

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/[email protected]/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
ldx added a commit to ldx/kube-router that referenced this issue Apr 2, 2020
The behavior of iproute2 changed in 5.0 as described in cloudnativelabs#750: now if a
table has not been created, `ip route list table <table>` will produce a
non-zero exit code.

It's not really needed to check tables via `list` anyway, since they
will be created by iproute2 when needed on first use. So relax error
handling for `ip route list table`, and remove it completely when a
table might be missing.

This fixes cloudnativelabs#750
murali-reddy pushed a commit that referenced this issue Apr 23, 2020
The behavior of iproute2 changed in 5.0 as described in #750: now if a
table has not been created, `ip route list table <table>` will produce a
non-zero exit code.

It's not really needed to check tables via `list` anyway, since they
will be created by iproute2 when needed on first use. So relax error
handling for `ip route list table`, and remove it completely when a
table might be missing.

This fixes #750
CertainLach added a commit to CertainLach/kube-router that referenced this issue Apr 26, 2020
aauren added a commit that referenced this issue Apr 26, 2020
Fix for same issue as #750, but for network_routes_controller
mrueg pushed a commit to mrueg/kube-router that referenced this issue May 10, 2020
FabienZouaoui pushed a commit to SirDataFR/kube-router that referenced this issue May 11, 2020
The behavior of iproute2 changed in 5.0 as described in cloudnativelabs#750: now if a
table has not been created, `ip route list table <table>` will produce a
non-zero exit code.

It's not really needed to check tables via `list` anyway, since they
will be created by iproute2 when needed on first use. So relax error
handling for `ip route list table`, and remove it completely when a
table might be missing.

This fixes cloudnativelabs#750
FabienZouaoui pushed a commit to SirDataFR/kube-router that referenced this issue May 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants