Please don't assume zfs module is always loaded

Bug #1672749 reported by Aron Xu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxd (Ubuntu)
Fix Released
Undecided
Unassigned
zfs-linux (Ubuntu)
Fix Released
High
Aron Xu

Bug Description

Since zfsutils-linux/0.6.5.9-4, zfs module is not automatically loaded on systems that no zpool exists, this avoids tainting everyone's kernel who has the package installed but is not using zfs.

ADT test of lxd (at least at 2.11-0ubuntu4[1]) shows the storage tests are failing because "Could not determine ZFS module version." which is printed by zfsModuleVersionGet() in lxd/storage_zfs.go. This indicates there are pieces of code assuming zfs kernel module is always loaded which turns out to be not true anymore.

[1] https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-zesty/zesty/amd64/l/lxd/20170314_120059_2ce5b@/log.gz

Aron Xu (happyaron)
description: updated
Revision history for this message
Stéphane Graber (stgraber) wrote :

I'd have preferred that Ubuntu's zfsutils be patched to attempt to load the kernel module as needed since that change means that now any documentation telling the user to use "zpool create" or similar zfs commands will fail unless the user manually plays with modprobe...

That very much feels like a regression to me. I understand the reason for not always loading the module, but having the tools attempt to load it would have achieved the same thing without breaking every single tool which uses the zfs tools in the process.

Changed in lxd (Ubuntu):
status: New → Triaged
Changed in zfsutils (Ubuntu):
status: New → Triaged
importance: Undecided → High
affects: zfsutils (Ubuntu) → zfs-linux (Ubuntu)
Changed in zfs-linux (Ubuntu):
assignee: nobody → Aron Xu (happyaron)
Revision history for this message
Stéphane Graber (stgraber) wrote :

Adding a priority "high" task against zfs-linux since this is a post-FF regression in expected behavior from a tool in main.

Consider this as coming from me as a release team member and TB member rather than LXD upstream.

My preference here is that rather than just breaking every single script and tools that create zfs pools today on clean systems, the "zpool" utility should be patched to automatically load the "zfs" kernel module if not already loaded.

With my upstream LXD hat on, we will modify LXD itself to attempt to load the zfs module on first use, if only to cope with other distros that may use this non-optimal behavior.

Revision history for this message
Aron Xu (happyaron) wrote :

Uploaded a version to restore previous behavior for zesty, let's decide whether we'd like to drop it for later for zesty+1.

Changed in zfs-linux (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package zfs-linux - 0.6.5.9-4ubuntu1

---------------
zfs-linux (0.6.5.9-4ubuntu1) zesty; urgency=medium

  * ubuntu-load-zfs-unconditionally.patch:
    Load zfs module unconditionally for zesty (LP: #1672749)

 -- Aron Xu <email address hidden> Wed, 15 Mar 2017 13:19:13 +0800

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.