About the function "lxc_fill_autodev" in conf.c of lxc 2.0.11

(Chengdu Ding) #1

@stgraber, @brauner,
excuse me, I would like to ask you two questions about the function “lxc_fill_autodev” in conf.c of lxc 2.0.11.

  1. There is no check if it can be opened after mknod in version 2.0.9. In the 2.0.11 version, the open check was added, is this an optimization?

  2. When upgrading to version 2.0.11, I encountered an issue where lxc failed to start. The problem I am positioning is out of the “lxc_fill_autodev” function, our release version needs to remove CONFIG_TTY, so lxc runs at startup and the funciton fails with “safe_mount”. There is no check for the existence of /dev/tty on the host side. Do you need to check it?
    And I know that when I set lxc.autodev=0, lxc starts up without problems, but I just want to remove /dev/tty. Currently I can only modify the “lxc_fill_autodev” function to avoid mounting /dev/tty to lxc side.

Kindly check and provide your feedback.

(Stéphane Graber) #2

The mknod check was there for kernel 4.9 which changed the behavior of mknod I believe, this particular change in the kernel has since been removed so it’s unlikely to impact you either way.

For the rest, I’d defer to @brauner