update-motd-fsck-at-reboot: exclude nbd devices
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
update-notifier (Ubuntu) |
Fix Released
|
High
|
Dan Watkins | ||
Focal |
Triaged
|
Medium
|
Unassigned | ||
Jammy |
Triaged
|
Medium
|
Unassigned | ||
Kinetic |
Fix Released
|
High
|
Dan Watkins |
Bug Description
[Impact]
* update-
* Users with NBD devices will erroneously see them reported as devices that will be fsck'd at next boot.
[Test Plan]
* Get a QEMU image containing an ext4 partition (e.g. https:/
* `qemu-nbd -c /dev/nbd0 <that image>`
* `mount /dev/nbd0p2 /mnt` (partition number may vary depending on your image)
* Execute `update-
* Observe NBD device not included
[Where problems could occur]
If the one-line fix is incorrect, users may not receive notification of fsck'ing that is going to happen, which they may rely on.
[Original Report]
I've ended up in a situation where a machine's /dev/nbd* devices are in a broken state: the easiest way for me to fix this is to reboot the system. However, the reboot is blocked by update-
$ ps faux
...
root 191396 0.0 0.2 37864 8672 ? Ss 12:37 0:00 sshd: dwatkins [priv]
root 191421 0.0 0.0 2608 480 ? S 12:37 0:00 \_ sh -c /usr/bin/env -i PATH=/usr/
root 191422 0.0 0.0 2496 508 ? S 12:37 0:00 \_ run-parts --lsbsysinit /etc/update-motd.d
root 191455 0.0 0.0 2608 1748 ? S 12:37 0:00 \_ /bin/sh /usr/lib/
root 191483 0.0 0.0 3480 944 ? D 12:37 0:00 \_ dumpe2fs -h /dev/nbd0p2
...
These NBD devices will not be present after a reboot, so I think the script would probably be more correct if it omitted operating on these devices.
Related branches
- Dan Bungert: Approve
-
Diff: 13 lines (+1/-1)1 file modifieddata/update-motd-fsck-at-reboot (+1/-1)
- Ubuntu Core Development Team: Pending requested
-
Diff: 28 lines (+8/-1)2 files modifieddata/update-motd-fsck-at-reboot (+1/-1)
debian/changelog (+7/-0)
tags: | added: rls-kk-incoming |
Changed in update-notifier (Ubuntu): | |
importance: | Undecided → High |
tags: | added: fr-2579 |
tags: | removed: rls-kk-incoming |
Changed in update-notifier (Ubuntu Jammy): | |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in update-notifier (Ubuntu Focal): | |
status: | New → Triaged |
importance: | Undecided → Medium |
I have proposed a fix in the related branch.