Skip to content

watchfrr: don't admit to systemd that we restart - #23088

Merged
donaldsharp merged 1 commit into
FRRouting:masterfrom
opensourcerouting:systemd-reload-unfuck
Aug 20, 2026
Merged

donaldsharp merged 1 commit into
FRRouting:masterfrom
opensourcerouting:systemd-reload-unfuck

Conversation

@eqvinox

@eqvinox eqvinox commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

As of systemd 259 (98734ac74d16), once you're telling it that you're stopping, you're stopping, full stop. systemd will make sure of it.

So, I guess we just shouldn't admit to systemd that we're restarting.

Fixes: #20430
References: systemd/systemd@98734ac

@greptile-apps

This comment was marked as low quality.

Comment thread watchfrr/watchfrr.c
static FRR_NORETURN void sigint(void)
{
zlog_notice("Terminating on signal");
systemd_send_stopping();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I guess I'm grumpy about removing this. I use the status line in systemd status frr to help me understand where we are sometimes. It's useful information that I don't want to loose.

As I understand it this is a problem in relation to reload -vs- restart. restart works fine. reload restarts watchfrr causing this problem. We are long term going to a system where watchfrr needs to be informed about what daemons it needs to know about. Why not teach it now?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As discussed on Slack, this is the correct fix at this time. We're not stopping, we can't tell systemd we're stopping. This is orthogonal to adding functionality to change the set of daemons in watchfrr really.

@donaldsharp

Copy link
Copy Markdown
Member

Spoke w/ David. The reload operation will send a SIG_USR1 signal which will send a STATUS= Restarting due to config change instead of STOPPING=1. SIG_TERM will continue to send the STOPPING=1. The reload scripts will signal a SIG_USR1 instead of a SIG_TERM when reload is issued

As of systemd 259 (98734ac74d16), once you're telling it that you're
stopping, you're _stopping_, full stop.  systemd will make sure of it.

So, I guess we just shouldn't admit to systemd that we're restarting.
Use `SIGUSR1` for reload instead, so it just gives systemd a bit of text
instead.

Fixes: FRRouting#20430
References: systemd/systemd@98734ac
Signed-off-by: David 'equinox' Lamparter <equinox@opensourcerouting.org>
@eqvinox
eqvinox force-pushed the systemd-reload-unfuck branch from 2ce8aa9 to 34a9f14 Compare August 20, 2026 16:52
@github-actions github-actions Bot added size/S and removed size/XS labels Aug 20, 2026
@eqvinox

eqvinox commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

Spoke w/ David. The reload operation will send a SIG_USR1 signal which will send a STATUS= Restarting due to config change instead of STOPPING=1. SIG_TERM will continue to send the STOPPING=1. The reload scripts will signal a SIG_USR1 instead of a SIG_TERM when reload is issued

done

@donaldsharp
donaldsharp merged commit 2b5c032 into FRRouting:master Aug 20, 2026
22 checks passed
@eqvinox

eqvinox commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

@Mergifyio backport stable/10.7 stable/10.6 stable/10.5 stable/10.4

@mergify

mergify Bot commented Aug 20, 2026 •

Copy link
Copy Markdown

backport stable/10.7 stable/10.6 stable/10.5 stable/10.4

✅ Backports have been created

Details

Cherry-pick of 34a9f14 has failed:

On branch mergify/bp/stable/10.6/pr-23088
Your branch is up to date with 'origin/stable/10.6'.

You are currently cherry-picking commit 34a9f14d6.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   tools/frrinit.sh.in
	modified:   watchfrr/watchfrr.c

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   tools/frrcommon.sh.in

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

Cherry-pick of 34a9f14 has failed:

On branch mergify/bp/stable/10.5/pr-23088
Your branch is up to date with 'origin/stable/10.5'.

You are currently cherry-picking commit 34a9f14d6.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   tools/frrinit.sh.in
	modified:   watchfrr/watchfrr.c

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   tools/frrcommon.sh.in

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

Cherry-pick of 34a9f14 has failed:

On branch mergify/bp/stable/10.4/pr-23088
Your branch is up to date with 'origin/stable/10.4'.

You are currently cherry-picking commit 34a9f14d6.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   tools/frrinit.sh.in
	modified:   watchfrr/watchfrr.c

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   tools/frrcommon.sh.in

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@eqvinox
eqvinox deleted the systemd-reload-unfuck branch August 20, 2026 19:19
donaldsharp added a commit that referenced this pull request Aug 21, 2026
watchfrr: don't admit to systemd that we restart (backport #23088)
Jafaral added a commit that referenced this pull request Aug 26, 2026
watchfrr: don't admit to systemd that we restart (backport #23088)
Jafaral added a commit that referenced this pull request Aug 26, 2026
watchfrr: don't admit to systemd that we restart (backport #23088)
donaldsharp added a commit that referenced this pull request Sep 3, 2026
watchfrr: don't admit to systemd that we restart (backport #23088)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

systemctl reload frr failing with more recent systemd

2 participants