[lxc-devel] [PATCH 1/2] change lxc-autostart shutdown to behave like lxc-stop

Michael H. Warfield mhw at WittsEnd.com
Thu Jan 2 19:13:29 UTC 2014


On Thu, 2014-01-02 at 13:04 -0600, Serge Hallyn wrote: 
> Quoting Dwight Engen (dwight.engen at oracle.com):
> > On Thu, 2 Jan 2014 10:59:56 -0600
> > Serge Hallyn <serge.hallyn at ubuntu.com> wrote:
> > 
> > > Quoting Dwight Engen (dwight.engen at oracle.com):
> > > > It is desirable to have a mode where a soft shutdown is requested,
> > > > but then do a hard shutdown if after some time period the container
> > > > has not shut down. This the default behaviour of lxc-stop, but is
> > > > not currently possible with lxc-autostart. This change makes this
> > > > the default behaviour when shutdown is specified to lxc-autostart.
> > > > This will be very useful for init scripts.
> > > > 
> > > > An indefinte wait for soft shutdown (though I'm not sure how that
> > > > would be useful) is still possible by passing a timeout of 0.
> > > > 
> > > > Change default timeout value to 60 seconds to match lxc-stop
> > > > 
> > > > Signed-off-by: Dwight Engen <dwight.engen at oracle.com>
> > > 
> > > Yeah since lxc-autostart batches by nature, having a default
> > > of failing instead of hard-killing makes less sense there
> > > than in lxc-shutdown.  The inconsistency is too bad, but
> > > maybe the thing to do is consider changing lxc-shutdown too.
> > 
> > Agree, I didn't like that this makes the meaning of shutdown
> > inconsistent in lxc-stop vs lxc-autostart. Maybe we should just rename
> > the option in lxc-stop to something like --no-hard-kill ?

> That sounds good.

+1

Concur.

Regards
Mike
-- 
Michael H. Warfield (AI4NB) | (770) 978-7061 |  mhw at WittsEnd.com
   /\/\|=mhw=|\/\/          | (678) 463-0932 |  http://www.wittsend.com/mhw/
   NIC whois: MHW9          | An optimist believes we live in the best of all
 PGP Key: 0x674627FF        | possible worlds.  A pessimist is sure of it!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 482 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20140102/f97cbf0c/attachment.pgp>


More information about the lxc-devel mailing list