vitaly-kamluk/bitscout

No network connectivity inside Container Shell (WiFi)

Opened this issue · 2 comments

Hi,

I don't seem to have network connectivity inside the Container Shell with the latest Bitscout build. I am testing on a laptop at home over a WiFi connection which is successfully activated and I can use the Root Shell to successfully ping, apt update, install packages etc. When I go into the Container Shell, I can't ping anything. I can ping the 10.3.0.1 IP address but I can't ping external hosts, can't reach archive.ubuntu.com (sudo apt update) etc.

When I try Ethernet connection to my home router, everything works from within the Container Shell.. Anyone have any ideas ?

Thanks,
Akira

Hi, thanks for sharing this issue. I have confirmed that it does present when a WiFi connection is used. It was related due to late discovery of the network interface during boot, which in turn excluded WiFi interface from being applied general iptables rules.

I noticed that that once WiFi interface was configured, it gets discovered faster on the following boot, so I did have internet access in the container after a reboot. However, it's still a race condition and we'd rather fix it properly to make it work since the first boot.

I have changed the order of starting host-setup.service in a recent commit 85a687a, which calls /sbin/host-iptables and applies iptables rules. Now we make sure NetworkManager service starts first, activates the WiFi interface, and only then we create the iptables rules. Fixing the order did help me get connectivity from the first boot. It would be nice if you could fetch the latest code, rebuild and confirm that on your side too. Let me know if it doesn't work still!

Sorry for the delay. So I managed to pull down the latest code and rebuilt the image. I still got the same behaviour as before. Upon initially configuring WiFi, I wasn't able to get network connectivity in the container shell until I rebooted (thanks for that work-around!).