Oh, that's because lxd has started setting lxc.console = 0. Add lxc.console =
to the raw.lxc section to undo that. Quoting [email protected] ([email protected]): > And the same is true for the original wily container from the official image: > > david@kimera:~$ lxc stop wily > david@kimera:~$ lxc profile apply wily default,debug_init > Profile default,debug_init applied to wily > david@kimera:~$ lxc start wily > david@kimera:~$ time lxc exec wily /bin/bash > root@wily:~# > real 0m9.781s > user 0m0.008s > sys 0m0.000s > david@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@kimera:~$ lxc launch images:ubuntu/trusty/amd64 trusty > Creating trusty done. > Starting trusty done. > david@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@kimera:~$ lxc stop trusty > david@kimera:~$ lxc profile apply trusty default,debug_init > Profile default,debug_init applied to trusty > david@kimera:~$ lxc start trusty > david@kimera:~$ time lxc exec trusty /bin/bash > root@trusty:~# ls -l /tmp/ > total 0 > root@trusty:~# exit > > real 2m15.496s > user 0m0.008s > sys 0m0.008s > david@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" <[email protected]> wrote: ----- > To: LXC users mailing-list <[email protected]> > 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 [email protected] ([email protected]): > > 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@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@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 > [email protected] > http://lists.linuxcontainers.org/listinfo/lxc-users > _______________________________________________ > lxc-users mailing list > [email protected] > http://lists.linuxcontainers.org/listinfo/lxc-users _______________________________________________ lxc-users mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-users
