KatharaFramework / Kathara

A lightweight container-based network emulation system.
https://www.kathara.org/
GNU General Public License v3.0
462 stars 64 forks source link

Container Creation failed, rp_filter not found #278

Closed whatever4711 closed 8 months ago

whatever4711 commented 8 months ago

Operating System

Linux Mint 21.1

Kathará Version

3.7.3

Bug Description

Unfortunately, nodes are not starting and fail with an error that rp_filter can not be setup on eth0 or any other interface.

CRITICAL (APIError) 400 Client Error for http+docker://localhost/v1.45/containers/a00dd39a1ffb579f39752a080c9451c3c392719fe54f41c88d6f4d7bb70debd4/start: Bad Request ("failed to create task for container: failed to create shim task: OCI
runtime create failed: runc create failed: unable to start container process: error during container init: open /proc/sys/net/ipv4/conf/eth0/rp_filter: no such file or directory: unknown")`

Steps To Reproduce

Start a machine with kathara vstart -n test --eth 0:A -i kathara/base

Expected Behavior

A running node with rp_filter being setup.

Check Command Output

┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                               System Check                                                               │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Current Manager is:             Docker (Kathara)
Manager version is:             26.0.0
Python version is:              3.11.8 (main, Feb 25 2024, 16:39:33) [GCC 11.4.0]
Kathara version is:             3.7.3
Operating System version is:    Linux-6.5.0-21-generic-x86_64
[Deploying devices]   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1/1
[Deleting devices]   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1/1
✓ Container run successfully.
tcaiazzi commented 8 months ago

Hi @whatever4711,

Thanks for signaling the error and for the help!

After some debugging to make all work on all the platforms, we found that there is no need to set the value of rp_filter to eth0 specifically. Indeed, the all parameter changes the value on all the active interfaces.

You can see the final solution in 833f3e6.

I will make a release with the fix tomorrow (I hope 😇).

Thanks! ❤️