Repository navigation
Conversation
AtomicFS
approved these changes
Nov 6, 2026
AtomicFS
left a comment
Contributor
There was a problem hiding this comment.
On upgrade, dpkg calls postinst with "configure "
Not sure if this is correct, but this LGTM
AtomicFS
reviewed
Nov 6, 2026
|
|
||
| if command -v systemctl >/dev/null 2>&1; then | ||
| systemctl daemon-reload || true | ||
| if [ -d /run/systemd/system ]; then |
Contributor
There was a problem hiding this comment.
I am not completely sold on this IF statement change though.
depate
marked this pull request as draft
November 6, 2026 16:06
Restart dutagent on package upgrade The postinstall script reloads systemd but does not restart a running dutagent.service. After an upgrade the old binary keeps running, and clients see a version mismatch (dutctl client 1.0.0-beta.1 is newer than dutagent 1.0.0-alpha.2) until someone restarts it by hand. This change runs systemctl try-restart dutagent.service on upgrade, which matches what debhelper's dh_installsystemd does by default: - try-restart restarts the service only if it is running. A stopped or disabled agent stays that way. - A fresh install does not start the agent, so an install with no config yet is not affected. - The script skips this on systems without systemd, such as containers and chroots. Note: an upgrade now drops active dutctl sessions on that agent. Signed-off-by: Patrik Tesarik <patrik.tesarik@9elements.com>
depate
force-pushed
the
fix/postinstall_restart
branch
from
November 6, 2026 16:07
c4434d4 to
eb38b2c
Compare
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AI disclosure
This patch and the last section of the commit/PR message were co-authored by Claude Code Opus 5.5, after human analysis of the cause and has been reviewed by me to the best of my knowledge.
I could not test the patch. If merged, we can check retrospectively, if the next release will trigger a service restart after package upgrade. Mitigating an (unexpected) version mismatch.
Restart dutagent on package upgrade
The postinstall script reloads systemd but does not restart a running dutagent.service. After an upgrade the old binary keeps running, and clients see a version mismatch (dutctl client 1.0.0-beta.1 is newer than dutagent 1.0.0-alpha.2) until someone restarts it by hand.
This change runs systemctl try-restart dutagent.service on upgrade, which matches what debhelper's dh_installsystemd does by default:
Note: an upgrade now drops active dutctl sessions on that agent.