Re: [systemd-devel] Smooth upgrades for socket activated services

2023-03-03 Thread Mike Hearn
Ah, to clarify, I'm talking about app-specific servers not Linux system services, so dbus isn't really relevant (what would it be used for?). The sort of programs that tend to be packaged with Docker today, or deployed using AWS Lambda or just copied up to the server. For example a typical

Re: [systemd-devel] Smooth upgrades for socket activated services

2023-03-03 Thread Lennart Poettering
On Fr, 03.03.23 10:16, Mike Hearn (mike@hydraulic.software) wrote: > Sorry, by "apps" I meant anything not supplied by OS developers. In > this context, servers e.g. custom web app servers. I do currently run > some of those with DynamicUser=1 and similar. > > > As long as the tool updating the

Re: [systemd-devel] Smooth upgrades for socket activated services

2023-03-03 Thread Luca Boccassi
On Fri, 3 Mar 2023 at 09:17, Mike Hearn wrote: > > > > But of course such an approach requires that services are written in a > > > > way this is possible > > > > > > Right. I think that'd be quite hard to do especially with servers > > > written in portable languages that don't expose stuff

Re: [systemd-devel] Smooth upgrades for socket activated services

2023-03-03 Thread Mike Hearn
Sorry, by "apps" I meant anything not supplied by OS developers. In this context, servers e.g. custom web app servers. I do currently run some of those with DynamicUser=1 and similar. > As long as the tool updating the disk image creates the new one under > a temporary name, and then replaces the

Re: [systemd-devel] Smooth upgrades for socket activated services

2023-03-03 Thread Lennart Poettering
On Do, 02.03.23 23:05, Mike Hearn (mike@hydraulic.software) wrote: > > There's currently no mechanism for that. File an RFE issue. > > https://github.com/systemd/systemd/issues/26647 > > > In the "Portable Services" concept we currently assume you update the > > disk image ("DDI") the service is

Re: [systemd-devel] Smooth upgrades for socket activated services

2023-03-02 Thread Mike Hearn
> There's currently no mechanism for that. File an RFE issue. https://github.com/systemd/systemd/issues/26647 > In the "Portable Services" concept we currently assume you update the > disk image ("DDI") the service is on, and then simply restart the > service while leaving the socket around.

Re: [systemd-devel] Smooth upgrades for socket activated services

2023-03-02 Thread Lennart Poettering
On Mo, 20.02.23 11:05, Mike Hearn (mike@hydraulic.software) wrote: > 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,

Re: [systemd-devel] Smooth upgrades for socket activated services

2023-03-01 Thread Michal Koutný
Hello Mike. On Mon, Feb 20, 2023 at 11:05:41AM +0100, Mike Hearn wrote: > 2. Is it possible to run two versions of a service unit at once such > that the old version finishes handling connections and then shuts > down, whilst new connections are being handled by the new version? This is a

Re: [systemd-devel] Smooth upgrades for socket activated services

2023-02-21 Thread Uoti Urpala
On Mon, 2023-02-20 at 12:22 +0100, Mike Hearn wrote: > I see. So basically you have to keep the service running across the > upgrade and then wait for it to shut down due to inactivity, then be > restarted by systemd to make the update apply. Or alternatively you > could make the app detect that

Re: [systemd-devel] Smooth upgrades for socket activated services

2023-02-20 Thread Mike Hearn
I see. So basically you have to keep the service running across the upgrade and then wait for it to shut down due to inactivity, then be restarted by systemd to make the update apply. Or alternatively you could make the app detect that it's been updated, stop accepting new connections, finish

Re: [systemd-devel] Smooth upgrades for socket activated services

2023-02-20 Thread Michael Biebl
Am Mo., 20. Feb. 2023 um 11:06 Uhr schrieb Mike Hearn : > > 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,

[systemd-devel] Smooth upgrades for socket activated services

2023-02-20 Thread Mike Hearn
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