Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant agent graceful restart #704

Merged
merged 1 commit into from
Sep 16, 2024
Merged

Conversation

DavidePrincipi
Copy link
Member

@DavidePrincipi DavidePrincipi commented Sep 13, 2024

The agent no longer needs a restart during module updates since its configuration is no longer dependent on the module itself. A restart is only required during core updates.

I noticed SIGUSR1 runs multiple times during core-update if core and Loki (for example) are updated together.

[root@rl1 ~]# journalctl --since=07:03:19 --grep Signal
Sep 13 07:03:19 rl1.dp.nethserver.net agent@node[31796]: Signal "user defined signal 1" caught: shutdown started.
Sep 13 07:03:19 rl1.dp.nethserver.net agent@ldapproxy1[32757]: Signal "user defined signal 1" caught: shutdown started.
Sep 13 07:03:19 rl1.dp.nethserver.net agent@loki1[32786]: Signal "user defined signal 1" caught: shutdown started.
Sep 13 07:03:19 rl1.dp.nethserver.net agent@traefik1[32152]: Signal "user defined signal 1" caught: shutdown started.
Sep 13 07:03:27 rl1.dp.nethserver.net agent@loki1[33746]: Signal "user defined signal 1" caught: shutdown started.
Sep 13 07:03:42 rl1.dp.nethserver.net agent@cluster[31791]: Signal "user defined signal 1" caught: shutdown started.

The removed lines were originally added in this commit a90baa3.

When SIGUSR1 is caught, the agent stops running new tasks until the currently running ones finish. This can lead to deadlocks if a running task enqueues a new subtask and waits for it. I think we need to modify the current behavior to prevent these deadlocks (in another PR).

Refs NethServer/dev#7016

The agent no longer needs a restart during module updates since its
configuration is no longer dependent on the module itself. A restart is
only required during core updates.
@DavidePrincipi DavidePrincipi merged commit ecaa0cd into main Sep 16, 2024
2 checks passed
@DavidePrincipi DavidePrincipi deleted the cleanup-usr1 branch September 16, 2024 13:06
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.

3 participants