Skip to content

Conversation

@zigarn
Copy link

@zigarn zigarn commented Sep 21, 2025

  • reloading notification, allow to switch to Type=notify-reload and remove ExecReload in the systemd unit
  • stopping notification, allow systemd to know in case of stopping from non-systemd

@pajod
Copy link
Contributor

pajod commented Sep 21, 2025

I submitted a very similar patch as part of #3285 which is only slightly different:

  • your code for the timestamps is both correct where mine was wrong and more obviously the correct clock
  • I have an extra branch because I try to also gracefully handle the edge case of aborted master-reexec without confusing systemd about which is the new-old $MAINPID

[Service]
# gunicorn can let systemd know when it is ready
Type=notify
Type=notify-reload
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beware that systemd considers most unit parsing errors safe to proceed with, so this can unexpectedly revert to the default of simple on v<253, e.g. on some stable distributions. Debian 12 "bookworm" ships v252 and Ubuntu 22.04 LTS "jammy" ships v249.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the info, I updated the PR to explain this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines starting with # are comments in systemd. (Please keep up expecting software to be designed with common conventions in mind! That - reasonable - expectation is what keeps is from straying further into "surprise feature" territory.)

@zigarn zigarn force-pushed the systemd-notify-reload branch from 93d8eec to 3f9446f Compare October 5, 2025 11:26
Avoid the use of 'ExecReload' as advised in systemd.service(5)
@zigarn zigarn force-pushed the systemd-notify-reload branch from 3f9446f to 25a31e7 Compare October 10, 2025 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants