zfs.target should not require zfs-share.service

Bug #1614789 reported by Maciej Puzio on 2016-08-19
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zfs-linux (Ubuntu)
Colin Ian King
Colin Ian King

Bug Description

== SRU Xenial ==


Currently package zfsutils-linux contains systemd target file /lib/systemd/system/zfs.target that specifies following dependencies:

zfs-share.service is not essential in setups where file sharing is not used, or when it is configured without the use of the zfs utility. The user may therefore choose to mask this service. However, doing so has an unexpected and confusing effect, preventing zfs from starting on boot at all. This is because zfs.target is the only zfs-related unit that is wanted by multi-user.target, and if one of its required services is masked, zfs.target is skipped, together with zfs-mount.service. A solution is to replace "Requires=zfs-share.service" with "Wants=zfs-share.service".

Steps to reproduce:
systemctl mask zfs-share.service

Expected results:
Module zfs is loaded
zfs-mount.service is active and ZFS filesystems are mounted
ZFS filesystems are not shared

Observed results:
Module zfs is not loaded
ZFS filesystems are not mounted
zpool status produces an error:
"The ZFS modules are not loaded.
Try running '/sbin/modprobe zfs' as root to load them."

With the fix, the modules are loaded and zfs filesystems are mounted

A solution is to replace "Requires=zfs-share.service" with "Wants=zfs-share.service".

[Regression Potential]
Minimal, this affects the start up of a service that should be starting and currently isn't. Limited to just this specific scenario.


$ lsb_release -rd
Description: Ubuntu 16.04.1 LTS
Release: 16.04

$ apt-cache policy zfsutils-linux

affects: autofs (Ubuntu) → zfs-linux (Ubuntu)
Changed in zfs-linux (Ubuntu):
importance: Undecided → Low
assignee: nobody → Colin Ian King (colin-king)
status: New → In Progress
Changed in zfs-linux (Ubuntu):
importance: Low → Medium
Colin Ian King (colin-king) wrote :

This issue only affects Xenial and Yakkety.

Changed in zfs-linux (Ubuntu Xenial):
importance: Undecided → Medium
Changed in zfs-linux (Ubuntu Yakkety):
importance: Undecided → Medium
Changed in zfs-linux (Ubuntu Xenial):
assignee: nobody → Colin Ian King (colin-king)
Changed in zfs-linux (Ubuntu Yakkety):
assignee: nobody → Colin Ian King (colin-king)
Colin Ian King (colin-king) wrote :

I was wrong, just Xenial requires this fix.

no longer affects: zfs-linux (Ubuntu Yakkety)
Changed in zfs-linux (Ubuntu Xenial):
status: New → In Progress

Hello Maciej, or anyone else affected,

Accepted zfs-linux into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/zfs-linux/ in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in zfs-linux (Ubuntu Xenial):
status: In Progress → Fix Committed
description: updated
Colin Ian King (colin-king) wrote :

I've testing this with the -proposed zfstools-linux with 5 separate reboots and the zfs mounts work on each boot now, where as without the fix they didn't mount. So it looks fixed to me.

tags: added: verification-done
description: updated
description: updated
tags: added: verification-done-xenial
removed: verification-done
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package zfs-linux -

zfs-linux ( xenial; urgency=medium

  * Fix incorrect path to rm in zfs-share.service.in (LP: #1684731)
  * Set zfs-share.service to Wants in zfs.target (LP: #1614789)
    - Change from Requires to Wants to stop systemctl mask
      zfs-share.service from breaking zfs mounts

 -- Colin Ian King <email address hidden> Mon, 22 May 2017 17:13:44 +0100

Changed in zfs-linux (Ubuntu Xenial):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for zfs-linux has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Changed in zfs-linux (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers