Skip to content

Include MONOTONIC_USEC in SystemD reload message - #110

Merged
Sharpie merged 2 commits into
OpenVoxProject:mainfrom
Sharpie:add-usec-to-reload
Aug 30, 2026
Merged

Include MONOTONIC_USEC in SystemD reload message#110
Sharpie merged 2 commits into
OpenVoxProject:mainfrom
Sharpie:add-usec-to-reload

Conversation

@Sharpie

@Sharpie Sharpie commented Aug 30, 2026

Copy link
Copy Markdown
Member

Short description

This commit adds the MONOTONIC_USEC field to the RELOADING message sent to SystemD. Omitting this field can cause SystemD to ignore reload messages and return from systemctl reload early.

See: https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#Type=

Checklist

I have:

@Sharpie

Sharpie commented Aug 30, 2026

Copy link
Copy Markdown
Member Author

Building openvox-server with EZbake 4.0, installing on EL 10, then removing ExecReload=kill -HUP $MAINPID from /usr/lib/systemd/system/puppetserver.service results in systemctl reload timing out as the RELOADING=1 message is ignored:

#  tail -f /var/log/puppetlabs/puppetserver/puppetserver.log
...
2026-08-30T00:15:50.493Z INFO  [async-mixed-1] [p.t.internal] Sending sd_notify message to NOTIFY_SOCKET "/run/systemd/notify": "RELOADING=1\n"
...
2026-08-30T00:15:55.371Z INFO  [async-mixed-1] [p.t.internal] Sending sd_notify message to NOTIFY_SOCKET "/run/systemd/notify": "READY=1\n"

# time systemctl reload puppetserver
Job for puppetserver.service failed.
See "systemctl status puppetserver.service" and "journalctl -xeu puppetserver.service" for details.

real    5m0.128s
user    0m0.001s
sys     0m0.006s

Re-building with this patch results in a systemctl reload that completes successfully:

#  tail -f /var/log/puppetlabs/puppetserver/puppetserver.log
...
2026-08-30T00:35:35.450Z INFO  [async-mixed-1] [p.t.internal] Sending sd_notify message to NOTIFY_SOCKET "/run/systemd/notify": "RELOADING=1\nMONOTONIC_USEC=197340680966\n"
...
2026-08-30T00:35:40.045Z INFO  [async-mixed-1] [p.t.internal] Sending sd_notify message to NOTIFY_SOCKET "/run/systemd/notify": "READY=1\n"
...

# time systemctl reload puppetserver                             00:38:47 [50/151]

real    0m4.780s
user    0m0.005s
sys     0m0.002s

@Sharpie
Sharpie enabled auto-merge August 30, 2026 16:58
@Sharpie Sharpie added the bug Something isn't working label Aug 30, 2026
Sharpie and others added 2 commits August 30, 2026 12:28
This commit adds the `MONOTONIC_USEC` field to the `RELOADING` message
sent to SystemD. Omitting this field can cause SystemD to ignore reload
messages and return from `systemctl reload` early.

See: https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#Type=

Signed-off-by: Charlie Sharpsteen <charlie@overlookinfratech.com>
This commit fixes two line-based exceptions to the Eastwood linter's
rules against reflection. These exceptions were very fragile as any work
to a file that caused line numbers to shift would result in unrelated
failures in the lint checks.

Both instances now use either type hinting or conditional logic to avoid
reflection.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Charlie Sharpsteen <charlie@overlookinfratech.com>
@Sharpie
Sharpie force-pushed the add-usec-to-reload branch from 01c4d55 to 0c4176f Compare August 30, 2026 19:28
@Sharpie
Sharpie disabled auto-merge August 30, 2026 19:29
@Sharpie
Sharpie enabled auto-merge August 30, 2026 19:30
@Sharpie
Sharpie merged commit 46a2484 into OpenVoxProject:main Aug 30, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants