balena-os / leviathan-worker

The worker layer for Leviathan including worker plugins QemuKit & AutoKit
Apache License 2.0
6 stars 4 forks source link

Allow worker to disable DUT internet connectivity, while maintaining local connectivity #5

Open rcooke-warwick opened 2 years ago

rcooke-warwick commented 2 years ago

We have test cases for the OS now which require the internet connection of the DUT to be disabled.

To do this with the testbot, ip forwarding can be disabled. For qemu devices there's no way to do this, as the tests have no way to execute a command to disable ip forwarding on the worker container that hosts the qemu DUT.

jakogut commented 2 years ago

@rcooke-warwick Disabling IP forwarding should work the exact same with QEMU as with a physical testbot, I think? :thinking:

jakogut commented 2 years ago

I tested this and it doesn't. Seems we'll need to use iptables to disable external connectivity.

rcooke-warwick commented 2 years ago

@jakogut the other problem is the tests that are running in the core container don't have a way currently to get into the worker container to disable it. Another downside of the 2 container approach we're running here