Better fix for the empty notification issue#4242
Conversation
This undoes 531ac2b. I acked that patch without looking at the code carefully enough. There are two problems: - we want to process the fds anyway - in principle empty notification messages are valid, and we should process them as usual, including logging using log_unit_debug().
It's probably easier to diagnose a bad notification message if the contents are printed. But still, do anything only if debugging is on.
fbuihuu
left a comment
There was a problem hiding this comment.
Hmm I don't get the "we want to process the fds anyway" part.
To process an fds, isn't the service supposed to pass "FDSTORE=1" ?
|
If you want them stored, then yes. But from systemd side, we want to process and do something with them: if we are not going to handle the message we should close the fds. |
|
Hmm you mean that a service may want to send a fds with an empty message and can expect that systemd will close them ? If so I don't see how this can be useful and therefore why we would want to support this. BTW how are the remaining fds which are not handled by the message closed exactly ? |
|
Remaining fds are cleanup up by the auto-cleanup function. It's not about being useful, but about proper cleanup. |
martinpitt
left a comment
There was a problem hiding this comment.
This makes sense, and Zbigniew also tested/verified this with python-systemd. This will get a proper test case soon, but let's push this out ASAP. Thanks!
No description provided.