zfsutils-linux: zfs-volume-wait.service fails with locked encrypted zvols

Bug #1888405 reported by James Dingwall on 2020-07-21
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zfs-linux (Ubuntu)
Medium
Colin Ian King
Focal
Medium
Unassigned
Groovy
Medium
Colin Ian King

Bug Description

== SRU Justification Focal ==

When an encrypted zvol is locked the zfs-volume-wait service does not start. The /sbin/zvol_wait should not wait for links when the volume has property keystatus=unavailable.

== Fix ==

The attached patch in comment #1.

== Test ==

lock an encrypted zvol. without the fix the volume wait will block the boot. with the fix it is not blocked.

== Regression Potential ==

Limited to zvol wait - this change affects just the encrypted vols checking.

-------------------------------------

I was doing some experimentation with encrypted zvols and observed that the zfs-volume-wait.service systemd unit does not start if the encrypted zvol is locked. The /sbin/zvol_wait should not wait for links when the volume has property keystatus=unavailable. The attached patch seems to resolve the issue for me.

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Release: 20.04
Codename: focal

# apt-cache policy zfsutils-linux
zfsutils-linux:
  Installed: 0.8.3-1ubuntu12.1
  Candidate: 0.8.3-1ubuntu12.2
  Version table:
     0.8.3-1ubuntu12.2 500
        500 http://gb.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
 *** 0.8.3-1ubuntu12.1 100
        100 /var/lib/dpkg/status
     0.8.3-1ubuntu12 500
        500 http://gb.archive.ubuntu.com/ubuntu focal/main amd64 Packages

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

The attachment "Patch for zvol_wait to ignore locked zvols" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Changed in zfs-linux (Ubuntu Focal):
status: New → In Progress
importance: Undecided → Critical
importance: Critical → Medium
description: updated
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package zfs-linux - 0.8.4-1ubuntu10

---------------
zfs-linux (0.8.4-1ubuntu10) groovy; urgency=medium

  * Fix volume wait on locked encrypted zvols (LP: #1888405)
    [ James Dingwall ]
    - 4620-zfs-vol-wait-fix-locked-encrypted-vols.patch
      zfs-volume-wait.service systemd unit does not start if the encrypted
      zvol is locked. The /sbin/zvol_wait should not wait for links when the
      volume has property keystatus=unavailable. Add a check for this.

 -- Colin Ian King <email address hidden> Wed, 22 Jul 2020 09:58:22 +0100

Changed in zfs-linux (Ubuntu Groovy):
status: In Progress → Fix Released

Hello James, or anyone else affected,

Accepted zfs-linux into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/zfs-linux/0.8.3-1ubuntu12.3 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, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

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

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

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

Tested with an encrypted locked zfs volumne, verified and no regressions found.

tags: added: verification-done-focal
Richard Laager (rlaager) wrote :

Here is a completely untested patch that takes a different approach to the same issue. If this works, it seems more suitable for upstreaming, as the existing list_zvols seems to be the place where properties are checked. Can either of you test this? If this looks good, I'll submit it upstream.

Richard Laager (rlaager) wrote :

I've posted this upstream (as a draft PR, pending testing) at: https://github.com/openzfs/zfs/pull/10662

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package zfs-linux - 0.8.3-1ubuntu12.3

---------------
zfs-linux (0.8.3-1ubuntu12.3) focal; urgency=medium

  * Fix volume wait on locked encrypted zvols (LP: #1888405)
    [ James Dingwall ]
    - 4620-zfs-vol-wait-fix-locked-encrypted-vols.patch
      zfs-volume-wait.service systemd unit does not start if the encrypted
      zvol is locked. The /sbin/zvol_wait should not wait for links when the
      volume has property keystatus=unavailable. Add a check for this.

 -- Colin Ian King <email address hidden> Wed, 22 Jul 2020 09:58:22 +0100

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

The verification of the Stable Release Update for zfs-linux has completed successfully and the package is now being 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.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers