Project

General

Profile

Actions

Bug #2412

closed

Smartproxy TFTP using wget -c to pull new PXE defaults produces errors while booting

Added by Daniel Nägele about 11 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
High
Category:
TFTP
Target version:
-

Description

All Smartproxies use the following command to pull the new images from the Foreman server:

cmd = "wget --timeout=10 --tries=3 --no-check-certificate -nv -c #{src} -O \"#{destination}\""

The wget manpage about the -c switch:
 -c
  --continue
     Continue getting a partially-downloaded file.  This is useful when you want to finish up a download started by a previous instance of Wget, or by another program.

Two of our Smartproxies ended up with larger images in their /srv/tftp, because wget appended the new images for some reason.
This led to some strange behaviour on new hosts booting for the first time, like kernel panics while booting or running in a bootloop. The removal of the -c-flag in the source code of all affected Smartproxies fixed those.

A diff of the code we are using now:

danieln@some-smartproxy:~$ diff /usr/share/foreman-proxy/lib/proxy/tftp.rb /usr/share/foreman-proxy/lib/proxy/tftp_fixed.rb 
95c95
<       cmd = "wget --timeout=10 --tries=3 --no-check-certificate -nv -c #{src} -O \"#{destination}\"" 
---
>       cmd = "wget --timeout=10 --tries=3 --no-check-certificate -nv #{src} -O \"#{destination}\"" 


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #33328: Files in tftpboot/boot don't pick up changed filesDuplicateActions
Actions

Also available in: Atom PDF