
Tengo un contenedor acoplable en el que estoy intentando ejecutar pppd. El núcleo del host tiene CONFIG_PPP=y
. Estoy configurando el dispositivo ppp así:
mkdir /run/container/dev
mknod /run/container/dev c 108 0
... add some more devices here ...
Luego comienzo el contenedor con un montaje de volumen de /run/container/dev:/dev
. El contenedor se ejecuta --privileged
y los procesos dentro del contenedor se ejecutan como root.
Cuando intento ejecutar pppd dentro del contenedor, falla:
/ # pppd
Couldn't open the /dev/ppp device: Operation not permitted
pppd: Sorry - this system lacks PPP kernel support
strace
sugiere que el problema está EPERM
al intentar abrir /dev/ppp
:
openat(AT_FDCWD, "/dev/ppp", O_RDWR|O_LARGEFILE) = -1 EPERM (Operation not permitted)
getpid() = 76
sendto(3, "<27>Jul 14 09:55:08 pppd[76]: Co"..., 89, 0, NULL, 0) = -1 ENOTCONN (Socket not connected)
connect(3, {sa_family=AF_UNIX, sun_path="/dev/log"}, 12) = -1 EPROTOTYPE (Protocol wrong type for socket)
write(1, "Couldn't open the /dev/ppp devic"..., 58Couldn't open the /dev/ppp device: Operation not permitted) = 58
write(1, "\n", 1
) = 1
writev(2, [{iov_base="pppd: Sorry - this system lacks "..., iov_len=52}, {iov_base=NULL, iov_len=0}], 2pppd: Sorry - this system lacks PPP kernel support
) = 52
getpid() = 76
sendto(3, "<27>Jul 14 09:55:08 pppd[76]: So"..., 75, 0, NULL, 0) = -1 ENOTCONN (Socket not connected)
connect(3, {sa_family=AF_UNIX, sun_path="/dev/log"}, 12) = -1 EPROTOTYPE (Protocol wrong type for socket)
exit_group(4) = ?
¿Que me estoy perdiendo aqui?
Respuesta1
Finalmente, rastreé esto hasta que fue necesario --device-cgroup-rule="c 108:0 rwm"
en la línea de comandos de la ventana acoplable.