2023-02-20 08:51:15 |
ethan.hsieh |
bug |
|
|
added bug |
2023-02-20 08:52:36 |
ethan.hsieh |
description |
[Impact]
In version 3.104ubuntu15 of flash-kernel, when both f-k and the kernel are upgraded in the same cycle, depending on the ordering of dpkg trigger execution, f-k may find the content of /boot "inconsistent" causing it to fail and return error exit status 1.
Erorr message:
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for flash-kernel (3.104ubuntu15) ...
flash-kernel: installing version 5.15.0-1018-xilinx-zynqmp
Initrd required for FIT method
dpkg: error processing package flash-kernel (--configure):
installed flash-kernel package post-installation script subprocess returned error exit status 1
Processing triggers for linux-image-5.15.0-1018-xilinx-zynqmp (5.15.0-1018.20) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.15.0-1018-xilinx-zynqmp
flash-kernel gets the latest kernel version by "linux-version list".
When flash-kernel was triggered to generate fitimage, the kernel version is "5.15.0-1018" and the initrd for it wasn't ready. So, flash-kernel failed to generate the fitimage.
A subsequent run of "apt install -f" fixed things because, by that point, the kernel's own trigger had executed, ensuring that update-initramfs had been run. In the case that f-k is run "prematurely" and finds itself in this situation (/boot/kernel-$[ver} exists, but /boot/initrd-${ver}) doesn't), it should probably bail out silently under the assumption that whatever is responsible for it will rectify the situation and trigger f-k again (as happens in the kernel postinst hooks).
[Test Case]
1. Flash an old image (with an out of date kernel and flash-kernel)
2. sudo apt-get update
3. sudo apt install flash-kernel with the fix and linux packages
4. Upgrade should proceed without issue
[Regression Potential]
As with the previous flash-kernel uploads, it is possible that a breakage in the changed code can lead to issues with upgrading kernels (due to f-k being executed via a trigger at the end) or with Xilinx devices in the field not upgrading correctly. I will test all the changes extensively though. |
[Impact]
In version 3.104ubuntu15 of flash-kernel, when both f-k and the kernel are upgraded in the same cycle, depending on the ordering of dpkg trigger execution, f-k may find the content of /boot "inconsistent" causing it to fail and return error exit status 1.
Erorr message:
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for flash-kernel (3.104ubuntu15) ...
flash-kernel: installing version 5.15.0-1018-xilinx-zynqmp
Initrd required for FIT method
dpkg: error processing package flash-kernel (--configure):
installed flash-kernel package post-installation script subprocess returned error exit status 1
Processing triggers for linux-image-5.15.0-1018-xilinx-zynqmp (5.15.0-1018.20) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.15.0-1018-xilinx-zynqmp
flash-kernel gets the latest kernel version by "linux-version list".
When flash-kernel was triggered to generate fitimage, the kernel version is "5.15.0-1018" and the initrd for it wasn't ready. So, flash-kernel failed to generate the fitimage.
A subsequent run of "apt install -f" fixed things because, by that point, the kernel's own trigger had executed, ensuring that update-initramfs had been run. In the case that f-k is run "prematurely" and finds itself in this situation (/boot/kernel-$[ver} exists, but /boot/initrd-${ver}) doesn't), it should probably bail out silently under the assumption that whatever is responsible for it will rectify the situation and trigger f-k again (as happens in the kernel postinst hooks).
[Test Case]
1. Flash an old image (with an out of date kernel and flash-kernel)
2. sudo apt-get update
3. sudo apt install flash-kernel with the fix and linux packages
4. Upgrade should proceed without issue
[Regression Potential]
As with the previous flash-kernel uploads, it is possible that a breakage in the changed code can lead to issues with upgrading kernels (due to f-k being executed via a trigger at the end) or with Xilinx devices in the field not upgrading correctly. I will test all the changes extensively though.
Related issues:
LP: #1861292 flash-kernel failure during kernel upgrade |
|
2023-02-20 08:53:24 |
ethan.hsieh |
tags |
|
oem-priority originate-from-2003041 |
|
2023-02-22 07:49:43 |
ethan.hsieh |
attachment added |
|
flash-kernel-lunar.debdiff https://bugs.launchpad.net/ubuntu/+source/flash-kernel/+bug/2007827/+attachment/5649047/+files/flash-kernel-lunar.debdiff |
|
2023-02-22 07:54:06 |
ethan.hsieh |
attachment added |
|
upgrade-kernel-flash-kernel.log https://bugs.launchpad.net/ubuntu/+source/flash-kernel/+bug/2007827/+attachment/5649049/+files/upgrade-kernel-flash-kernel.log |
|
2023-02-22 08:26:22 |
Ubuntu Foundations Team Bug Bot |
tags |
oem-priority originate-from-2003041 |
oem-priority originate-from-2003041 patch |
|
2023-02-22 08:26:29 |
Ubuntu Foundations Team Bug Bot |
bug |
|
|
added subscriber Ubuntu Sponsors Team |
2023-03-01 06:37:16 |
ethan.hsieh |
attachment added |
|
install-kernel-and-flash-kernel.log https://bugs.launchpad.net/ubuntu/+source/flash-kernel/+bug/2007827/+attachment/5650625/+files/install-kernel-and-flash-kernel.log |
|
2023-03-06 06:35:00 |
ethan.hsieh |
attachment added |
|
install-kernel-and-flash-kernel-ppa6.log https://bugs.launchpad.net/ubuntu/+source/flash-kernel/+bug/2007827/+attachment/5651993/+files/install-kernel-and-flash-kernel-ppa6.log |
|
2023-03-06 11:27:15 |
Dave Jones |
nominated for series |
|
Ubuntu Kinetic |
|
2023-03-06 11:27:15 |
Dave Jones |
bug task added |
|
flash-kernel (Ubuntu Kinetic) |
|
2023-03-06 11:27:15 |
Dave Jones |
nominated for series |
|
Ubuntu Jammy |
|
2023-03-06 11:27:15 |
Dave Jones |
bug task added |
|
flash-kernel (Ubuntu Jammy) |
|
2023-03-06 11:27:15 |
Dave Jones |
nominated for series |
|
Ubuntu Focal |
|
2023-03-06 11:27:15 |
Dave Jones |
bug task added |
|
flash-kernel (Ubuntu Focal) |
|
2023-03-06 11:27:15 |
Dave Jones |
nominated for series |
|
Ubuntu Lunar |
|
2023-03-06 11:27:15 |
Dave Jones |
bug task added |
|
flash-kernel (Ubuntu Lunar) |
|
2023-03-06 13:34:20 |
Launchpad Janitor |
flash-kernel (Ubuntu Lunar): status |
New |
Fix Released |
|
2023-06-08 09:33:36 |
Dave Jones |
summary |
flash-kernel failure when upgrading f-k anad kernel in the same cycle |
[SRU] flash-kernel failure when upgrading f-k anad kernel in the same cycle |
|
2023-06-09 03:45:06 |
Ubuntu Archive Robot |
bug |
|
|
added subscriber Dave Jones |
2023-06-09 20:51:42 |
Steve Langasek |
summary |
[SRU] flash-kernel failure when upgrading f-k anad kernel in the same cycle |
[SRU] flash-kernel failure when upgrading f-k and kernel in the same cycle |
|
2023-06-09 21:40:22 |
Steve Langasek |
flash-kernel (Ubuntu Kinetic): status |
New |
Incomplete |
|
2023-06-09 21:40:30 |
Steve Langasek |
bug |
|
|
added subscriber Andy Whitcroft |
2023-06-12 10:39:32 |
Hon Ming Hui |
bug |
|
|
added subscriber Hon Ming Hui |
2023-06-23 17:41:04 |
Steve Langasek |
bug |
|
|
added subscriber Dimitri John Ledkov |
2023-06-23 17:41:24 |
Steve Langasek |
bug |
|
|
added subscriber Steve Langasek |
2023-06-23 17:41:51 |
Steve Langasek |
removed subscriber Ubuntu Sponsors |
|
|
|
2023-07-11 15:25:35 |
Dave Jones |
tags |
oem-priority originate-from-2003041 patch |
foundations-todo oem-priority originate-from-2003041 patch |
|
2023-09-12 10:56:13 |
Launchpad Janitor |
flash-kernel (Ubuntu Focal): status |
New |
Confirmed |
|
2023-09-12 10:56:13 |
Launchpad Janitor |
flash-kernel (Ubuntu Jammy): status |
New |
Confirmed |
|
2023-10-02 21:03:40 |
Dave Jones |
flash-kernel (Ubuntu Kinetic): status |
Incomplete |
Invalid |
|
2023-10-14 06:18:59 |
Steve Langasek |
flash-kernel (Ubuntu Jammy): status |
Confirmed |
Incomplete |
|