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

Serge Hallyn serge.hallyn at ubuntu.com
Mon Dec 21 16:54:26 UTC 2015


Oh, that's because lxd has started setting lxc.console = 0.  Add

lxc.console =

to the raw.lxc section to undo that.

Quoting david.andel at bli.uzh.ch (david.andel at bli.uzh.ch):
> And the same is true for the original wily container from the official image:
> 
> david at kimera:~$ lxc stop wily
> david at kimera:~$ lxc profile apply wily default,debug_init
> Profile default,debug_init applied to wily
> david at kimera:~$ lxc start wily
> david at kimera:~$ time lxc exec wily /bin/bash
> root at wily:~# 
> real    0m9.781s
> user    0m0.008s
> sys     0m0.000s
> david at kimera:~$ lxc exec wily -- ls -alh /tmp/
> total 0
> drwxrwxrwt 1 root root   0 Dec 10 07:51 .
> drwxr-xr-x 1 root root 132 Dec  9 03:54 ..
> 
> I have also checked with a fresh trusty launch with the latest daily builds, and still, the problem with the shell quitting by itself does not occur in the trusty container, however, init does not write any debug log either:
> 
> david at kimera:~$ lxc launch images:ubuntu/trusty/amd64 trusty
> Creating trusty done.
> Starting trusty done.
> david at kimera:~$ lxc image list
> +----------------+--------------+--------+-----------------------+--------+----------+------------------------------+
> |     ALIAS      | FINGERPRINT  | PUBLIC |      DESCRIPTION      |  ARCH  |   SIZE   |         UPLOAD DATE          |
> +----------------+--------------+--------+-----------------------+--------+----------+------------------------------+
> | wily-w-upstart | ac1181e4561c | no     |                       | x86_64 | 130.31MB | Dec 9, 2015 at 4:36pm (CET)  |
> |                | 2ad5a41c86ac | no     | Ubuntu wily (amd64)   | x86_64 | 72.76MB  | Dec 9, 2015 at 4:33pm (CET)  |
> |                | 7f26ac9d570e | no     | Ubuntu trusty (amd64) | x86_64 | 63.93MB  | Dec 10, 2015 at 8:55am (CET) |
> +----------------+--------------+--------+-----------------------+--------+----------+------------------------------+
> david at kimera:~$ lxc stop trusty
> david at kimera:~$ lxc profile apply trusty default,debug_init
> Profile default,debug_init applied to trusty
> david at kimera:~$ lxc start trusty
> david at kimera:~$ time lxc exec trusty /bin/bash
> root at trusty:~# ls -l /tmp/
> total 0
> root at trusty:~# exit
> 
> real    2m15.496s
> user    0m0.008s
> sys     0m0.008s
> david at kimera:~$ lxc exec trusty -- ls -alh /tmp/
> total 0
> drwxrwxrwt 1 root root   0 Dec  9 04:06 .
> drwxr-xr-x 1 root root 132 Dec  9 04:05 ..
> 
> 
> -----"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/10/2015 3:52
> Subject: Re: [lxc-users] Serge Hallyn's article "Publishing LXD images"
> 
> Quoting david.andel at bli.uzh.ch (david.andel at bli.uzh.ch):
> > 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:
> 
> Wait, did you restart the container after applying the new
> profile?  Since we're setting debug arguments for init, we
> need init to be restart anyway.
> 
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users

> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users



More information about the lxc-users mailing list