krallin / tini

A tiny but valid `init` for containers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add an option to restart the child process

ashishshinde opened this issue · comments

Some applications need to be restarted, for example, to reload the configuration. For various reasons they do not/cannot implement a signal-based graceful reload of configuration.

In containerized environments, containers restart can be costly for applications like databases that would need to scan disk to recreate indices or caches on container delete and restart. For example, the Aerospike NoSQL database stores the indices in shared memory to enable a quick restart and will benefit from restarting within the container without having shared memory segments being lost.

A -r option can be added such that when tini receives this, it terminates and restarts the child process to enable graceful reloads of configuration without losing shared memory or caches stored on ephemeral storage.

I think this is "out of scope" for tini: #71 (comment), #146, #187