[lxc-devel] [PATCH 1/1] pivot_root: switch to a new mechanism (v2)
Serge Hallyn
serge.hallyn at ubuntu.com
Fri Sep 26 22:54:46 UTC 2014
Quoting Dwight Engen (dwight.engen at oracle.com):
> On Sat, 20 Sep 2014 03:15:44 +0000
> Serge Hallyn <serge.hallyn at ubuntu.com> wrote:
>
> > This idea came from Andy Lutomirski. Instead of using a
> > temporary directory for the pivot_root put-old, use "." both
> > for new-root and old-root. Then fchdir into the old root
> > temporarily in order to unmount the old-root, and finally
> > chdir back into our '/'.
> >
> > Drop lxc.pivotdir from the lxc.container.conf manpage.
> >
> > Warn when we see a lxc.pivotdir entry (but keep it in the
> > lxc.conf for now).
> >
> > Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
>
> Hey Serge
>
> Just a heads up that this change makes my containers not start on a
> 3.8.13 kernel. Reverting this change or using 3.13.11 kernel (just
D'oh. perhaps it should quickly be yanked out of the upcoming
release?
> tried a newer one I had handy) works. I'll try to debug further.
> The log from trying to start a busybox container:
>
> lxc-start 1411768079.034 INFO lxc_start_ui - using rcfile /container/bb01/config
> lxc-start 1411768079.035 WARN lxc_log - lxc_log_init called with log already initialized
> lxc-start 1411768079.040 DEBUG lxc_conf - allocated pty '/dev/pts/0' (5/6)
> lxc-start 1411768079.040 INFO lxc_conf - tty's configured
> lxc-start 1411768079.040 DEBUG lxc_start - sigchild handler set
> lxc-start 1411768079.040 DEBUG lxc_console - opening /dev/tty for console peer
> lxc-start 1411768079.040 DEBUG lxc_console - using '/dev/tty' as console
> lxc-start 1411768079.041 DEBUG lxc_console - 6557 got SIGWINCH fd 11
> lxc-start 1411768079.041 DEBUG lxc_console - set winsz dstfd:8 cols:128 rows:48
> lxc-start 1411768079.041 INFO lxc_start - 'bb01' is initialized
> lxc-start 1411768079.042 DEBUG lxc_start - Not dropping cap_sys_boot or watching utmp
> lxc-start 1411768079.069 DEBUG lxc_conf - instanciated veth 'vethU2J1VP/veth8FP0C5', index is '6'
> lxc-start 1411768079.069 INFO lxc_cgroup - cgroup driver cgroupfs initing for bb01
> lxc-start 1411768079.119 DEBUG lxc_conf - move '(null)' to '6569'
> lxc-start 1411768079.124 DEBUG lxc_conf - mounted '/container/bb01/rootfs' on '/usr/lib64/lxc/rootfs'
> lxc-start 1411768079.124 INFO lxc_conf - 'bb01' hostname has been setup
> lxc-start 1411768079.125 DEBUG lxc_conf - mac address '00:16:3e:17:fb:50' on 'eth0' has been setup
> lxc-start 1411768079.130 DEBUG lxc_conf - 'eth0' has been setup
> lxc-start 1411768079.130 INFO lxc_conf - network has been setup
> lxc-start 1411768079.130 DEBUG lxc_conf - Set exec command to /sbin/init
> lxc-start 1411768079.134 INFO lxc_conf - Autodev not required.
> lxc-start 1411768079.137 DEBUG lxc_conf - remounting /lib on /usr/lib64/lxc/rootfs/lib to respect bind or remount options
> lxc-start 1411768079.138 DEBUG lxc_conf - (at remount) flags for /lib was 4096, required extra flags are 0
> lxc-start 1411768079.138 DEBUG lxc_conf - mountflags already was 4097, skipping remount
> lxc-start 1411768079.138 DEBUG lxc_conf - mounted '/lib' on '/usr/lib64/lxc/rootfs/lib', type 'none'
> lxc-start 1411768079.138 DEBUG lxc_conf - remounting /usr/lib on /usr/lib64/lxc/rootfs/usr/lib to respect bind or remount options
> lxc-start 1411768079.138 DEBUG lxc_conf - (at remount) flags for /usr/lib was 4096, required extra flags are 0
> lxc-start 1411768079.138 DEBUG lxc_conf - mountflags already was 4097, skipping remount
> lxc-start 1411768079.138 DEBUG lxc_conf - mounted '/usr/lib' on '/usr/lib64/lxc/rootfs/usr/lib', type 'none'
> lxc-start 1411768079.138 DEBUG lxc_conf - remounting /lib64 on /usr/lib64/lxc/rootfs/lib64 to respect bind or remount options
> lxc-start 1411768079.138 DEBUG lxc_conf - (at remount) flags for /lib64 was 4096, required extra flags are 0
> lxc-start 1411768079.138 DEBUG lxc_conf - mountflags already was 4097, skipping remount
> lxc-start 1411768079.138 DEBUG lxc_conf - mounted '/lib64' on '/usr/lib64/lxc/rootfs/lib64', type 'none'
> lxc-start 1411768079.138 DEBUG lxc_conf - remounting /usr/lib64 on /usr/lib64/lxc/rootfs/usr/lib64 to respect bind or remount options
> lxc-start 1411768079.138 DEBUG lxc_conf - (at remount) flags for /usr/lib64 was 4096, required extra flags are 0
> lxc-start 1411768079.138 DEBUG lxc_conf - mountflags already was 4097, skipping remount
> lxc-start 1411768079.138 DEBUG lxc_conf - mounted '/usr/lib64' on '/usr/lib64/lxc/rootfs/usr/lib64', type 'none'
> lxc-start 1411768079.139 DEBUG lxc_conf - remounting /sys/kernel/security on /usr/lib64/lxc/rootfs/sys/kernel/security to respect bind or remount options
> lxc-start 1411768079.139 DEBUG lxc_conf - (at remount) flags for /sys/kernel/security was 4096, required extra flags are 0
> lxc-start 1411768079.139 DEBUG lxc_conf - mountflags already was 4097, skipping remount
> lxc-start 1411768079.139 DEBUG lxc_conf - mounted '/sys/kernel/security' on '/usr/lib64/lxc/rootfs/sys/kernel/security', type 'none'
> lxc-start 1411768079.139 INFO lxc_conf - mount points have been setup
> lxc-start 1411768079.139 INFO lxc_conf - console has been setup
> lxc-start 1411768079.147 INFO lxc_conf - 1 tty(s) has been setup
> lxc-start 1411768079.147 INFO lxc_conf - I am 1, /proc/self points to '1'
> lxc-start 1411768079.147 DEBUG lxc_conf - pivot_root syscall to '/usr/lib64/lxc/rootfs' successful
> lxc-start 1411768079.147 ERROR lxc_conf - Invalid argument - failed to mount a new instance of '/dev/pts'
Odd. I wonder why this would fail. git diff v3.13.. fs/devpts doesn't
show anything meaningful there...
> lxc-start 1411768079.155 ERROR lxc_conf - failed to setup the new pts instance
> lxc-start 1411768079.157 ERROR lxc_start - failed to setup the container
> lxc-start 1411768079.157 ERROR lxc_sync - invalid sequence number 1. expected 2
> lxc-start 1411768079.158 WARN lxc_conf - failed to remove interface '(null)'
> lxc-start 1411768079.159 ERROR lxc_start - failed to spawn 'bb01'
> lxc-start 1411768079.161 ERROR lxc_start_ui - The container failed to start.
> lxc-start 1411768079.162 ERROR lxc_start_ui - Additional information can be obtained by setting the --logfile and --logpriority options.
More information about the lxc-devel
mailing list