kernel fallback-package doesn't work as described
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
curtin |
New
|
Undecided
|
Unassigned |
Bug Description
The documentation for kernel[
---
fallback-package: <kernel package-name to be used as fallback>
Specify a kernel package name to be used if the default package is not available.
---
This sounds like it solves a use-case I have. I share a MAAS preseed file across multiple machines and Ubuntu releases w/ symlinks. Some Ubuntu releases have an "linux-nvidia" optimized kernel, others do not. When I'm deploying a release that does have this kernel, I want to use it. But for releases that do not have this kernel, I want to fallback to "linux-generic". So, it seems like I could just do:
kernel:
fallback-package: linux-generic
package: linux-nvidia
But that's not really how the code works. It appears that if "package" is set, curtin assumes the user wants that kernel package, and only that kernel package will do. "fallback-package" only comes into play if "package" is unset.
I do not think the documentation accurately reflects that behavior. In fact, the provided example shows combined usage of "fallback-package" and "package" - which reinforces the incorrect usage.
The options I see are:
(1) Fix the code to reflect the docs. Try kernel[
(2) Fix the docs to reflect the code. Explain that kernel[
(1) makes the most sense to me, as it gives the user the most flexibility and seems easiest to explain. kernel['package'] lets you override the autodetected default. kernel[
Related branches
- dann frazier (community): Approve
-
Diff: 78 lines (+34/-14)2 files modifiedcurtin_userdata_dgx (+5/-0)
late.sh (+29/-14)
summary: |
- kernel fallback-package needs clarification + kernel fallback-package doesn't work as described |