[lxc-users] Serge Hallyn's article "Publishing LXD images"

david.andel at bli.uzh.ch david.andel at bli.uzh.ch
Wed Dec 9 15:48:16 UTC 2015


Ok, after installing the daily builds, relaunching wily from scratch, installing upstart in it, creating a config profile and applying it to the container:

david at kimera:~$ lxc profile show debug_init
name: debug_init
config:
  raw.lxc: |-
    lxc.console.logfile = /tmp/out
    lxc.init_cmd = /sbin/init --debug --verbose
devices: {}

david at kimera:~$ lxc profile apply wily-u-1 default,debug_init
Profile default,debug_init applied to wily-u-1

No log is being written after running a bash shell and just waiting until it quits by itself:

david at kimera:~$ lxc exec wily-u-1 /bin/bash
root at wily-u-1:~# david at kimera:~$ 
david at kimera:~$ lxc exec wily-u-1 -- ls -alh /tmp/
total 0
drwxrwxrwt 1 root root   0 Dec  9 15:37 .
drwxr-xr-x 1 root root 132 Dec  9 03:54 ..

Also, the time until the shell quits is variable in the double seconds:

david at kimera:~$ time lxc exec wily-u-1 /bin/bash
root at wily-u-1:~# 
real    0m14.124s
user    0m0.004s
sys     0m0.004s
david at kimera:~$ time lxc exec wily-u-1 /bin/bash
root at wily-u-1:~# ls -l /tmp/
total 0
root at wily-u-1:~# 
real    0m28.515s
user    0m0.016s
sys     0m0.000s
david at kimera:~$ time lxc exec wily-u-1 /bin/bash
root at wily-u-1:~# 
real    0m12.001s
user    0m0.000s
sys     0m0.012s
david at kimera:~$ time lxc exec wily-u-1 /bin/bash
root at wily-u-1:~# ls -l
total 0
root at wily-u-1:~# 
real    0m8.603s
user    0m0.008s
sys     0m0.000s

David

-----"lxc-users" <lxc-users-bounces at lists.linuxcontainers.org> wrote: -----
To: LXC users mailing-list <lxc-users at lists.linuxcontainers.org>
From: Serge Hallyn 
Sent by: "lxc-users" 
Date: 12/08/2015 18:27
Subject: Re: [lxc-users] Serge Hallyn's article "Publishing LXD images"

Quoting david.andel at bli.uzh.ch (david.andel at bli.uzh.ch):
> But now happens something strange:
> 
> When running 'lxc exec wily-with-upstart-1 /bin/bash' the prompt changes to root at wily-with-upstart-1 as expected, but then closes the shell in a few seconds, falling back on the host prompt.
> This happens both in the original wily (with systemd) and in the wily-with-upstart containers, but not in a trusty container.
> I haven't found any entries in /var/log in those containers during the time that this happens.
> 
> What could this be and how can I find the cause?

Jinkeys, no idea.  Is the container still running after your
shell dies?

I'd try getting debug output from upstart itself.  Depending on which
lxc you're running, you may need to use lxc from the daily ppa to get
the patch "support arguments in lxc.init_cmd".  Add the following to
your container config:

  raw.lxc: |-
    lxc.console.logfile = /tmp/out
    lxc.init_cmd = /sbin/init --debug --verbose

_______________________________________________
lxc-users mailing list
lxc-users at lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20151209/68c9abb9/attachment.html>


More information about the lxc-users mailing list