pppoe fails inside container

Bug #1474047 reported by god on 2015-07-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Undecided
Unassigned

Bug Description

I've created privileged lxc container on ubuntu 15.04 x86_64 (sudo lxc-create...) added their ethernet interface connected to dsl modem - so far so good: pppoe-discovery from inside the container recognoze it, pppoeconf is able to configure it.

The problem is that the container network fails to start automatically during the boot due to missing /dev/ppp device.

I've added following line to the container config:
lxc.cgroup.devices.allow = c 108:0 rwm

On the host device is available:
ls -alh /dev/ppp
crw------- 1 root root 108, 0 Jul 13 17:37 /dev/ppp

But inside the container there's nothing. Even more curious - if I manually call mknod from withing the container than dsl connection is established just fine:
sudo lxc-attach -n mycontainer -- mknod /dev/ppp c 108 0

Serge Hallyn (serge-hallyn) wrote :

Thanks for the report.

This actually isn't a bug. The lxc.cgroup.devices.allow line allows your container to create and use the device, but doesn't automatically create it. Assuming you are using the defaults with lxc.autodev set, you can have it be automatically created by either adding a lxc.mount.entry to bind-mount it from the host to the container, i.e.

lxc.mount.entry = /dev/ppp dev/ppp none bind,optional,create=file

or adding it to a lxc.hook.autodev hook.

If you want to turn this into a feature request for a 'persistent' flag for lxc-device, that could be useful, though I think there were reasons we didn't do that. Please comment if that's what you want, else I'm marking it invalid.

Changed in lxc (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers