Description of problem: Specifying a proxy to fetch Stage2 was working fine with RHEL8, e.g.: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- url --url=http://localhost/rhel91 --proxy=http://192.168.122.1:3128 -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- Such stanza doesn't work on RHEL9 anymore, we get the following on boot: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- [ 16.790278] dracut-initqueue[1181]: ////lib/url-lib.sh@77(curl_fetch_url): curl --globoff --location --retry 3 --retry-connrefused --fail --show-error --remote-name http://localhost/rhel91/images/install.img [ 16.790596] dracut-initqueue[1182]: % Total % Received % Xferd Average Speed Time Time Time Current [ 16.790629] dracut-initqueue[1182]: Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 [ 16.790680] dracut-initqueue[1182]: curl: (7) Failed to connect to localhost port 80: Connection refused -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- Here above we can see `curl` didn't execute with `--proxy` argument. The root cause for this is `curl` command, built by `lib/url-lib.sh` snippet below, relies on "proxy=" command-line variable: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- 59 curl_args="--globoff --location --retry 3 --fail --show-error" 60 getargbool 0 rd.noverifyssl && curl_args="$curl_args --insecure" 61 62 proxy=$(getarg proxy=) 63 [ -n "$proxy" ] && curl_args="$curl_args --proxy $proxy" -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- Unfortunately, there is no such `proxy=` variable anymore, since with commit **b88e10fe3029602b369c719506588097fcbdf80b**, `parse-kickstart` now generates a `inst.proxy=` variable instead: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- --- a/dracut/parse-kickstart +++ b/dracut/parse-kickstart @@ -157,7 +157,7 @@ class DracutURL(Url, DracutArgsMixin): if self.noverifyssl: args.append("rd.noverifyssl") if self.proxy: - args.append("proxy=%s" % self.proxy) + args.append("inst.proxy=%s" % self.proxy) -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- We can confirm the generated cmdline snippet: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- # cat /etc/cmdline.d/80-kickstart.conf inst.text ip=enp1s0:dhcp: bootdev=enp1s0 inst.repo=http://localhost/rhel91 inst.proxy=http://192.168.122.1:3128 -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- On RHEL8, it was: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- # cat /etc/cmdline.d/80-kickstart.conf inst.text ip=enp1s0:dhcp: bootdev=enp1s0 inst.repo=http://localhost/rhel91 proxy=http://192.168.122.1:3128 -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- If new variable (`inst.proxy`) is expected, then lib/url-lib.sh must search for `inst.proxy` as well, but this file is shipped with *dracut*, not *dracut-anaconda*, so this would become inconsistent. Version-Release number of selected component (if applicable): RHEL9.0+ DVD How reproducible: Always Steps to Reproduce: 1. Boot a VM with RHEL9 kernel and initramfs and kickstart containing a URL with a proxy Actual results: Can't load Stage2 Expected results: Can load Stage2
PR: https://github.com/rhinstaller/anaconda/pull/4794
Confirmed that it's now possible to use "url --url=... --proxy=..." to fetch stage2 and packages via the specified proxy. Tested with anaconda-34.25.3.2-1.el9, no regression has been found during the testing. Marking as Verified:Tested.
Additional fix for this issue: https://github.com/rhinstaller/anaconda/pull/4829
Retested with anaconda-34.25.3.4-1.el9 to make sure that an incorrect warning about using the proxy option fixed by the PR from comment 7 is resolved.
Checked that anaconda-34.25.3.4-1.el9 is in nightly compose RHEL-9.3.0-20230626.34 Moving to VERIFIED