siderolabs / talos

Talos Linux is a modern Linux distribution built for Kubernetes.
https://www.talos.dev
Mozilla Public License 2.0
6.75k stars 540 forks source link

Reparenting child processes within system-extenstion services #9178

Open wvh-github opened 2 months ago

wvh-github commented 2 months ago

Feature Request

The ability to reparent child processes launched from within containers or talos system-extentions.

Description

We are creating a system extension to take some responsibility in launching child processes. In our case these are virtual machines. We are concerned that when multiple processes are running they all get reaped when one dies. Would it be possible to keep the children running, and reparent them as soon as the service restarts?

smira commented 2 months ago

This is more of a generic UNIX question, and doesn't have to do anything with Talos Linux.

In general, when the parent dies, children are not reaped, but in the container when the entrypoint dies, the whole container is terminated.

So you would need to have your entrypoint to never die. The children will be re-assigned to the entrypoint process if the parent dies.