Bug #2412
Updated by Ohad Levy over 6 years ago
All Smartproxies use the following command to pull the new images from the Foreman server: <pre>cmd = "wget --timeout=10 --tries=3 --no-check-certificate -nv -c #{src} -O \"#{destination}\""</pre> The wget manpage about the _-c_ switch: <pre> -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.</pre> 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: <pre>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}\"" </pre>