fix(vm-iso-installer): download remote kickstart files locally#17930
Open
sonarbhavarth wants to merge 1 commit into
Open
fix(vm-iso-installer): download remote kickstart files locally#17930sonarbhavarth wants to merge 1 commit into
sonarbhavarth wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug in the VM ISO installer's anaconda-launcher.sh wrapper. When PXE booting with an HTTP(S) kickstart URL supplied via inst.ks= on the kernel cmdline, the script previously passed the raw URL directly to anaconda --kickstart=, which expects a local file path in this subprocess context and fails with "Kickstart file is missing." The change downloads the remote kickstart to a local file first, addressing issue #17915.
Changes:
- Detects when the extracted
inst.ksvalue is an HTTP/HTTPS URL and downloads it withcurlto/tmp/ks.cfg, then pointsCUSTOM_KSat the local copy before invoking anaconda.
Comment on lines
+18
to
+20
| if [[ "$CUSTOM_KS" == http* ]]; then | ||
| curl -sf -o /tmp/ks.cfg "$CUSTOM_KS" && CUSTOM_KS="/tmp/ks.cfg" | ||
| fi |
| CUSTOM_KS="" | ||
| if grep -qo 'inst\.ks=[^ ]*' /proc/cmdline 2>/dev/null; then | ||
| CUSTOM_KS=$(grep -o 'inst\.ks=[^ ]*' /proc/cmdline | sed 's/inst\.ks=//') | ||
|
|
When PXE booting with an HTTP kickstart URL in the kernel cmdline (inst.ks), anaconda-launcher.sh passed the URL directly to anaconda as a subprocess. Anaconda requires a local file path in this context and would fail with a missing file error. This commit updates anaconda-launcher.sh to download HTTP/HTTPS URLs via curl to /tmp/ks.cfg before passing it to anaconda, resolving deployments that rely on remote kickstarts. Fixes microsoft#17915
d2f1c74 to
533d461
Compare
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.
When PXE booting with an HTTP kickstart URL in the kernel cmdline (inst.ks),
anaconda-launcher.sh passed the URL directly to anaconda as a subprocess.
Anaconda requires a local file path in this context and would fail with a
missing file error.
This commit updates anaconda-launcher.sh to download HTTP/HTTPS URLs
via curl to /tmp/ks.cfg before passing it to anaconda, resolving
deployments that rely on remote kickstarts.
Fixes #17915