You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here an example config that fails with Error checking network: Expected Route {Dst:{IP:198.18.128.0 Mask:ffff8000} GW:<nil>} not found in routing table
Using "cniVersion": "0.3.1" to bypass the check, the routes are created but with a gateway
# ip r
default via 198.18.0.1 dev eth0
198.18.0.0/17 via 198.18.0.1 dev eth0 src 198.18.66.190
198.18.0.1 dev eth0 scope link src 198.18.66.190
198.18.128.0/17 via 198.18.0.1 dev eth0
198.19.254.254 via 198.18.0.1 dev eth0
If I keep only the default routes (v4 & v6) it works, but I actually need the more precise routes as my full use case is with multus and being able to configure some extra interfaces with any routes (/1 included)
Looking at the code I fail to see why default routes are a special case:
Using ptp plugin with non default routes, we get the following error
when cri-o call CheckNetworkList():
```
Expected Route {Dst:{IP:198.18.128.0 Mask:ffff8000} GW:<nil>} not found in routing table
```
Using cniVersion 0.3.1 to bypass the check, we can see that the
route is added with a gateway
```
$ ip r
198.18.0.0/17 via 198.18.0.1 dev eth0 src 198.18.3.102
198.18.0.1 dev eth0 scope link src 198.18.3.102
198.18.128.0/17 via 198.18.0.1 dev eth0
```
If GW is nil only check if we have a route with a DST that matches, and
ignore the GW.
Fixescontainernetworking#886
Signed-off-by: Etienne Champetier <[email protected]>
I'm trying to switch from containerd to cri-o, and one big difference seems to be that cri-o call CheckNetworkList() https://github.com/cri-o/ocicni/blob/4fcbe80ee01fbc4c0401ae96537b3ee807c92c2c/pkg/ocicni/ocicni.go#L731
Here an example config that fails with
Error checking network: Expected Route {Dst:{IP:198.18.128.0 Mask:ffff8000} GW:<nil>} not found in routing table
Using
"cniVersion": "0.3.1"
to bypass the check, the routes are created but with a gatewayIf I keep only the default routes (v4 & v6) it works, but I actually need the more precise routes as my full use case is with multus and being able to configure some extra interfaces with any routes (/1 included)
Looking at the code I fail to see why default routes are a special case:
plugins/pkg/ip/utils_linux.go
Line 82 in 9f1f9a5
related review: #264 (comment)
The text was updated successfully, but these errors were encountered: