New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow using wireless interfaces with type = phys #52

Closed
stgraber opened this Issue Sep 29, 2013 · 5 comments

Comments

3 participants
@stgraber
Member

stgraber commented Sep 29, 2013

Currently using:
lxc.network.type = phys
lxc.network.link = wlan0

Will fail as apparently moving one of those is slightly different than moving a standard eth interface, it'd be good to have lxc and lxc-device detect those and do the right thing.

@stgraber

This comment has been minimized.

Show comment
Hide comment
@stgraber

stgraber Oct 19, 2013

Member

The LXC code is actually correct with regard to wireless interfaces, the kernel is simply preventing this from happening apparently because of:
http://www.spinics.net/lists/linux-wireless/msg28494.html

Closing the bug as there's nothing that can be done on LXC's side.

Member

stgraber commented Oct 19, 2013

The LXC code is actually correct with regard to wireless interfaces, the kernel is simply preventing this from happening apparently because of:
http://www.spinics.net/lists/linux-wireless/msg28494.html

Closing the bug as there's nothing that can be done on LXC's side.

@stgraber stgraber closed this Oct 19, 2013

@cernekee

This comment has been minimized.

Show comment
Hide comment
@cernekee

cernekee Jun 16, 2015

Contributor

Now that lxc-device supports migrating wireless interfaces via iw, does it make sense to reopen this bug and add the same functionality to lxc-start?

Contributor

cernekee commented Jun 16, 2015

Now that lxc-device supports migrating wireless interfaces via iw, does it make sense to reopen this bug and add the same functionality to lxc-start?

@stgraber

This comment has been minimized.

Show comment
Hide comment
@stgraber

stgraber Jun 18, 2015

Member

I thought that already worked today so long as you make sure to list phy0 or whatever the name of the physical device is first.

Member

stgraber commented Jun 18, 2015

I thought that already worked today so long as you make sure to list phy0 or whatever the name of the physical device is first.

@cernekee

This comment has been minimized.

Show comment
Hide comment
@cernekee

cernekee Jun 23, 2015

Contributor

Is this what you're suggesting?

lxc.network.type = phys
lxc.network.name = phy0
lxc.network.link = phy0
lxc.network.flags = up

lxc.network.type = phys
lxc.network.name = wlan0
lxc.network.link = wlan0
lxc.network.flags = up

Unfortunately LXC was not able to look up the phy0 interface (it doesn't actually exist in ifconfig -a either):

# lxc-start -F -f /mnt/stateful_partition/lxc/bb/config --name busybox
lxc-start: conf.c: instantiate_phys: 2845 failed to retrieve the index for phy0
lxc-start: conf.c: lxc_create_network: 2955 failed to create netdev
lxc-start: start.c: lxc_spawn: 914 failed to create the network
lxc-start: start.c: __lxc_start: 1164 failed to spawn 'busybox'
lxc-start: lxc_start.c: main: 344 The container failed to start.
lxc-start: lxc_start.c: main: 348 Additional information can be obtained by setting the --logfile and --logpriority options.

but lxc-device --name=busybox -- add wlan0 successfully transferred the device after the container was started.

Contributor

cernekee commented Jun 23, 2015

Is this what you're suggesting?

lxc.network.type = phys
lxc.network.name = phy0
lxc.network.link = phy0
lxc.network.flags = up

lxc.network.type = phys
lxc.network.name = wlan0
lxc.network.link = wlan0
lxc.network.flags = up

Unfortunately LXC was not able to look up the phy0 interface (it doesn't actually exist in ifconfig -a either):

# lxc-start -F -f /mnt/stateful_partition/lxc/bb/config --name busybox
lxc-start: conf.c: instantiate_phys: 2845 failed to retrieve the index for phy0
lxc-start: conf.c: lxc_create_network: 2955 failed to create netdev
lxc-start: start.c: lxc_spawn: 914 failed to create the network
lxc-start: start.c: __lxc_start: 1164 failed to spawn 'busybox'
lxc-start: lxc_start.c: main: 344 The container failed to start.
lxc-start: lxc_start.c: main: 348 Additional information can be obtained by setting the --logfile and --logpriority options.

but lxc-device --name=busybox -- add wlan0 successfully transferred the device after the container was started.

@nimaaghli

This comment has been minimized.

Show comment
Hide comment
@nimaaghli

nimaaghli Jun 10, 2016

is this problem solved ? i can use lxc-device to add wlan but i dont want to do it each time i start container! is there anywaya to do same thing in config file of container ?

nimaaghli commented Jun 10, 2016

is this problem solved ? i can use lxc-device to add wlan but i dont want to do it each time i start container! is there anywaya to do same thing in config file of container ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment