flash-kernel should not consider ignored kernels as latest
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
flash-kernel (Ubuntu) |
Fix Released
|
High
|
Manoj Iyer | ||
Trusty |
Fix Released
|
High
|
Manoj Iyer | ||
Utopic |
Fix Released
|
High
|
Manoj Iyer |
Bug Description
SRU REQUEST
============
[ Impact ]
Currently if the platform uses flavor kernels, and the cloud image has a -generic version that is newer than the flavor version, nothing gets installed and boot.scr is not generated.
[ Test Case ]
To reproduce this bug, download the latest c-i for armhf, chroot into it and install linux-keystone. flash-kernel will not generate a boot.scr.
With the proposed patch you will see the following:
+ basename /usr/sbin/
+ self=flash-kernel
+ mktemp -dt flash-kernel.
+ tmpdir=
+ kernel=
+ initrd=
+ [ -n ]
+ [ -n /boot/boot.scr ]
+ boot_script_
+ boot_script=
+ mkimage_script 0x0 boot script /usr/share/
+ local saddr=0x0
+ local sdesc=boot script
+ local sdata=/
+ local script=
+ basename /usr/share/
+ local tdata=/
+ mktemp --tmpdir=
+ local ubootenv=
+ gen_ubootenv
+ ENVSTUBDIRS=
+ LC_ALL=C+ sortfind -u
/etc/flash-
+ ENVSTUBS=
+ printf Generating boot script u-boot image...
Generating boot script u-boot image... + sed -e /@@UBOOT_
s/@@UBOOT_
r /tmp/flash-
}
+ mkimage -A arm -O linux -T script -C none -a 0x0 -e 0x0 -n boot script -d /tmp/flash-
+ echo done.
done.
+ boot_script=
+ backup_and_install /tmp/flash-
+ local source=
+ local dest=//
+ [ -e //boot/boot.scr ]
+ basename //boot/boot.scr
+ echo Installing new boot.scr.
Installing new boot.scr.
+ mv /tmp/flash-
+ cleanups
+ rm -rf /tmp/flash-
+ [ -d ]
[ Regression Potential ]
NA
=== Original Report ===
flash-kernel has logic that tries to determine "is this kernel the latest", so that it will only flash the latest kernel.
It also has logic that white-lists certain kernel flavors.
However, when it determines "is this the latest kernel", it does not apply the whitelist.
This causes issues if you have other kernels installed that are "newer" but would be ignored.
See the maas/curtin install log at http://
Specifically, it says:
| Examining /etc/kernel/
| run-parts: executing /etc/kernel/
| run-parts: executing /etc/kernel/
| update-initramfs: Generating /boot/initrd.
| df: Warning: cannot read table of mounted file systems: No such file or directory
| run-parts: executing /etc/kernel/
| run-parts: executing /etc/kernel/
| Searching for GRUB installation directory ... found: /boot/grub
| Searching for default file ... found: /boot/grub/default
| Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
| Searching for splash image ... none found, skipping ...
| Ignoring non-Xen Kernel on Xen domU host: vmlinuz-
| Found kernel: /boot/vmlinuz-
| Updating /boot/grub/menu.lst ... done
|
| run-parts: executing /etc/kernel/
| Ignoring old or unknown version 3.13.0-8-keystone (latest is 3.13.0-32-generic)
| Setting up linux-headers-
| Setting up linux-headers-
| Setting up linux-image-
| Setting up linux-keystone (3.13.0.8.7) ...
| Leaving 'diversion of /etc/init/
| update-initramfs: Generating /boot/initrd.
| df: Warning: cannot read table of mounted file systems: No such file or directory
| Kernel suffix generic does not match any of the expected flavors (keystone), therefore not writing it to flash.
Note that it decides not to flash -generic kernel because it is not in the whitelist, but does ignores keystone kernel because it is not the newest. Result is that nothing is installed.
Related branches
- Scott Moser: Approve
-
Diff: 67 lines (+33/-2)2 files modifieddebian/changelog (+6/-0)
functions (+27/-2)
- Scott Moser: Approve
-
Diff: 228 lines (+105/-7)10 files modifiedREADME (+14/-0)
bootscript/bootscr.keystone2 (+5/-0)
bootscript/bootscr.xgene (+4/-3)
bootscript/bootscr.xgene-mustang (+1/-0)
db/all.db (+7/-0)
debian/changelog (+18/-0)
debian/control (+1/-1)
debian/dirs (+2/-0)
debian/flash-kernel-installer.isinstallable (+3/-0)
functions (+50/-3)
Changed in lomond: | |
assignee: | nobody → Manoj Iyer (manjo) |
importance: | Undecided → High |
tags: | added: patch |
description: | updated |
Changed in flash-kernel (Ubuntu Trusty): | |
assignee: | nobody → Manoj Iyer (manjo) |
description: | updated |
Changed in lomond: | |
status: | New → Fix Released |
the suggested patch just filters the selection of 'latest' through the whitelist.