[lxc-devel] problem with user namespace as root

Stephan Sachse ste.sachse at gmail.com
Fri Feb 14 10:49:51 UTC 2014


> You didn't say if you had applied my experimental patch or not.  I'm
> guessing not but I can't be sure.

no, this was only the complete log of my "i lost my brain" mail.

> 2) Find the lxc-devsetup script (in lxc/config/init/systemd/lxc-devsetup
> in the source tree) and run that as root to see if we have better luck
> under devtmpfs.

output attached

-- 
Software is like sex, it's better when it's free!
-------------- next part --------------
      lxc-start 1392374433.547 INFO     lxc_start_ui - using rcfile /var/lib/lxc/fedora1/config
      lxc-start 1392374433.547 INFO     lxc_confile - read uid map: type u nsid 0 hostid 100000 range 1
      lxc-start 1392374433.547 INFO     lxc_confile - read uid map: type g nsid 0 hostid 100000 range 1
      lxc-start 1392374433.547 INFO     lxc_confile - read uid map: type u nsid 1 hostid 1 range 65000
      lxc-start 1392374433.547 INFO     lxc_confile - read uid map: type g nsid 1 hostid 1 range 65000
      lxc-start 1392374433.547 WARN     lxc_log - lxc_log_init called with log already initialized
      lxc-start 1392374433.548 DEBUG    lxc_conf - allocated pty '/dev/pts/2' (5/6)
      lxc-start 1392374433.548 DEBUG    lxc_conf - allocated pty '/dev/pts/4' (7/8)
      lxc-start 1392374433.548 DEBUG    lxc_conf - allocated pty '/dev/pts/5' (9/10)
      lxc-start 1392374433.548 DEBUG    lxc_conf - allocated pty '/dev/pts/6' (11/12)
      lxc-start 1392374433.548 INFO     lxc_conf - tty's configured
      lxc-start 1392374433.548 DEBUG    lxc_start - sigchild handler set
      lxc-start 1392374433.548 DEBUG    lxc_console - opening /dev/tty for console peer
      lxc-start 1392374433.548 DEBUG    lxc_console - using '/dev/tty' as console
      lxc-start 1392374433.548 DEBUG    lxc_console - 23797 got SIGWINCH fd 17
      lxc-start 1392374433.548 DEBUG    lxc_console - set winsz dstfd:14 cols:158 rows:51
      lxc-start 1392374433.548 INFO     lxc_start - 'fedora1' is initialized
      lxc-start 1392374433.556 DEBUG    lxc_start - Not dropping cap_sys_boot or watching utmp

      lxc-start 1392374433.557 INFO     lxc_start - Cloning a new user namespace
      lxc-start 1392374433.560 DEBUG    lxc_conf - instanciated veth 'vethJFFOIT/vethILHK19', index is '97'
      lxc-start 1392374433.560 INFO     lxc_cgroup - cgroup driver cgroupfs initing for fedora1
      lxc-start 1392374433.561 ERROR    lxc_cgfs - Device or resource busy - failed to set memory.use_hiararchy to 1; continuing
      lxc-start 1392374433.561 ERROR    lxc_cgfs - Device or resource busy - failed to set memory.use_hiararchy to 1; continuing
      lxc-start 1392374433.562 DEBUG    lxc_cgfs - cgroup 'devices.deny' set to 'a'
      lxc-start 1392374433.562 DEBUG    lxc_cgfs - cgroup 'devices.allow' set to 'c *:* m'
      lxc-start 1392374433.562 DEBUG    lxc_cgfs - cgroup 'devices.allow' set to 'b *:* m'
      lxc-start 1392374433.562 DEBUG    lxc_cgfs - cgroup 'devices.allow' set to 'c 1:3 rwm'
      lxc-start 1392374433.562 DEBUG    lxc_cgfs - cgroup 'devices.allow' set to 'c 1:5 rwm'
      lxc-start 1392374433.562 DEBUG    lxc_cgfs - cgroup 'devices.allow' set to 'c 1:7 rwm'
      lxc-start 1392374433.562 DEBUG    lxc_cgfs - cgroup 'devices.allow' set to 'c 5:0 rwm'
      lxc-start 1392374433.562 DEBUG    lxc_cgfs - cgroup 'devices.allow' set to 'c 1:8 rwm'
      lxc-start 1392374433.562 DEBUG    lxc_cgfs - cgroup 'devices.allow' set to 'c 1:9 rwm'
      lxc-start 1392374433.562 DEBUG    lxc_cgfs - cgroup 'devices.allow' set to 'c 136:* rwm'
      lxc-start 1392374433.562 DEBUG    lxc_cgfs - cgroup 'devices.allow' set to 'c 5:2 rwm'
      lxc-start 1392374433.562 INFO     lxc_cgfs - cgroup has been setup
      lxc-start 1392374433.570 DEBUG    lxc_conf - move '(null)' to '23805'
      lxc-start 1392374433.570 NOTICE   lxc_start - switching to gid/uid 0 in new user namespace
      lxc-start 1392374433.570 INFO     lxc_conf - 'fedora1' hostname has been setup
      lxc-start 1392374433.576 DEBUG    lxc_conf - mac address 'fe:51:02:2c:73:fa' on 'eth0' has been setup
      lxc-start 1392374433.576 DEBUG    lxc_conf - 'eth0' has been setup
      lxc-start 1392374433.576 INFO     lxc_conf - network has been setup
      lxc-start 1392374433.579 DEBUG    lxc_conf - mounted '/var/lib/lxc/fedora1/rootfs' on '/usr/lib64/lxc/rootfs'
      lxc-start 1392374433.579 INFO     lxc_conf - Mounting /dev under /usr/lib64/lxc/rootfs

      lxc-start 1392374433.579 DEBUG    lxc_conf - entering mount_check_fs for /dev

      lxc-start 1392374433.579 DEBUG    lxc_conf - mount_check_fs returning 1 last devtmpfs

      lxc-start 1392374433.579 INFO     lxc_conf - Setup in /dev/.lxc failed.  Trying /dev/.lxc/user.
      lxc-start 1392374433.579 ERROR    lxc_conf - File exists - WARNING: Failed to create symlink '/var/lib/lxc/fedora1/rootfs.dev'->'/dev/.lxc/user/fedora1.533098688727054a'

      lxc-start 1392374433.579 DEBUG    lxc_conf - Bind mounting /dev/.lxc/user/fedora1.533098688727054a to /usr/lib64/lxc/rootfs/dev
      lxc-start 1392374433.579 INFO     lxc_conf - Mounted /dev under /usr/lib64/lxc/rootfs

      lxc-start 1392374433.579 INFO     lxc_conf - Creating initial consoles under /usr/lib64/lxc/rootfs/dev

      lxc-start 1392374433.579 INFO     lxc_conf - Populating /dev under /usr/lib64/lxc/rootfs

      lxc-start 1392374433.579 ERROR    lxc_conf - Operation not permitted - Error creating null

      lxc-start 1392374433.579 ERROR    lxc_conf - failed to populate /dev in the container
      lxc-start 1392374433.579 ERROR    lxc_start - failed to setup the container
      lxc-start 1392374433.579 ERROR    lxc_sync - invalid sequence number 1. expected 2
      lxc-start 1392374433.579 WARN     lxc_conf - failed to remove interface '(null)'
      lxc-start 1392374433.597 ERROR    lxc_start - failed to spawn 'fedora1'


More information about the lxc-devel mailing list