[lxc-devel] [PATCH 1/2] Support starting containers concurrently

Stéphane Graber stgraber at ubuntu.com
Wed Apr 24 23:20:55 UTC 2013


On 04/24/2013 10:35 PM, S.Çağlar Onur wrote:
> Just wanted to remind that we still need this on top of Dwight's awesome
> work so that start work reliably.

Looks good to me.

Acked-by: Stéphane Graber <stgraber at ubuntu.com>


> On Tue, Apr 23, 2013 at 5:24 PM, S.Çağlar Onur <caglar at 10ur.org
> <mailto:caglar at 10ur.org>> wrote:
> 
>     From: "S.Çağlar Onur" <caglar at 10ur.org <mailto:caglar at 10ur.org>>
> 
>     Trying to start multiple containers concurrently may cause
>     lxc_monitor_read_timeout to fail as select call could be interrupted
>     by a signal, handle it.
> 
>     Signed-off-by: S.Çağlar Onur <caglar at 10ur.org <mailto:caglar at 10ur.org>>
>     ---
>      src/lxc/state.c |    7 +++++--
>      1 file changed, 5 insertions(+), 2 deletions(-)
> 
>     diff --git a/src/lxc/state.c b/src/lxc/state.c
>     index 437f11a..60da22c 100644
>     --- a/src/lxc/state.c
>     +++ b/src/lxc/state.c
>     @@ -231,8 +231,11 @@ extern int lxc_wait(const char *lxcname, const
>     char *states, int timeout, const
>                                     goto out_close;
>                             curtime = tv.tv_sec;
>                     }
>     -               if (lxc_monitor_read_timeout(fd, &msg, timeout) < 0)
>     -                       goto out_close;
>     +               if (lxc_monitor_read_timeout(fd, &msg, timeout) < 0) {
>     +                       /* try again if select interrupted by signal */
>     +                       if (errno != EINTR)
>     +                               goto out_close;
>     +               }
> 
>                     if (timeout != -1) {
>                             retval = gettimeofday(&tv, NULL);
>     --
>     1.7.10.4
> 
> 
> 
> 
> -- 
> S.Çağlar Onur <caglar at 10ur.org <mailto:caglar at 10ur.org>>
> 
> 
> ------------------------------------------------------------------------------
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring service 
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
> 
> 
> 
> _______________________________________________
> Lxc-devel mailing list
> Lxc-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-devel
> 


-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20130425/6e111aa6/attachment.pgp>


More information about the lxc-devel mailing list