[systemd-devel] Stopping socket activated containers after inactivity?

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Tue Jan 29 06:35:47 PST 2013


On Tue, Jan 29, 2013 at 02:15:17PM +0000, Lars Kellogg-Stedman wrote:
> I've been playing around with the idea of socket-activated containers
> proposed in:
> 
> http://0pointer.de/blog/projects/socket-activated-containers.html.
> 
> This seems like a really neat idea.  I'm curious if there's any facility
> I could use to *stop* a container after some period of idle time (where
> "idle time" means "lack of activity on the listening sockets that were
> responsible for activating it").
http://0pointer.de/blog/projects/socket-activated-containers.html says:

  With systemd 197 you have everything to set up your own socket
  activated OS containers on-board. However, there are a couple of
  improvements we're likely to add soon: for example, right now even
  if all services inside the container exit on idle, the container
  still will stay around, and we really should make it exit on idle
  too, if all its services exited and no logins are around. As it
  turns out we already have much of the infrastructure for this
  around: we can reuse the auto-suspend functionality we added for
  laptops: detecting when a laptop is idle and suspending it then is a
  very similar problem to detecting when a container is idle and
  shutting it down then.

Zbyszek


More information about the systemd-devel mailing list