Bug#736258: systemd invoke-rc.d stop unsafe if socket is activated

Michael Biebl biebl at debian.org
Sat Jul 26 21:57:20 BST 2014


Am 26.07.2014 22:15, schrieb Henrique de Moraes Holschuh:
>> Up until now, we do not generate explicit maintainer scripts code to
>> stop the socket during upgrades. The underlying idea was, that keeping
>> the socket open would allow to not lose any incoming message.
> 
> This is, unfortunately, exactly the wrong thing to do in many cases.

Let me add here, that there are very few packages currently shipping
socket activated services.
And we back then concluded that it should be up to the package
maintainer to decide what kind of behaviour he wants for his package
during upgrades.

If invoke-rc.d by default stops both .socket and .service, the package
maintainer no longer has this option.

>> Unfortunately, triggering a service start mid way through the upgrade is
>> not a good idea. We'd need a facility in systemd to defer/block incoming
>> requests until the service is ready.
> 
> Indeed.
> 
>> Since we don't have that, we concluded that dh-systemd should generate
>> maintainer scripts code to stop the socket as well as the service. See [1].
> 
> That won't cut it, unless you can do the same to systemd's invoke-rc.d.

There is no "systemd's invoke-rc.d". The only existing invoke-rc.d
implementation is shipped in sysv-rc.

> Changing that would be *really* painful, and require that we audit a very
> large number of packages. 

Well, not really. Atm only very few packages have socket activation
enabled and this is an explicit action by the package maintainer. We
also added a short section to [1] regarding socket activated services.
Admittedly this document needs further improvement.
If a package uses restart-after-upgrade (and has no further system
scripts) there actually isn't any problem during upgrades, only the
removal case needs an explicit stop of the socket.

That said, package maintainers atm need to be aware of this for now and
deal with it accordingly, i.e. by explicitly managing the socket in
their maintainer scripts (and accompanying system scripts).

Michael


[1] https://wiki.debian.org/systemd/Packaging
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 884 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20140726/79184b66/attachment-0005.sig>


More information about the Pkg-systemd-maintainers mailing list