Quoting Jäkel, Guido (g.jae...@dnb.de):
> Dear Serge,
> 
> >I don't know of a generic way this could be done in lxc.
> 
> But it is desirable, right?

Well in a sense it's equivalent to the halting problem.  A solution
to which is desirable but not achievable.  We've had similar discussions
about service readiness for upstart.  Unless there's a new convention
for the service to inform you that it is ready, you're only making
guesses.  (I.e. pid files, which often are created before the service
is actually ready).

> > However, for your specific containers, you could redirect console to a file 
> > and have a script watch for a login prompt there?
> 
> One can think about a whole bunch of ways to reach the aim in a proprietary 
> way winthin minutes. But I don't have to tell you why this is not a lasting 
> solution.
> 
> 
> Said that, it seem that your answer already includes an idea for a generic 
> approach: The virtual console feature! If I try to attach using lxc-console, 
> it will fail or block until the containers console becomes ready. 

Right - which can work for containers with consoles.  It's not 100% generic.

> I may try to set up a helper script  "lxc-wait_until_booted"  for this 
> purpose.

Sounds good.

> But as a build-in, the lxc-start process may watch after start if the virtual 
> console becomes available and then either set a new container status or 
> another "flag", what might be made available via the  lxc-info  command.

I'll wait for others to give their opinions.  The only problem I have is that 
the
container has no consoles, it won't enter that state...

-serge

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel

Reply via email to