[lxc-devel] [PATCH] lxc-wait: Add timeout option

Serge Hallyn serge.hallyn at canonical.com
Tue Aug 21 13:18:53 UTC 2012


Quoting Jan Kiszka (jan.kiszka at siemens.com):
> On 2012-08-21 15:11, Serge Hallyn wrote:
> > Quoting Jan Kiszka (jan.kiszka at siemens.com):
> >> On 2012-07-09 21:16, Serge Hallyn wrote:
> >>> Quoting Jan Kiszka (jan.kiszka at siemens.com):
> >>>> On 2012-07-09 19:28, Serge Hallyn wrote:
> >>>>> Quoting Jan Kiszka (jan.kiszka at siemens.com):
> >>>>>> Allow to specify a timeout for waiting on state changes via lxc-wait.
> >>>>>> Helpful for scripts that need to handle errors or excessive delays in
> >>>>>> state changing procedures.
> >>>>>
> >>>>> Hi,
> >>>>>
> >>>>> in our lxc-api tree (https://code.launchpad.net/~ubuntu-lxc/ubuntu/quantal/lxc/lxc-api-and-python/)
> >>>>> I've added changed src/lxc/state.c:lxc_wait() to take an optional
> >>>>> timeout value (0 means don't wait, -1 means wait forever), and use
> >>>>> select, to implement wait with timeout.  It is only used by our
> >>>>> lxc_container->wait, not by src/lxc/lxc_wait.c which in our tree
> >>>>> passes in -1 to wait forever.  Ideally our patches would be combined.
> >>>>
> >>>> No problem, I can base mine on top of yours. Did you post it already?
> >>>
> >>> No I hadn't posted mine yet.  Until the API goes in it didn't have a
> >>> user...
> >>>
> >>> Sorry, I think I was being silly.  Let's ignore what I said before.
> >>> Let's push your patch for now and I'll just have yours use mine if/when
> >>> mine goes up.
> >>>
> >>> Acked-by: Serge E. Hallyn <serge at hallyn.com>
> >>>
> >>
> >> Ping. What happened with this patch? Same for "Add network-down script".
> > 
> > I've added it to my github tree (git://github.com/hallyn/lxc) and it's in the
> > Ubuntu source (though it's not the version being installed right now, but
> > soon it will be).
> > 
> > My github tree is my staging tree for things I'd like to have merged into
> > lxc.sf.net, so hopefully when Daniel has time again he'll take it.  (I
> > posted it to my tree after the last time Daniel merged)
> 
> OK. Was just wondering how the merge process works here.
> 
> > 
> > The add network-down script one I didn't yet merge into my github tree.  I
> > forget why, I thought I had asked a question about it, but I'll have to check
> > my archives.  Please feel free to resend to force me to deal with it :)
> 
> I just have an "ack" in my archives. ;)

Hm, yeah, I thought there had been more discussion.  Sorry.

> Patches still apply cleanly, but I can resend if it helps.

No need, I'll apply - thanks!

Daniel,

-serge




More information about the lxc-devel mailing list