-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update-core. Fix update deadlock (#578)
When an agent receives signal USR1 it stops processing new tasks. During the execution of update-core, exclude the cluster agent from the graceful restart (or reload) request, so it can still process its self-submitted "update-module" tasks.
- Loading branch information
1 parent
2130ae1
commit 83f114b
Showing
2 changed files
with
45 additions
and
2 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
core/imageroot/var/lib/nethserver/cluster/actions/update-core/99reload_cluster_agent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
# | ||
# Copyright (C) 2024 Nethesis S.r.l. | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
# | ||
|
||
exec 1>&2 | ||
set -e | ||
|
||
# Ask the cluster agent to restart. To avoid update deadlocks, this must | ||
# be the last step of the cluster/update-core action. The node agent | ||
# already sent the USR1 signal to other agents, now it's our turn: | ||
pkill -USR1 -f -- 'agent --agentid=cluster' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters