[Lxc-users] Preventing premature bash exit
Daniel Lezcano
daniel.lezcano at free.fr
Mon Jul 12 16:51:45 UTC 2010
On 07/12/2010 06:07 PM, Whit Blauvelt wrote:
> Hi,
>
> Is this a simple problem, or does it indicate I'm so far from configuring
> this right that I should move on to other means for a time and let the
> containers project mature to where the paths have become better trod?
>
> It seems I've almost got the container started:
>
> # lxc-start -n centos5 /bin/bash
> [root at centos /]#
>
> But as soon as I type anything at that prompt:
>
> [1]+ Stopped lxc-start -n centos5 /bin/bash
>
> And the process is still running. Various bad states of the system follow
> from that. In one an "exit" is entered at the host prompt, not by me, which
> gets a "There are stopped jobs" message - the lxc-start of course. In
> another hitting return repeatedly can produce this pattern:
>
> root at black:~# [root at centos /]#
> root at black:~# [root at centos /]#
> root at black:~# [root at centos /]#
>
> each line being two returns, and anything else typed after [root at centos /]#
> logging my out of my ssh session into the host. In another variant the
> terminal on the host stops doing returns - runs the lines on.
>
> There's nothing useful in the logs of the host or guest (and I've tried it
> with the guest's logging both on and off).
>
> On the one hand, I realize the lxc project is low profile because it's still
> in such an early state. On the other, containers would be perfect for the
> internal, non-production testing systems we need here just now, and for
> production uses once it gets to 1.0 and is better proven. But I don't know
> whether I'm 30 minutes away from having containers work well enough to get
> on with using them, or if it would take another week of muddling. Not that I
> don't enjoy sharpening my sometimes-rusty skills; just that my employer
> might question my productivity round about next week....
>
> Anyway the goal is an Ubuntu 10.04 host, with latest stable kernel.org
> kernel and latest lxc and iproute, to run Centos5 containers.
>
> All advice welcome.
>
It is a bug, it was reported last week. I am looking forward to fix it.
It's an interaction between the console and the shell because this one
takes the tty.
As there is a similar problem with signal forwarding, I am trying to
find a "global" solution.
With your command, there is a workaround I think which is:
lxc-start -n centos5 -s lxc.console=/dev/null -- /bin/bash
Thanks
-- Daniel
More information about the lxc-users
mailing list