Bug #36209
closedtftp initrd/vmlinux generation: curl malformed
Description
Problem:
The TFTP copying of vmlinux and initrd fails with "url malformed".
The Target URL itself is validated muliple times with curl and wget manually, so the file is really downloadable. The source is an extracted OL8full ISO to /var/www/html/pub on the same foreman/katello host. Please see attached LOG File.
Expected outcome:
vmlinux and initrd are put into /var/lib/tftp/boot
Foreman and Proxy versions:
Foreman: 3.5.2
Katello: 4.7.3
Foreman and Proxy plugin versions:
Distribution and version:
OracleLinux 8.7
Other relevant data:
/var/log/foreman-proxy/proxy.log
2023-03-20T09:19:01 3543f6af [I] Finished POST /tftp/fetch_boot_file with 200 (0.67 ms) 2023-03-20T09:19:01 3543f6af [I] [1164514] Started task /usr/bin/curl\ --silent\ --show-error\ --connect-timeout\ 10\ --retry\ 3\ --retry-delay\ 10\ --max-time\ 3600\ --remote-time\ --time-cond\ file\ /var/lib/tftpboot/boot/oraclelinux-8-iso-local-7jET8gzdRF9B-vmlinuz\ --write-out\ Task\ done,\ result:\ \%\{http_code\},\ size\ downloaded:\ \%\{size_download\}b,\ speed:\ \%\{speed_download\}b/s,\ time:\ \%\{time_total\}ms\ --output\ /var/lib/tftpboot/boot/oraclelinux-8-iso-local-7jET8gzdRF9B-vmlinuz\ --location\ http://katello.test.tools/pub/OracleLinux8_ISO/BaseOS/images/pxeboot/vmlinuz 2023-03-20T09:19:01 3543f6af [I] Started POST /tftp/fetch_boot_file 2023-03-20T09:19:01 3543f6af [I] Finished POST /tftp/fetch_boot_file with 200 (1.68 ms) 2023-03-20T09:19:01 3543f6af [I] [1164518] Started task /usr/bin/curl\ --silent\ --show-error\ --connect-timeout\ 10\ --retry\ 3\ --retry-delay\ 10\ --max-time\ 3600\ --remote-time\ --time-cond\ file\ /var/lib/tftpboot/boot/oraclelinux-8-iso-local-7jET8gzdRF9B-initrd.img\ --write-out\ Task\ done,\ result:\ \%\{http_code\},\ size\ downloaded:\ \%\{size_download\}b,\ speed:\ \%\{speed_download\}b/s,\ time:\ \%\{time_total\}ms\ --output\ /var/lib/tftpboot/boot/oraclelinux-8-iso-local-7jET8gzdRF9B-initrd.img\ --location\ http://katello.test.tools/pub/OracleLinux8_ISO/BaseOS/images/pxeboot/initrd.img 2023-03-20T09:19:01 3543f6af [W] [1164514] curl: (3) <url> malformed 2023-03-20T09:19:02 3543f6af [W] [1164518] curl: (3) <url> malformed
I believe https://projects.theforeman.org/issues/36138 introduced a new bug. If i remove the "file" part from --time-cond the download works as before.
related forum discussion with further information: https://community.theforeman.org/t/curl-url-malformed-during-initrd-and-vmlinux-tftp-copy/32850