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

systemd: wait for zfs mounts #10113

Merged
merged 3 commits into from Apr 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions overlord/snapstate/backend/mountunit_test.go
Expand Up @@ -88,6 +88,7 @@ func (s *mountunitSuite) TestAddMountUnit(c *C) {
[Unit]
Description=Mount unit for foo, revision 13
Before=snapd.service
After=zfs-mount.service

[Mount]
What=/var/lib/snapd/snaps/foo_13.snap
Expand Down
3 changes: 3 additions & 0 deletions systemd/systemd.go
Expand Up @@ -929,9 +929,12 @@ func MountUnitPath(baseDir string) string {

var squashfsFsType = squashfs.FsType

// XXX: After=zfs-mount.service is a workaround for LP: #1922293 (a problem
// with order of mounting most likely related to zfs-linux and/or systemd).
var mountUnitTemplate = `[Unit]
Description=Mount unit for %s, revision %s
Before=snapd.service
After=zfs-mount.service
mvo5 marked this conversation as resolved.
Show resolved Hide resolved

[Mount]
What=%s
Expand Down
6 changes: 6 additions & 0 deletions systemd/systemd_test.go
Expand Up @@ -745,6 +745,7 @@ func (s *SystemdTestSuite) TestAddMountUnit(c *C) {
[Unit]
Description=Mount unit for foo, revision 42
Before=snapd.service
After=zfs-mount.service

[Mount]
What=%s
Expand Down Expand Up @@ -778,6 +779,7 @@ func (s *SystemdTestSuite) TestAddMountUnitForDirs(c *C) {
[Unit]
Description=Mount unit for foodir, revision x1
Before=snapd.service
After=zfs-mount.service

[Mount]
What=%s
Expand Down Expand Up @@ -819,6 +821,7 @@ func (s *SystemdTestSuite) TestWriteSELinuxMountUnit(c *C) {
[Unit]
Description=Mount unit for foo, revision 42
Before=snapd.service
After=zfs-mount.service

[Mount]
What=%s
Expand Down Expand Up @@ -862,6 +865,7 @@ exit 0
[Unit]
Description=Mount unit for foo, revision x1
Before=snapd.service
After=zfs-mount.service

[Mount]
What=%s
Expand Down Expand Up @@ -901,6 +905,7 @@ exit 0
[Unit]
Description=Mount unit for foo, revision x1
Before=snapd.service
After=zfs-mount.service

[Mount]
What=%s
Expand Down Expand Up @@ -1141,6 +1146,7 @@ const unitTemplate = `
[Unit]
Description=Mount unit for foo, revision 42
Before=snapd.service
After=zfs-mount.service

[Mount]
What=%s
Expand Down