-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[phased-restart] add support for systemd type notify #2572
Comments
@josefbilendo To clarify, with a phased-restart, would you like |
In my opinion we should invoke I think it makes sense to keep the "reloading" state till the phased-restart is complete – because that's a more accurate representation of the real state. |
@josefbilendo I've got an 'almost finished' patch for this. I'm wondering if it would be better to add another hook, maybe 'on_restart_*', where * is one of 'done', 'finished', or 'complete'? |
@MSP-Greg I don't think there is anything against implementing another hook as long as we update the service state. |
@josefbilendo Thanks for the reply. Right now I've got it working as you mentioned, iow, both hot & phased restart (both cluster & single) are calling Not sure about adding another method name... @nateberkopec Thoughts? The passing test file in the new system: |
@MSP-Greg thoughts on adding a new method name/event type specifically, you mean? |
Yes. I don't really have an opinion, wasn't sure if there was a need... |
How is your progress on this issue? |
@josefbilendo Sorry, the original work I did on this was tied into a bunch of other small changes... Anyway, I'll push a PR today or tomorrow. |
@MSP-Greg |
The PR #2438 added support for systemd services of type
notify
.The Problem:
The systemd status gets updated as expected when performing a
hot restart
.But the status stays
active
when performing aphased restart
.In the current implementation,
SdNotify.reloading
is never called during aphased restart
.A Common Scenario:
If we perform a
phased restart
, Puma terminates an old worker and starts a new one.And if Puma is not able to boot up a new worker for some reason, it keeps trying.
In this case, the systemd status shouldn't stay active.
During a
phased restart
the status should be reloading.Additional Context:
We monitor the status of all our systemd processes.
If the status of a process is not active any more (for a certain period of time), we get notified.
It would be awesome to keep this monitoring approach for Puma as well.
The text was updated successfully, but these errors were encountered: