microsoft / microsoft/azure-linux-image-tools
Image Customizer: Multiple kernels problems
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 37
- Forks
- 11
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 15
Description
In the Azure Linux tdnf config, there is the following:
[main]
...
installonly_limit=3
installonlypkgs=kernel kernel-mshv kernel-uvm kernel-uki kernel-64k
...
The allows for there to be multiple kernel package versions installed at the same time.
Having backup kernels is useful for systems that do package updates since a new kernel version might be faulty/problematic. But for building images, most people don't want multiple kernels installed.
This typically shows up when a user installs a package that depends on a specific version of the kernel package. For example, kernel-drivers-gpu or kernel-tools. When such a package is installed and a newer version of the kernel is available, this triggers the installation of a second kernel in the image.
The current recommendation for users is to do the following in their config:
os:
packages:
remove:
- kernel
install:
- kernel
- kernel-tools
Since, 'remove' happens before 'install' and 'remove' will remove all versions of a package, this results in only a single kernel being installed in the image.
However, we should investigate ways to improve the user experience.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the multiple-kernel behavior using the shown tdnf settings and the os.packages remove/install configuration. Trace how Image Customizer processes package removal and installation, then define and validate a user-friendly behavior that avoids unintended kernel versions while preserving explicit package requests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- build-system, devops
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100