Bug #2412
closedSmartproxy TFTP using wget -c to pull new PXE defaults produces errors while booting
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}\""
Updated by Ohad Levy over 6 years ago
- Description updated (diff)
- Assignee deleted (
Ohad Levy) - Triaged set to No
this is actually activity discussed at https://community.theforeman.org/t/rfc-drop-c-flag-from-wget-on-tftp-proxy/10010
Updated by Lukas Zapletal over 6 years ago
I can confirm your workaround is only reasonable one for now, I want to redesign how we download PXE files, hopefully next month.
Updated by Lukas Zapletal almost 4 years ago
- Project changed from Foreman to Smart Proxy
- Category changed from TFTP to TFTP
- Assignee set to Lukas Zapletal
- Priority changed from Normal to High
- Difficulty set to easy
- Triaged changed from No to Yes
With CentOS 8 Stream this is a more painful issue, I was planning rewriting this code but there is no time - let's change -c to --timestamping --no-if-modified-since.
Updated by The Foreman Bot almost 4 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/smart-proxy/pull/785 added
Updated by Lukas Zapletal over 3 years ago
- Related to Bug #33328: Files in tftpboot/boot don't pick up changed files added
Updated by The Foreman Bot about 3 years ago
- Pull request https://github.com/theforeman/smart-proxy/pull/798 added
Updated by Lukas Zapletal about 3 years ago
- Target version set to 3.0.0
Requesting 3.0, multiple users hitting this due to CentOS Stream
Updated by Anonymous about 3 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset b94c9b07a78fc8c4eb382eb574b28eed48001d25.
Updated by The Foreman Bot about 3 years ago
- Pull request https://github.com/theforeman/smart-proxy/pull/799 added
Updated by Ewoud Kohl van Wijngaarden about 3 years ago
- Target version changed from 3.0.0 to 3.0.1
3.0.0 has been released already, moving the target version.
Updated by Ewoud Kohl van Wijngaarden about 3 years ago
- Target version deleted (
3.0.1)
Since this introduced a regression, I'm removing it from 3.0.1.