LXC Container will not start

Bug #1227092 reported by Justin Shafer on 2013-09-18
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Undecided
Unassigned

Bug Description

I was able to run lxc version lxc_0.9.0-0ubuntu23 with Ubuntu Touch running kernel version 2.6.35, without AppArmor or PSTORE , without having a mountpoint sys/fs/security (security filesystem), with a cgroup mount at startup patch!

But with lxc version lxc_1.0.0~alpha1-0ubuntu4 I get this error starting up:

I have also had to add this manually for my fstab as update-fstab does not find my vendor partition, nor has it mounted /system under in my lxc container rootfs, so I added it myself.

cat /etc/fstab
# override the forced fsck from /lib/init/fstab, we use a bindmount which confuses mountall
/dev/root / rootfs defaults 0 0

# swap file
/SWAP.swap none swap sw 0 0
# added by lxc-android-boot for /system
/dev/dm-8 /system ext4 ro,noatime,nodiratime,errors=remount-ro 0 0
# added by lxc-android-boot for /data
/dev/dm-10 /data ext4 noatime,nodiratime,errors=remount-ro 0 0
/system/vendor /vendor auto ro,bind 0 0
/system /var/lib/lxc/android/rootfs/system auto ro,bind 0 0
/dev/dm-0 /webos ext4 ro,noatime,nodiratime,errors=remount-ro 0 0
/dev/dm-6 /sdcard vfat rw,errors=remount-ro,uid=phablet,gid=phablet,noexec,umask=0000 0 0

root@ubuntu-phablet:/# lxc-start -n android
rm: cannot remove '/var/lib/lxc/android/rootfs/system/xbin/xargs': Read-only file system
rm: cannot remove '/var/lib/lxc/android/rootfs/system/xbin/xz': Read-only file system
rm: cannot remove '/var/lib/lxc/android/rootfs/system/xbin/xzcat': Read-only file system
rm: cannot remove '/var/lib/lxc/android/rootfs/system/xbin/yes': Read-only file system
rm: cannot remove '/var/lib/lxc/android/rootfs/system/xbin/zcat': Read-only file system
rm: cannot remove '/var/lib/lxc/android/rootfs/socket': Device or resource busy
cpio: system: Cannot change ownership to uid 0, gid 0: Read-only file system
cpio: system: Cannot change mode to rwxr-xr-x: Read-only file system
775 blocks
mount: No such file or directory
lxc-start: Operation not permitted - Error writing pid to /sys/fs/cgroup/ns//android/tasks to enter cgroup
lxc-start: failed to spawn 'android'

root@ubuntu-phablet:/# cat /var/log/upstart/lxc-android-config.log
lxc-start: command get_init_pid failed to receive response

Justin Shafer (justinshafer) wrote :

I am running the pstore patch that has the bind optional fstab entry for pstore.

Thanks for filing this bug. You are running with an older kernel which
has the ns cgroup, but the package source from which you built your
package doesn't ahve support for ns cgroup (because it has been
deprecated for quite some time). If you switch to the ubuntu-lxc ppa,

 sudo add-apt-repository ppa:ubuntu-lxc/daily
 sudo apt-get update

the lxc version there should work.

 status: invalid

Changed in lxc (Ubuntu):
status: New → Invalid
LeoRochael (leorochael) wrote :

This bug affects me on Saucy with lxc==1.0.0~alpha1-0ubuntu11 and kernel 3.11.0-12-generic

Serge Hallyn (serge-hallyn) wrote :

Please open a new bug using 'ubuntu-bug lxc', and give as much detail as you can about how to reproduce.

Justin Shafer (justinshafer) wrote :

I will give it a go in the morning!

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Serge Hallyn
Sent: Thursday, October 17, 2013 11:21 AM
To: <email address hidden>
Subject: [Bug 1227092] Re: LXC Container will not start

Please open a new bug using 'ubuntu-bug lxc', and give as much detail as you can about how to reproduce.

--
You received this bug notification because you are subscribed to the bug report.
https://bugs.launchpad.net/bugs/1227092

Title:
  LXC Container will not start

Status in “lxc” package in Ubuntu:
  Invalid

Bug description:
  I was able to run lxc version lxc_0.9.0-0ubuntu23 with Ubuntu Touch
  running kernel version 2.6.35, without AppArmor or PSTORE , without
  having a mountpoint sys/fs/security (security filesystem), with a
  cgroup mount at startup patch!

  But with lxc version lxc_1.0.0~alpha1-0ubuntu4 I get this error starting up:

  I have also had to add this manually for my fstab as update-fstab does
  not find my vendor partition, nor has it mounted /system under in my
  lxc container rootfs, so I added it myself.

  cat /etc/fstab
  # override the forced fsck from /lib/init/fstab, we use a bindmount which confuses mountall
  /dev/root / rootfs defaults 0 0

  # swap file
  /SWAP.swap none swap sw 0 0
  # added by lxc-android-boot for /system
  /dev/dm-8 /system ext4 ro,noatime,nodiratime,errors=remount-ro 0 0
  # added by lxc-android-boot for /data
  /dev/dm-10 /data ext4 noatime,nodiratime,errors=remount-ro 0 0
  /system/vendor /vendor auto ro,bind 0 0
  /system /var/lib/lxc/android/rootfs/system auto ro,bind 0 0
  /dev/dm-0 /webos ext4 ro,noatime,nodiratime,errors=remount-ro 0 0
  /dev/dm-6 /sdcard vfat rw,errors=remount-ro,uid=phablet,gid=phablet,noexec,umask=0000 0 0

  root@ubuntu-phablet:/# lxc-start -n android
  rm: cannot remove '/var/lib/lxc/android/rootfs/system/xbin/xargs': Read-only file system
  rm: cannot remove '/var/lib/lxc/android/rootfs/system/xbin/xz': Read-only file system
  rm: cannot remove '/var/lib/lxc/android/rootfs/system/xbin/xzcat': Read-only file system
  rm: cannot remove '/var/lib/lxc/android/rootfs/system/xbin/yes': Read-only file system
  rm: cannot remove '/var/lib/lxc/android/rootfs/system/xbin/zcat': Read-only file system
  rm: cannot remove '/var/lib/lxc/android/rootfs/socket': Device or resource busy
  cpio: system: Cannot change ownership to uid 0, gid 0: Read-only file system
  cpio: system: Cannot change mode to rwxr-xr-x: Read-only file system
  775 blocks
  mount: No such file or directory
  lxc-start: Operation not permitted - Error writing pid to /sys/fs/cgroup/ns//android/tasks to enter cgroup
  lxc-start: failed to spawn 'android'

  root@ubuntu-phablet:/# cat /var/log/upstart/lxc-android-config.log
  lxc-start: command get_init_pid failed to receive response

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1227092/+subscriptions
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3408 / Virus Database: 3222/6760 - Release Date: 10/17/13

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers