[Bug 1850002] Re: /etc/grub.d/10_linux_zfs fail when zpool import output to stdout

Launchpad Bug Tracker 1850002 at bugs.launchpad.net
Mon Jan 13 07:50:53 UTC 2020


Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: grub2 (Ubuntu)
       Status: New => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/1850002

Title:
  /etc/grub.d/10_linux_zfs fail when zpool import output to stdout

Status in grub2 package in Ubuntu:
  Confirmed

Bug description:
  ## 1. Symptoms, `update-grub` fails with "no such pool"

  ### output
  	benjamin at x250:~$ sudo update-grub
  	Sourcing file `/etc/default/grub'
  	Sourcing file `/etc/default/grub.d/init-select.cfg'
  	Generating grub configuration file ...
  	cannot open 'This': no such pool

  ### debug output
  	benjamin at x250:~$ sudo update-grub
  	Sourcing file `/etc/default/grub'
  	Sourcing file `/etc/default/grub.d/init-select.cfg'
  	Generating grub configuration file ...
  	+ set -u
  	+ which zfs
  	+ 
  	+ imported_pools=
  	+ mktemp -d /tmp/zfsmnt.XXXXXX
  	+ MNTDIR=/tmp/zfsmnt.bunqET
  	+ mktemp -d /tmp/zfstmp.XXXXXX
  	+ ZFSTMP=/tmp/zfstmp.X21h0R
  	+ RC=0
  	+ trap on_exit EXIT INT QUIT ABRT PIPE TERM
  	+ GRUB_LINUX_ZFS_TEST=
  	+ import_pools
  	+ zpool list
  	+ awk {if (NR>1) print $1}
  	+ local initial_pools=x250
  	+ local all_pools=
  	+ local imported_pools=
  	+ zpool import -f -a -o cachefile=none -N
  	+ imported_pools=This pool uses the following feature(s) not supported by this system:
  		com.delphix:spacemap_v2 (Space maps representing large segments are more efficient.)
  		org.zfsonlinux:project_quota (space/object accounting based on project ID.)
  	All unsupported features are only required for writing to the pool.
  	The pool can be imported using '-o readonly=on'.
  	This pool uses the following feature(s) not supported by this system:
  		com.delphix:spacemap_v2 (Space maps representing large segments are more efficient.)
  	All unsupported features are only required for writing to the pool.
  	The pool can be imported using '-o readonly=on'.
  	+ on_exit
  	+ zpool export This
  	cannot open 'This': no such pool

  ## 2. Cause
  	Only the stderr of `zpool import -f -a -o cachefile=none -N` is sent to /dev/null so when the 
  	command outputs on stdout everything ends up in the `imported_pools` variable

  ## 3. Quick fix
  	in /etc/grub.d/10_linux_zfs:67, replace:
  		zpool import -f -a -o cachefile=none -N 2>/dev/null
  	by
  		zpool import -f -a -o cachefile=none -N >/dev/null 2>&1

  ProblemType: Bug
  DistroRelease: Ubuntu 19.10
  Package: grub-common 2.04-1ubuntu12
  ProcVersionSignature: Ubuntu 5.3.0-19.20-generic 5.3.1
  Uname: Linux 5.3.0-19-generic x86_64
  NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
  ApportVersion: 2.20.11-0ubuntu8
  Architecture: amd64
  CurrentDesktop: XFCE
  Date: Sat Oct 26 17:17:20 2019
  SourcePackage: grub2
  UpgradeStatus: Upgraded to eoan on 2019-10-26 (0 days ago)
  modified.conffile..etc.grub.d.10_linux_zfs: [modified]
  mtime.conffile..etc.grub.d.10_linux_zfs: 2019-10-26T17:14:38.665289

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1850002/+subscriptions



More information about the foundations-bugs mailing list