Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
systemd
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Walter Lozano
systemd
Commits
514b7369
Commit
514b7369
authored
3 years ago
by
Detlev Casanova
Browse files
Options
Downloads
Patches
Plain Diff
Fix issue with journald and /var at shutdown
https://phabricator.apertis.org/T7904
Signed-off-by:
Detlev Casanova
<
detlev.casanova@collabora.com
>
parent
1f70b58b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
debian/changelog
+6
-0
6 additions, 0 deletions
debian/changelog
debian/patches/apertis/systemd-journal-flush-Add-a-requirement-on-var.mount.patch
+43
-0
43 additions, 0 deletions
...ystemd-journal-flush-Add-a-requirement-on-var.mount.patch
debian/patches/series
+1
-0
1 addition, 0 deletions
debian/patches/series
with
50 additions
and
0 deletions
debian/changelog
+
6
−
0
View file @
514b7369
systemd (247.3-6+apertis3) apertis; urgency=medium
* systemd-journal-flush: Add a requirement on var.mount
-- Detlev Casanova <detlevi.casanova@collabora.com> Wed, 26 Jan 2022 15:53:23 -0500
systemd (247.3-6+apertis2) apertis; urgency=medium
* d/p/basic-linux-Sync-if_arp.h-with-Linux-5.14.patch:
...
...
This diff is collapsed.
Click to expand it.
debian/patches/apertis/systemd-journal-flush-Add-a-requirement-on-var.mount.patch
0 → 100644
+
43
−
0
View file @
514b7369
From: Detlev Casanova <detlev.casanova@collabora.com>
Date: Wed, 26 Jan 2022 15:30:42 -0500
Subject: systemd-journal-flush: Add a requirement on var.mount.
On some systems (like ostree), /var is already mounted (bind) when systemd
starts and is not in /etc/fstab, so there is no var.mount file (fragment)
generated by systemd-fstab-generator
var.mount unit still exists: it instantiated via /proc/self/mountinfo
RequiresMountsFor= does not add Requires= dependencies for .mount units if
there is no corresponding fragment file (it still adds them After=, though -
see unit_add_mount_dependencies() in unit.c)
=> systemd-journal-flush.service will have After=var.mount but no
Requires=var.mount.
=> On shutdown, nothing causes systemd-journal-flush.service to be stopped as
it does not require var.mount.
See https://github.com/systemd/systemd/issues/867#issuecomment-890768048
for details
This patch adds the Require= for var.mount. It fixes the unmounting of
/var at shutdown and doesn't influence systems that let systemd mount
/var.
Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
---
units/systemd-journal-flush.service | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/units/systemd-journal-flush.service b/units/systemd-journal-flush.service
index 1a71592..e258866 100644
--- a/units/systemd-journal-flush.service
+++ b/units/systemd-journal-flush.service
@@ -11,7 +11,7 @@
Description=Flush Journal to Persistent Storage
Documentation=man:systemd-journald.service(8) man:journald.conf(5)
DefaultDependencies=no
-Requires=systemd-journald.service
+Requires=systemd-journald.service var.mount
After=systemd-journald.service systemd-remount-fs.service
Before=systemd-tmpfiles-setup.service
RequiresMountsFor=/var/log/journal
This diff is collapsed.
Click to expand it.
debian/patches/series
+
1
−
0
View file @
514b7369
...
...
@@ -40,3 +40,4 @@ apertis/Remove-bashisms-from-the-entry-directory-plugin.patch
apertis/kernel-install-allow-to-create-BOOT-MACHINE_ID.patch
apertis/Fix-the-path-to-bootable-binaries-in-efi-entry.patch
apertis/basic-linux-Sync-if_arp.h-with-Linux-5.14.patch
apertis/systemd-journal-flush-Add-a-requirement-on-var.mount.patch
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment