[Lxc-users] Need simple configuration for embedded ARM LXC

Daniel Lezcano daniel.lezcano at free.fr
Sat Apr 20 08:24:59 UTC 2013


On 04/20/2013 03:23 AM, Somnath Mitra wrote:
> Is there a workaround/resolution to this?
>
> I had filed a
> bug http://sourceforge.net/tracker/?func=detail&aid=3610837&group_id=163076&atid=826303

Do you mind to test with a 0.8.0 ?

Meanwhile I will investigate the bug (which is probably a signal
SIGTTOU/IN received).

Thanks
  -- Daniel

> On Mon, Apr 15, 2013 at 1:08 PM, Daniel Lezcano
> <daniel.lezcano at free.fr <mailto:daniel.lezcano at free.fr>> wrote:
>
>     On 04/15/2013 03:26 AM, Serge Hallyn wrote:
>     > Quoting Somnath Mitra (somnath.mitra at xockets.com
>     <mailto:somnath.mitra at xockets.com>):
>     >> On Fri, Apr 12, 2013 at 6:53 AM, Serge Hallyn
>     <serge.hallyn at ubuntu.com <mailto:serge.hallyn at ubuntu.com>>wrote:
>     >>
>     >>> Quoting Somnath Mitra (somnath.mitra at xockets.com
>     <mailto:somnath.mitra at xockets.com>):
>     >>>
>     >>  > Since the container rootfs is shared with host I am confused
>     why it
>     >>> cannot
>     >>>> find lxc-init?
>     >>> Sounds like a compilation/packaging problem.  It works for me
>     >>> here, with ubuntu raring:
>     >>>
>     >>> cat > lxc.conf << EOF
>     >>> cat > lxc.conf << EOF
>     >>> lxc.utsname = beta
>     >>> lxc.network.type = empty
>     >>> lxc.rootfs = /
>     >>> lxc.aa_profile = unconfined
>     >>> EOF
>     >>> lxc.utsname = beta
>     >>> lxc.network.type = empty
>     >>> lxc.rootfs = /
>     >>> lxc.aa_profile = unconfined
>     >>> EOF
>     >>>
>     >>> sudo lxc-execute -n foobar -f lxc.conf -l info -o outout -- ps -ef
>     >>> UID        PID  PPID  C STIME TTY          TIME CMD
>     >>> root         1     0  0 08:46 pts/1    00:00:00
>     >>> /usr/lib/x86_64-linux-gnu/lxc/lxc-init -- ps -ef
>     >>> root         2     1  0 08:46 pts/1    00:00:00 ps -ef
>     >>>
>     >>> (an interactive shell doesn't work - just hangs, I don't use
>     >>> lxc-execute so always forget what is expect to work and what
>     >>> isn't)
>     >>>
>     >> Hangs for me too (on the embedded board). Can you comment on
>     possible root
>     >> cause or workaround so we can investigate. My target
>     application shall need
>     >> stdin, stdout and, possibly, stderr.
>     > Hi Daniel,
>     >
>     > can you comment on this by chance?  I frankly don't use
>     lxc-execute, and
>     > I know you know of all sorts of special circumstances
>     surrounding it...
>     > For me,
>     >
>     >       cat > lxc.conf << EOF
>     > lxc.utsname = beta
>     > lxc.network.type = empty
>     > lxc.rootfs = /
>     > lxc.aa_profile = unconfined
>     > EOF
>     >
>     >       lxc-execute -n foobar -f lxc.conf -- ps -ef
>     >
>     > works fine, while
>     >
>     >       lxc-execute -n foobar -f lxc.donf -- /bin/sh
>     >
>     > hangs - some tty session thing?
>
>     At the first glance, yes.
>
>     Probably a SIGTTIN / SIGTTOU signal received. Something change
>     with the
>     pid group/session leader ?
>
>     >
>     >>>> I have already checked that kernel is configured correctly using
>     >>>> lxc-checkconfig.
>     >>>>
>     >>>> Pls send a pointer to a simple working configuration for embedded
>     >>> systems.
>     >>>
>     >>> Take a look at src/lxc/execute.c:choose_init().  It will look for
>     >>> lxc-init in three places:
>     >>>
>     >>>         LXCINITDIR "/lxc/lxc-init"
>     >>>         /usr/lib/lxc/lxc-init
>     >>>         /sbin/lxc-init
>     >>>
>     >>> LXCINITDIR in ubuntu is /usr/lib/x86_64-linux-gnu, and
>     lxc-init is in
>     >>> fact at /usr/lib/x86_64-linux-gnu/lxc/lxc-init.  (You can find
>     your
>     >>> LXCINITDIR in config.log if you built your own lxc).  But the
>     >>> easier thing might be to just copy lxc-init into /sbin.
>     >>>
>     >> Yes I had put lxc-* binaries in /usr/bin. Putting them in /sbin
>     solved it.
>     >>
>     >> Thanks,
>     >> SM.
>
>





More information about the lxc-users mailing list