Bug 1259596 - Client-side initramfs generation during deployment to i.e. include multipath related configuration
Client-side initramfs generation during deployment to i.e. include multipath ...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ostree (Show other bugs)
7.2
Unspecified Unspecified
medium Severity medium
: rc
: 7.4
Assigned To: Colin Walters
: Extras
Depends On:
Blocks: 1186913 1399379 1433501
  Show dependency treegraph
 
Reported: 2015-09-03 02:52 EDT by Fabian Deutsch
Modified: 2017-04-11 10:33 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Feature: The Atomic Host component `rpm-ostree` which is used for updates of the host has a new `initramfs` command. Reason: By default, Atomic Host uses a generic initramfs built on the server side. This is distinct from a yum-based Red Hat Enterprise Linux where the initramfs is generated per-installation. However, in some situations, additional configuration or content may need to be added. Result: Administrators of Atomic Host may use `rpm-ostree initramfs --enable` to run the underlying `dracut` program on the client machine (and all future updates).
Story Points: ---
Clone Of:
: 1433501 (view as bug list)
Environment:
Last Closed: 2017-04-11 10:32:52 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Fabian Deutsch 2015-09-03 02:52:27 EDT
Description of problem:
Currently the initramfs used to boot Atomic is generated at tree build time.

The benefit of this approach is, that the initramfs is never touched, and thus we can be sure that it works for the customer, if it worked in testing.

The drawback is that some host- or site-specific configurations are not integrated into the initramfs during installation time.
The most obvious topic where this is highly visible is multipath.
The wwids and the exact multipath configuration must be part of the initramfs to ensure that the multipath configuration is setup correctly during the early boot.

This is most important for multipath devices which are used for booting. If an incorrect multipath configuration is used in initramfs, then different problems i.e. the aggregation of the multiple paths (of the device used for booting) into one logical multipath device can fail - something similar can happen if the multipath config inside the initramfs and outside are different.

To include host specific configurations in the initramfs the suggestion is to rebuild the initramfs during deployment.

The risk is that this creation will fail. Furthermore the initramfs will be different on each host.

Multipath served as an example here, there are possibly other components which will also benefit from per-host-configurations in the initramfs - but these have to be identified.
Comment 1 Alexander Todorov 2015-09-25 08:29:16 EDT
(In reply to Fabian Deutsch from comment #0)

> Multipath served as an example here, there are possibly other components
> which will also benefit from per-host-configurations in the initramfs - but
> these have to be identified.

Here's a very realistic example: customer uses a funky disk or NIC which needs external drivers (not included in RHEL by default). They can supply a DUD disk during installation but if initrd.img isn't rebuilt then the drivers will not be available after reboot and may lead to failing to find the root filesystem.
Comment 2 Fabian Deutsch 2015-09-25 08:31:10 EDT
A very good example. DUD support is also pending, including supporting it in anaconda in combination with atomic.
Comment 3 Colin Walters 2015-09-25 08:46:56 EDT
I'd say 3rd party kernel modules fall into the "rpm layerying" or SPC model, where we *would* generate a local initramfs.
Comment 4 Colin Walters 2015-09-25 08:47:27 EDT
See for example:
https://bugzilla.redhat.com/show_bug.cgi?id=1261647#c9
Comment 5 Colin Walters 2015-09-25 08:48:54 EDT
To elaborate, what I'm arguing is that we should try to differentiate between "configuration" and code (and I know this can get blurry).

The multipath thing is configuration.  Perhaps awkward and very nontrivial configuration, but still.

Kernel modules are code - and we want code to be tracked by RPM.
Comment 6 Fabian Deutsch 2015-09-25 08:52:51 EDT
(In reply to Colin Walters from comment #3)
> I'd say 3rd party kernel modules fall into the "rpm layerying" or SPC model,
> where we *would* generate a local initramfs.

I wasn't aware that a regenration is happening in that case.

(In reply to Colin Walters from comment #5)
> To elaborate, what I'm arguing is that we should try to differentiate
> between "configuration" and code (and I know this can get blurry).

Right, I agree on that separation.
Comment 14 Colin Walters 2017-04-11 10:33:47 EDT
Upstream commit: https://github.com/projectatomic/rpm-ostree/commit/cac4522e5b00b9d316367f2b2bbae5be78c006f8

$ git describe --contains cac4522e5b00b9d316367f2b2bbae5be78c006f8
v2017.1~3

Note You need to log in before you can comment on or make changes to this bug.