[systemd-devel] Smooth upgrades for socket activated services
Mike Hearn
mike at hydraulic.software
Mon Feb 20 11:22:23 UTC 2023
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
servicing the old connections, and then shut itself down once all existing
connections are finished. On restart it'd then be using the new code,
re-accept the socket from systemd and start accepting again.
I guess this can work for quiet services that are safe to change on disk
because they open everything at startup and never close or re-open the fds,
or if there's a snapshotting layer on top.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20230220/99ea57f0/attachment.htm>
More information about the systemd-devel
mailing list