[Bug 2641] Add systemd notify code to to track running server
bugzilla-daemon at mindrot.org
bugzilla-daemon at mindrot.org
Mon Apr 1 00:36:54 AEDT 2024
https://bugzilla.mindrot.org/show_bug.cgi?id=2641
--- Comment #22 from Luca Boccassi <luca.boccassi at gmail.com> ---
(In reply to Colin Watson from comment #21)
> (In reply to Luca Boccassi from comment #19)
> > Mmmh hang on I don't think that should be the case. The
> > MONOTONIC_USEC is for the Type=notify-reload workflow, that
> > automatically hooks sighup to the service, and is newer. But
> > RELOADING=1 -> READY=1 by itself should work with the older workflow
> > where you manually specify an ExecReload=kill -HUP $MAINPID in the
> > unit.
>
> Ah, you may be right. I was just going by looking at the code and
> hadn't actually tested removing RELOADING=1. Probably best to leave
> it in then.
I have tested the packages you published and the reloading notification
is working:
Mar 31 14:34:28 localhost systemd[1]: ssh.service: Trying to enqueue
job ssh.service/reload/replace
Mar 31 14:34:28 localhost systemd[1]: ssh.service: Installed new job
ssh.service/reload as 1333
Mar 31 14:34:28 localhost systemd[1]: ssh.service: Enqueued job
ssh.service/reload as 1333
Mar 31 14:34:28 localhost systemd[1]: ssh.service: Will spawn child
(service_enter_reload): /usr/sbin/sshd
Mar 31 14:34:28 localhost systemd[1]: ssh.service: About to execute:
/usr/sbin/sshd -t
Mar 31 14:34:28 localhost (sshd)[3824]: Found cgroup2 on
/sys/fs/cgroup/, full unified hierarchy
Mar 31 14:34:28 localhost systemd[1]: ssh.service: Forked
/usr/sbin/sshd as 3824 (without CLONE_INTO_CGROUP)
Mar 31 14:34:28 localhost systemd[1]: ssh.service: Changed running ->
reload
Mar 31 14:34:28 localhost systemd[1]: Reloading ssh.service - OpenBSD
Secure Shell server...
Mar 31 14:34:28 localhost (sshd)[3824]: Found cgroup2 on
/sys/fs/cgroup/, full unified hierarchy
Mar 31 14:34:28 localhost systemd[1]: ssh.service: Child 3824 belongs
to ssh.service.
Mar 31 14:34:28 localhost systemd[1]: ssh.service: Control process
exited, code=exited, status=0/SUCCESS (success)
Mar 31 14:34:28 localhost systemd[1]: ssh.service: Running next control
command for state reload.
Mar 31 14:34:28 localhost systemd[1]: ssh.service: Will spawn child
(service_run_next_control): /bin/kill
Mar 31 14:34:28 localhost systemd[1]: ssh.service: About to execute:
/bin/kill -HUP "\$MAINPID"
Mar 31 14:34:28 localhost (kill)[3826]: Found cgroup2 on
/sys/fs/cgroup/, full unified hierarchy
Mar 31 14:34:28 localhost systemd[1]: ssh.service: Forked /bin/kill as
3826 (without CLONE_INTO_CGROUP)
Mar 31 14:34:28 localhost (kill)[3826]: Found cgroup2 on
/sys/fs/cgroup/, full unified hierarchy
Mar 31 14:34:28 localhost sshd[3812]: Received SIGHUP; restarting.
Mar 31 14:34:28 localhost systemd[1]: ssh.service: Got notification
message from PID 3812 (RELOADING=1)
Mar 31 14:34:28 localhost systemd[1]: ssh.service: Child 3826 belongs
to ssh.service.
Mar 31 14:34:28 localhost systemd[1]: ssh.service: Control process
exited, code=exited, status=0/SUCCESS (success)
Mar 31 14:34:28 localhost systemd[1]: ssh.service: Got final SIGCHLD
for state reload.
Mar 31 14:34:28 localhost systemd[1]: ssh.service: Changed reload ->
reload-notify
Mar 31 14:34:28 localhost systemd[1]: ssh.service: Got notification
message from PID 3812 (READY=1)
Mar 31 14:34:28 localhost systemd[1]: ssh.service: Changed
reload-notify -> running
Mar 31 14:34:28 localhost systemd[1]: ssh.service: Job 1333
ssh.service/reload finished, result=done
Mar 31 14:34:28 localhost systemd[1]: Reloaded ssh.service - OpenBSD
Secure Shell server.
Mar 31 14:34:28 localhost sshd[3812]: Server listening on 0.0.0.0 port
22.
Mar 31 14:34:28 localhost sshd[3812]: Server listening on :: port 22.
--
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
More information about the openssh-bugs
mailing list