Skip to content

fix: reset journald.conf back to packaged version if overridden - #1067

Merged
missytake merged 4 commits into
mainfrom
restore-default-journald-conf
Oct 25, 2026
Merged

missytake merged 4 commits into
mainfrom
restore-default-journald-conf

Conversation

@missytake

Copy link
Copy Markdown
Contributor

follow-up to #1053, thanks @punkero-org for pointing this out in f27de2a#commitcomment-205961156 :)

@missytake
missytake requested a review from j4n October 21, 2026 16:50

@j4n j4n left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread cmdeploy/src/cmdeploy/basedeploy.py Resolved
Comment thread cmdeploy/src/cmdeploy/basedeploy.py Resolved
Comment thread cmdeploy/src/cmdeploy/basedeploy.py Resolved
@missytake missytake changed the title fix: comment out overridden values in journald.conf fix: reset journald.conf back to packaged version if overridden Oct 25, 2026
@missytake
missytake requested a review from j4n October 25, 2026 12:33
@missytake
missytake merged commit daffa92 into main Oct 25, 2026
8 checks passed
@missytake
missytake deleted the restore-default-journald-conf branch October 25, 2026 18:37
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.

2 participants