Templates don't launch. Multi-arch problem?

Bug #1198963 reported by yitzhakbg
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Actually, it's not just the templates. Seems the LXC environment isn't setup correctly and I suspect multi-arch.
Raring 13.04 using kernel 3.8.0-26-generic.
lxc-version 0.9.0 from the daily-builds PPA, but, please note:
I had the same problem under the standard raring edition. I added the daily PPA in the hope that it would help. It didn't!
I purged ia32-libs and ia32-libs-multiarch to no avail.
Does the installation look right?
ybg@bgxtr:~/Media/Mininetry$ find /usr/lib|grep lxc
/usr/lib/python3/dist-packages/lxc
/usr/lib/python3/dist-packages/lxc/__init__.py
/usr/lib/python3/dist-packages/lxc/__pycache__
/usr/lib/python3/dist-packages/lxc/__pycache__/__init__.cpython-33.pyc
/usr/lib/python3/dist-packages/_lxc-0.1.egg-info
/usr/lib/python3/dist-packages/_lxc.cpython-33m.so
/usr/lib/x86_64-linux-gnu/lxc
/usr/lib/x86_64-linux-gnu/lxc/README
/usr/lib/x86_64-linux-gnu/lxc/lxc-init
/usr/lib/x86_64-linux-gnu/liblxc.so.0.9.0
/usr/lib/x86_64-linux-gnu/liblxc.so.0

Following are two clean-slate scenarios following a fresh install of lxc and cgroup-lite, after purge of ia32-libs, but again, it behaved the same prior to the ia32-libs purge.
First, ubuntu from template:

sudo lxc-create -n ub -t ubuntu -l DEBUG -o ub.log -- -b ybg
[ log file name should have been ./ub.log instead of ub.log. My fault. Don't know why locale is en_AU ]
( skipping lengthy output....)
Ign http://archive.ubuntu.com raring-updates/universe Translation-en_AU
Fetched 5,327 kB in 13s (386 kB/s)
.
  . etc...
Calculating upgrade... Done
The following packages will be upgraded:
  isc-dhcp-client isc-dhcp-common libdbus-1-3 libdrm2 libplymouth2 libssl1.0.0 libudev1 plymouth rsyslog
9 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 3,539 kB of archives.
After this operation, 2,048 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ raring-updates/main libssl1.0.0 amd64 1.0.1c-4ubuntu8.1 [1,050 kB]
.
  . etc...
Get:9 http://archive.ubuntu.com/ubuntu/ raring-updates/main rsyslog amd64 5.8.11-2ubuntu2.2 [434 kB]
Fetched 3,539 kB in 7s (493 kB/s)
Preconfiguring packages ...
Can not write log, openpty() failed (/dev/pts not mounted?)
 .
   .
Preparing to replace isc-dhcp-common 4.2.4-5ubuntu2 (using .../isc-dhcp-common_4.2.4-5ubuntu2.1_amd64.deb) ...
 .
   . etc...
Can not write log, openpty() failed (/dev/pts not mounted?)
Setting up libssl1.0.0:amd64 (1.0.1c-4ubuntu8.1) ...
Setting up libdbus-1-3:amd64 (1.6.8-1ubuntu6.1) ...
telinit: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
Setting up libdrm2:amd64 (2.4.43-0ubuntu1.1) ...
 .
   . etc...
Processing triggers for initramfs-tools ...
Download complete
Copy /var/cache/lxc/raring/rootfs-amd64 to /usr/lib/x86_64-linux-gnu/lxc ...
Copying rootfs to /usr/lib/x86_64-linux-gnu/lxc ...
Generating locales...
  en_AU.UTF-8... up-to-date
Generation complete.
Creating SSH2 RSA key; this may take some time ...
Creating SSH2 DSA key; this may take some time ...
Creating SSH2 ECDSA key; this may take some time ...

##
# Log in as user ybg
##

Starting:
ybg@bgxtr:~/Media/Mininetry$ sudo lxc-start -n ub -l DEBUG -o ./ub.log -- -b ybg [log OK this time, following...]
lxc-start: No such file or directory - failed to exec -b
lxc-start: invalid sequence number 1. expected 4
lxc-start: failed to spawn 'ub'
lxc-start: Device or resource busy - failed to remove cgroup '/sys/fs/cgroup/cpuset/lxc/ub'
lxc-start: Device or resource busy - failed to remove cgroup '/sys/fs/cgroup/cpu/lxc/ub'
lxc-start: Device or resource busy - failed to remove cgroup '/sys/fs/cgroup/cpuacct/lxc/ub'
lxc-start: Device or resource busy - failed to remove cgroup '/sys/fs/cgroup/memory/lxc/ub'
lxc-start: Device or resource busy - failed to remove cgroup '/sys/fs/cgroup/devices/lxc/ub'
lxc-start: Device or resource busy - failed to remove cgroup '/sys/fs/cgroup/freezer/lxc/ub'

log file, ub.log attached

Tags: lxc
Revision history for this message
yitzhakbg (yitzhakbg) wrote :
Revision history for this message
yitzhakbg (yitzhakbg) wrote :

Scenario from the second standard template (sshd). Log file attached:
ybg@bgxtr:~/Media/Mininetry$ sudo lxc-create -n sshd -t sshd -l DEBUG -o ./sshd.log
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /usr/lib/x86_64-linux-gnu/lxc/etc/ssh/ssh_host_rsa_key.
Your public key has been saved in /usr/lib/x86_64-linux-gnu/lxc/etc/ssh/ssh_host_rsa_key.pub.
The key fingerprint is:
c3:09:18:f9:3a:bd:fa:f1:1c:3c:52:33:d5:3b:44:c7 root@bgxtr
The key's randomart image is:
+--[ RSA 2048]----+
| .. ... |
| .o o .E |
| ... . o |
| .o o . . |
| o S o |
| o .o + . |
| .o.+ |
| .= o |
| .o. o |
+-----------------+
Generating public/private dsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /usr/lib/x86_64-linux-gnu/lxc/etc/ssh/ssh_host_dsa_key.
Your public key has been saved in /usr/lib/x86_64-linux-gnu/lxc/etc/ssh/ssh_host_dsa_key.pub.
The key fingerprint is:
71:42:71:9a:b5:f5:6e:cc:b1:05:f0:c8:ee:ae:bd:d2 root@bgxtr
The key's randomart image is:
+--[ DSA 1024]----+
| o.o o.. |
| . = + + . |
| = o o + .|
| + . + + |
| S . * |
| . . |
| .. |
| .oE |
| .o+. |
+-----------------+
ybg@bgxtr:~/Media/Mininetry$ sudo lxc-start -n sshd -l DEBUG -o ./sshd.log
lxc-start: Read-only file system - error unlinking /usr/lib/x86_64-linux-gnu/lxc/dev/kmsg

lxc-start: failed to setup kmsg for 'sshd'
/bin/bash: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
lxc-start: No such file or directory - stat(/proc/26767/root/dev//console)

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for submitting this bug. (Please do try to open separate bugs for each issue) The second part of it (sshd) has been fixed upstream just today (with a patch sent a few days ago). Please open a new bug for that one, and I'll SRU it to raring as I assume that's where you want the fix.

The first issue is not a bug. You specifed 'lxc-start [...] -- -b'. The '--' means execute what is specified after '--' as /sbin/init. Since you said 'lxc-start [...] -- -b', lxc tried to execute '-b'. -b is not a valid executable. I suspect this was a cut and paste error? The -b made sense in the lxc-create command, to request bind-mounting of that home directory. (in lxc-create, arguments following '--' are passed on to the creation template) But you do not need to re-specify it in lxc-start.

Changed in lxc (Ubuntu):
status: New → Invalid
Revision history for this message
yitzhakbg (yitzhakbg) wrote : Re: [Bug 1198963] Re: Templates don't launch. Multi-arch problem?

On Mon, Jul 8, 2013 at 7:09 PM, Serge Hallyn <email address hidden>wrote:

> sudo lxc-start -n ub -l DEBUG -o ./ub.log -- -b ybg

​Right. It was an oversight. I left the -b ​ybg hanging from the lxc-create
command. The ubuntu template container works like a charm. Thanks
regarding the second (sshd), if it's been fixed, it's no longer a bug. I'll
try and let you know.
Oh, and tnx for advising me to submit each as a separate bug.
Yitzhak

--
Best,
Yitzhak Bar Geva
On LinkedIn <http://il.linkedin.com/pub/yitzhak-bar-geva/3/759/3ab>

Revision history for this message
yitzhakbg (yitzhakbg) wrote :

Still problems with sshd template. I'm opening a new bug report

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.