You are not logged in.

#1 2017-06-29 15:49:45

Toun
Member
Registered: 2017-06-29
Posts: 8

Cannot add wireless interface to nspawn container : Invalid argument

Hello,

I have a systemd container which I would like to setup as a softare access point (as described on the wiki). The container has a separate IP from the host, with a bridge linked to an ethernet interface. Now, I'm trying to move my wireless interface into the container to use it for the access point. But I can't get systemd to boot the container. It fails with the following syslog:

Jun 29 17:55:02 server systemd[1]: Starting Container wifiaccesspoint...
Jun 29 17:55:02 server systemd-nspawn[7141]: Failed to move interface wlp7s0 to namespace: Invalid argument
Jun 29 17:55:02 server systemd[1]: systemd-nspawn@wifiaccesspoint.service: Main process exited, code=exited, status=1/FAILURE
Jun 29 17:55:02 server systemd[1]: systemd-nspawn@wifiaccesspoint.service: Killing process 7143 (systemd-nspawn) with signal SIGKILL.
Jun 29 17:55:02 server systemd[1]: systemd-nspawn@wifiaccesspoint.service: Killing process 7143 (systemd-nspawn) with signal SIGKILL.
Jun 29 17:55:02 server systemd[1]: Failed to start Container wifiaccesspoint.
Jun 29 17:55:02 server systemd[1]: systemd-nspawn@wifiaccesspoint.service: Unit entered failed state.
Jun 29 17:55:02 server systemd[1]: systemd-nspawn@wifiaccesspoint.service: Failed with result 'exit-code'.

This only happens with my wireless interface (which BTW is a RTL8812AE 802.11ac). All my other ethernet interfaces can be moved without problems. In the host, the WiFi interface also works well (working hostapd access point).

Here's my container config /etc/systemd/nspawn/wifiaccesspoint.nspawn:

[Exec]
Boot=true

[Files]
Bind=/var/cache/pacman/pkg

[Network]
Bridge=bridge0
Interface=wlp7s0

After digging a bit in the code, I found that this error was probably thrown from this code. The fact that the error is an Invalid argument makes me think that this could be a bug in systemd.

Any idea on what could be wrong with my interface, or with systemd?

Thanks

Last edited by Toun (2017-06-29 15:57:42)

Offline

Board footer

Powered by FluxBB