Overview of the Leapp Live Mode workflow
Updated -
Table of Contents
The live-mode procedure is basically the same than the standard Leapp upgrade as described in our documentation. For now, this feature is available only for 8>9 upgrades as an EXPERIMENTAL / TECH-PREVIEW feature. For now, this feature is also restricted to the x86_64 architecture.
The live-mode-config-scanner actor
Executed if LEAPP_UNSUPPORTED=1 during the FactsCollectionPhase.
If it exists, it reads /etc/leapp/actor.d/livemode.yaml and produces LiveModeConfigFacts.
With the default values, it will boot locally.
Configuration options
| Configuration option | Value type | Description |
|---|---|---|
| url_to_load_squashfs_from | string | Url pointing to the squashfs image. if not set, the upgrade will boot locally. example: "http://192.168.122.1/live-upgrade.img" |
| squashfs_fullpath | string | Path to where the squashfs image should be stored |
| dracut_network | string | Dracut network arguments. Required if the url_to_lead_squashfs_from is set. example1: "ip=dhcp". example2: "ip=192.168.122.146::192.168.122.1:255.255.255.0:foo::none" |
| setup_network_manager | bool | Enable the NetworkManager |
| additional_packages | str | List of extra packages to include in the target userspace. example: "pk1,pkg2,pkg3" |
| autostart_upgrade_after_reboot | bool | Autostart the upgrade upon reboot |
| setup_opensshd_with_auth_keys | str | Setup SSHD using the given path to authorized keys file. If empty, SSHD will not be enabled. example: "/root/.ssh/authorized_keys" |
| capture_upgrade_strace_into | str | File into which leapp upgrade service's strace output will be written. If empty, leapp will not be run under strace. example: "/var/lib/leapp/upgrade.strace" |
| setup_passwordless_root | bool | Setup passwordless root for the live image used during the upgrade. Use with caution |
The emit-livemode-userspace-requirements actor
- intervene during the InterimPreparationPhase, and consumes the UsedTargetRepositories (among others).
- assume the standard packages to build an initramfs have already been installed by the upgrade_initramfs_generator actor.
- the requirements like
dracut-liveanddracut-squashto build a live image into the container, are now installed by the upgrade_initramfs_generator (via the dnfplugin). - also install some reporting or debugging tools (strace, kexec-tools, lspci, lsscsi, ...).
- produce a LiveModeRequirementsTasks.
The prepare-live-image actor
- intervene later as it consumes the LiveModeRequirementsTasks.
- create a dedicated fstab with xfs/ext entries prepended by
/run/initramfs/live(the default mount point for dmsquash-live). - install the do-upgrade.sh script (slightly modified) as a systemd
upgrade.service, logs are then sent to the journal. - a
console.serviceputs the output oftail -f leapp-upgrade.logon tty1, and agetty are spawned on tty2-tty4. A remaining autovt is left for a serial connection (e.g. ttyS0). - some customizations are performed at this step (no passwd for the root account, setup sshd, write a banner...).
- then it creates the initramfs-upgrade image with the
dmsquash-liveanddracut-squashdracut modules. - note: the original Leapp dracut modules are not used anymore.
- finally produce a PrepareLiveImageTasks.
The live-image-generator actor
- intervene at the very end of the InterimPreparationPhase.
- consume LiveModeConfigFacts, PrepareLiveImageTasks, PrepareLiveImagePostTasks (unused) and produce LiveModeArtifacts.
- the target userspace is then squashed into
/var/lib/leapp/live-upgrade.img.
Modifications of the addupgradebootentry actor
The kernel cmdline is prepared and then grubby is called:
- problematic parameters for the live mode are removed: ro, rd.lvm.lv (and also rhgb quiet).
- the root parameter is defined by default for a local boot:
root=live:<UUID>where<UUID>is the one from the partition where live-upgrade.img resides. It is used alongsiderd.live.dirandrd.live.squashimg. - note: the root parameter can be changed by the "url" parameter from the
livemode.yamlconfig file:root=live:<URL>(e.g.url=http://192.168.122.1/live-upgrade.img).
Comments