Enable Dracut's livenet rootfs handling when systemd-networkd is in use.#10706
Merged
Enable Dracut's livenet rootfs handling when systemd-networkd is in use.#10706
Conversation
97682ac to
58ed66a
Compare
92429a2 to
b22bb77
Compare
…PXE booting for liveos ISOs. Dracut's livenet module can process root=live:http://artifacts-url at Dracut's parse phase. However, it does not follow through with downloading the artifacts later - and consequently, it does not attempt to pivot to the download rootfs image. This blocks the PXE boot flow for liveos isos. This change enables this flow by providing a downloader script that is attached to the livenet module parse phase. That way, once livenet parsing claims the handling of the kernel root parameter, it can also schedule the downloader to run after the network stack is up. To avoid possible conflicts with possible user extensions, the download is only activated if the new 'rd.live.azldownloader' kernel parameter is present and set to 'enabled' - otherwise, it is disabled. Also, the downloader is just a stub that calls into Dracut's livenet root handler which takes care of downloading.
b22bb77 to
601dfdc
Compare
dmcilvaney
approved these changes
Nov 1, 2024
Camelron
approved these changes
Nov 1, 2024
cwize1
reviewed
Nov 1, 2024
cwize1
approved these changes
Nov 4, 2024
12 tasks
vinceaperri
approved these changes
Nov 8, 2024
romoh
approved these changes
Nov 12, 2024
durgajagadeesh
pushed a commit
to durgajagadeesh/azurelinux_djpalli
that referenced
this pull request
Dec 31, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge Checklist
All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)
*-staticsubpackages, etc.) have had theirReleasetag incremented../cgmanifest.json,./toolkit/scripts/toolchain/cgmanifest.json,.github/workflows/cgmanifest.json)./LICENSES-AND-NOTICES/SPECS/data/licenses.json,./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md,./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)*.signatures.jsonfilessudo make go-tidy-allandsudo make go-test-coveragepassSummary
Dracut provides a livenet module which allows the downloading of a liveos ISO image from a PXE server at boot time. However, this functionality is not implemented for systemd-networkd in Dracut 102 and earlier (see bug and fix).
It is desired to produce Azure Linux liveos ISO images that are PXE-ready. To enable this scenario, we need to ensure that Dracut's livenet module is functional on Azure Linux images.
There are two options:
Given that Azure Linux has GA'ed, and given that Dracut introduced refactoring around the networking supported between 102 and 103, we opted to minimize the risk of upgrading at this time and go with patching the current Dracut version.
This change augments Dracut's livenet module with a daemon to be started when the network is up. The new daemon will then call the livenet module download script.
Regression Risk
Minimal.
To avoid side effects or conflicts with existing user configuration, this flow is only activated if the new
rd.live.azldownloaderkernel parameter is present and set to 'enabled' - otherwise, it is not activated.Change Log
Does this affect the toolchain?
Associated issues
Links to CVEs
Test Methodology
Unit Tests
Functional Tests
--output-pxe-artifacts-dirparameter.--output-pxe-artifacts-dirparameter.