Am Mo., 20. Feb. 2023 um 11:06 Uhr schrieb Mike Hearn <mike@hydraulic.software>: > > Hi, > > I'm exploring socket activation as part of work on a tool that makes > systemd-controlled servers easier to deploy and use. Given a config > file the tool builds a package that contains the app and systemd > units, uploads it, installs it with dependency resolution, the > postinst scripts start the service etc. It's sort of a Docker > alternative that's more classically Linux-y, designed for a world > where really big machines are really cheap and thus many apps don't > need to be cattle-ized. Pets are sometimes OK. > > As part of this I'm looking at how to make upgrades smooth. Socket > activation already allows you to shut down, upgrade and restart a > service without dropping connections because systemd will hold the > connections until the service comes back but there are a couple of > aspects that weren't really clear to me from reading the excellent > "pid eins" blog post series. Could we maybe get a new blog post > exploring these issues? > > 1. How exactly should you stop a service that's socket activated so it > won't be re-activated during the upgrade but new connections won't be > lost, e.g. in package scripts that are executed across upgrades. > Currently the scripts stop the service before the upgrade happens, > then restart afterwards. Currently, there is no way to "freeze" the execution of a socket activated service. A feature I'm missing as well, fwiw.