Repository navigation
fix: reset journald.conf back to packaged version if overridden - #1067
Merged
Merged
Conversation
j4n
reviewed
Oct 22, 2026
j4n
left a comment
Contributor
There was a problem hiding this comment.
I think this is the wrong approach, which comes with a number of potential issues. We should indeed restore the original version an put it there: the previous PR meant we stopped touching the config file, which is a good thing, also for unattended-upgrades.
We can check against the last cmdeploy-deployed has, delete, and reinstall:
# hash of journald.conf relay shipped before #1053
OLD_JOURNALD_SHA256 = "107c678516c972d5293a67386458fd4785d467cfa2f2b7174185e9a74e034be5"
def configure(self):
self.put_file("90-volatile-logging.conf", "/etc/systemd/journald.conf.d/90-volatile-logging.conf")
if host.get_fact(Sha256File, "/etc/systemd/journald.conf") == OLD_JOURNALD_SHA256:
server.shell(
name="Restore Debian's journald.conf",
commands=[
"rm /etc/systemd/journald.conf",
"DEBIAN_FRONTEND=noninteractive apt-get install -y --reinstall -o Dpkg::Options::=--force-confmiss systemd",
],
)
I tested this on a local incus container. As far as I can see this would cover all cases.
j4n
approved these changes
Oct 25, 2026
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.
follow-up to #1053, thanks @punkero-org for pointing this out in f27de2a#commitcomment-205961156 :)