update-grub fails if a pool fails to import
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub2 (Ubuntu) |
Fix Released
|
Medium
|
Jean-Baptiste Lallement | ||
Eoan |
Won't Fix
|
Medium
|
Jean-Baptiste Lallement | ||
Focal |
Fix Released
|
Medium
|
Jean-Baptiste Lallement | ||
grubzfs-testsuite (Ubuntu) |
Fix Released
|
Medium
|
Jean-Baptiste Lallement | ||
Eoan |
Won't Fix
|
Medium
|
Jean-Baptiste Lallement | ||
Focal |
Fix Released
|
Medium
|
Jean-Baptiste Lallement |
Bug Description
[Description]
If a pool to import update-grub will fail because the import error message is used as the name of the pool. The error is similar to:
"cannot open 'This': no such pool" when no ZFS pools are available
The error can be caused by anything such as an invalid feature or a corrupted device.
The fix catches the error, displays it, ignore the pool but import others.
[Test Case]
1. Create a pool on a device and export it
2. Corrupt the device for example by shuffling random blocks on the device but not the header so it is recognized as a ZFS device
3. Run update-grub
Expected result:
The pool is ignored and reported
Actual result:
Generation of the grub menu fails
[Regression potential]
Low since currently the script aborts on error as soon as it fails to import. Worst case nothing imports and there is no zfs entries in the grub menu.
ProblemType: Bug
DistroRelease: Ubuntu 19.10
Package: ubiquity 19.10.20
ProcVersionSign
Uname: Linux 5.3.0-18-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.11-0ubuntu8
Architecture: amd64
CasperVersion: 1.425
Date: Wed Oct 16 20:03:30 2019
InstallCmdLine: BOOT_IMAGE=
LiveMediaBuild: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191014)
SourcePackage: ubiquity
UpgradeStatus: No upgrade log present (probably fresh install)
summary: |
- eoan zfs install fails w/ grub error + experimental zfs install fails w/ grub error |
affects: | grub (Ubuntu) → grub2 (Ubuntu) |
Changed in grub2 (Ubuntu): | |
status: | Incomplete → Triaged |
importance: | Undecided → High |
assignee: | nobody → Jean-Baptiste Lallement (jibel) |
no longer affects: | ubiquity (Ubuntu) |
no longer affects: | zsys (Ubuntu) |
Changed in grub2 (Ubuntu Focal): | |
importance: | High → Medium |
Changed in grub2 (Ubuntu Eoan): | |
status: | New → In Progress |
Changed in grubzfs-testsuite (Ubuntu Eoan): | |
status: | New → In Progress |
status: | In Progress → Triaged |
Changed in grubzfs-testsuite (Ubuntu Focal): | |
status: | New → Triaged |
Changed in grub2 (Ubuntu Eoan): | |
importance: | Undecided → Medium |
Changed in grubzfs-testsuite (Ubuntu Eoan): | |
importance: | Undecided → Medium |
Changed in grubzfs-testsuite (Ubuntu Focal): | |
importance: | Undecided → Medium |
Changed in grub2 (Ubuntu Eoan): | |
assignee: | nobody → Jean-Baptiste Lallement (jibel) |
Changed in grubzfs-testsuite (Ubuntu Eoan): | |
assignee: | nobody → Jean-Baptiste Lallement (jibel) |
Changed in grubzfs-testsuite (Ubuntu Focal): | |
assignee: | nobody → Jean-Baptiste Lallement (jibel) |
description: | updated |
summary: |
- update-grub fails if zpools with unsupported feature_flags exist + update-grub fails if a pool fails to import |
Did a "sudo apt update ; sudo apt dist-upgrade -y" before running ubiquity.
I did a chroot to /target, and then here's the error I get when running "update-grub", which is the command that failed:
cannot open 'This:' no such pool
zfs properties:
https:/ /paste. ubuntu. com/p/86jzxpgZs G/
relevant dmesg maybe:
[ 360.582647] EXT4-fs (nvme0n1p2): mounted filesystem with ordered data mode. Opts: errors=remount-ro
[ 368.223234] Adding 2097148k swap on /target/swapfile. Priority:-2 extents:6 across:2260988k SSFS
[ 369.732752] nvme0n1: p1
[ 369.772285] nvme0n1: p1
[ 370.076746] nvme0n1: p1 p2 p3 p4 p5
[ 371.323787] EXT4-fs (nvme0n1p2): mounted filesystem with ordered data mode. Opts: (null)
[ 371.371780] Adding 2097148k swap on /dev/nvme0n1p3. Priority:-2 extents:1 across:2097148k SSFS
[ 511.385581] device-mapper: table: 253:0: linear: Device lookup failed
[ 511.385584] device-mapper: ioctl: error adding target to table