From Fedora Project Wiki
m (the Copr doesn't matter anymore as we hit rawhide recently.)
m (some more 'drivers' for 'modules' replacements.)
 
Line 33: Line 33:
== Detailed Description ==
== Detailed Description ==
<!-- Expand on the summary, if appropriate.  A couple sentences suffices to explain the goal, but the more details you can provide the better. -->
<!-- Expand on the summary, if appropriate.  A couple sentences suffices to explain the goal, but the more details you can provide the better. -->
Space is precious in the cloud, therefore the Cloud SIG tries to keep the images' footprint as small as reasonably possible. Therefore, we'd like to split the kernel into two (plus one meta) packages. One package would contain the core modules, i.e. a minimum(-ish) set of drivers to only just be able to run in virtualized environments. And another package for the rest. The 'kernel' package would then become a meta package that installs both (-core and -drivers).
Space is precious in the cloud, therefore the Cloud SIG tries to keep the images' footprint as small as reasonably possible. Therefore, we'd like to split the kernel into two (plus one meta) packages. One package would contain the core modules, i.e. a minimum(-ish) set of modules to only just be able to run in virtualized environments. And another package for the rest. The 'kernel' package would then become a meta package that installs both (-core and -modules).


== Benefit to Fedora ==
== Benefit to Fedora ==
Line 43: Line 43:
Normal installations will continue installing the kernel (meta-)package and users should not notice any difference. Same goes for updating from earlier Fedora releases. But where desired, it should become possible to install only a reasonably minimal subset of kernel modules. Both kernel and kernel-core will Provide "kernel", therefore the "install instead of update" magic of yum/dnf will work as expected even if only kernel-core is installed.
Normal installations will continue installing the kernel (meta-)package and users should not notice any difference. Same goes for updating from earlier Fedora releases. But where desired, it should become possible to install only a reasonably minimal subset of kernel modules. Both kernel and kernel-core will Provide "kernel", therefore the "install instead of update" magic of yum/dnf will work as expected even if only kernel-core is installed.


* Proposal owners: The kernel package needs to be changed to produce a meta- (kernel) and two new packages (-core and -drivers) packages additionally to those already built out of the SRPM. Aside from the obvious changes to the package spec file, that includes evaluating what modules need to go into which package and making sure updating from pre-split kernel packages works as expected. Most of this work has already been done and can be found in rawhide by now.
* Proposal owners: The kernel package needs to be changed to produce a meta- (kernel) and two new packages (-core and -modules) packages additionally to those already built out of the SRPM. Aside from the obvious changes to the package spec file, that includes evaluating what modules need to go into which package and making sure updating from pre-split kernel packages works as expected. Most of this work has already been done and can be found in rawhide by now.


* Other developers: Anaconda must allow to install kernel-core instead of kernel, when using a kickstart file. (To gain full benefits of this change, but the change itself can be implemented without). Work has been done but is not well tested yet: https://bugzilla.redhat.com/show_bug.cgi?id=1074522
* Other developers: Anaconda must allow to install kernel-core instead of kernel, when using a kickstart file. (To gain full benefits of this change, but the change itself can be implemented without). Work has been done but is not well tested yet: https://bugzilla.redhat.com/show_bug.cgi?id=1074522

Latest revision as of 02:42, 5 May 2014

Modular Kernel Packaging for Cloud

Summary

Kernel modules that are not necessary in virtualized environments become optionally (un)installable.

Owner

  • Name: Cloud SIG / Sandro Mathys, Kernel Team / Josh Boyer
  • Email: red@fedoraproject.org, jwboyer@fedoraproject.org
  • Product: All Cloud products
  • Responsible WG: Cloud

Current status

Detailed Description

Space is precious in the cloud, therefore the Cloud SIG tries to keep the images' footprint as small as reasonably possible. Therefore, we'd like to split the kernel into two (plus one meta) packages. One package would contain the core modules, i.e. a minimum(-ish) set of modules to only just be able to run in virtualized environments. And another package for the rest. The 'kernel' package would then become a meta package that installs both (-core and -modules).

Benefit to Fedora

  • Possibility to install Fedora with a smaller footprint.
  • Official Fedora cloud images will become smaller.
  • Possibility to avoid respinning images for security updates if issue is in a driver not included in kernel core

Scope

Normal installations will continue installing the kernel (meta-)package and users should not notice any difference. Same goes for updating from earlier Fedora releases. But where desired, it should become possible to install only a reasonably minimal subset of kernel modules. Both kernel and kernel-core will Provide "kernel", therefore the "install instead of update" magic of yum/dnf will work as expected even if only kernel-core is installed.

  • Proposal owners: The kernel package needs to be changed to produce a meta- (kernel) and two new packages (-core and -modules) packages additionally to those already built out of the SRPM. Aside from the obvious changes to the package spec file, that includes evaluating what modules need to go into which package and making sure updating from pre-split kernel packages works as expected. Most of this work has already been done and can be found in rawhide by now.
  • Other developers: Anaconda must allow to install kernel-core instead of kernel, when using a kickstart file. (To gain full benefits of this change, but the change itself can be implemented without). Work has been done but is not well tested yet: https://bugzilla.redhat.com/show_bug.cgi?id=1074522
  • Release engineering: No changes necessary.
  • Policies and guidelines: No changes necessary.

Upgrade/compatibility impact

Full compatibility and upgrade-support. No noticeable impact. Systems with pre-split kernel packages will install the new kernel meta-package which in turn will install kernel-core and kernel-modules. All three together are equal to the pre-split kernel package.

How To Test

  • Updating from F20 to F21 (or any pre-split kernel to any post-split kernel) should work as expected, i.e. kernel, kernel-core and kernel-modules should be installed and be booted by default.
  • In virtualized environments (including clouds) only installing kernel-core but no kernel and kernel-modules should suffice to work as expected.
  • If only kernel-core but not kernel is installed, yum (and dnf) should install updates instead of updating the package. The same should still be true for the kernel package, if installed.
  • The kernel should work as expected, i.e. the usual kernel tests should be performed.
  • It must be possible to remove kernel and kernel-modules (and leaving only kernel-core).
  • It must be possible to install kernel and kernel-modules (if only kernel-core was installed).
  • Anaconda should somehow allow to install only kernel-core instead of kernel, through kickstart.
  • Make sure whatever you expect from your kernel that worked before, still works.

User Experience

Two more packages will be installed (visible in yum/dnf and rpm), but no noticeable change otherwise.

Dependencies

To gain the full benefits of this change, Anaconda needs to support installing kernel-core only (i.e. instead of kernel). But the kernel split itself is not depending on that and still useful otherwise.

Contingency Plan

  • Contingency mechanism:
    • The kernel-split could be reverted, if really necessary. But as this work is nearly finished and the standard use cases are not impacted, it's unlikely we'll need to take this step. Either way, this shouldn't matter to any other packages.
    • If support in anaconda for kernel-core is not ready in time, it should ship without it. The main change would not be affected by this.
  • Contingency deadline: Beta Freeze
  • Blocks release? No.
  • Blocks product? No.

Documentation

See Release Notes (below).

Release Notes

Starting with Fedora 21, the kernel package has been split up into three: kernel, kernel-core and kernel-modules. Now, the kernel package is merely a meta-package making sure that both kernel-core and kernel-modules are installed. This way, updates from a pre-split kernel will work as expected. Also, kernel is still the package that is installed by default, ensuring kernel-core and kernel-modules both are installed, too.
Running in virtualized environments, kernel-core alone should suffice, thus allowing e.g. for a smaller cloud image footprint. In all other cases kernel-modules should additionally be installed, too.
Please note, that a new initramfs is only automatically generated by the kernel-core package but not the kernel-modules package. If you only installed kernel-core at first and install kernel-modules at a later point in time, you need to create a new initramfs manually using dracut, if any of the newly installed modules has become critical for your system's boot up.