Project

General

Profile

Bug #2412

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

Added by Daniel Nägele almost 9 years ago. Updated 3 months 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

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

Associated revisions

Revision b94c9b07 (diff)
Added by Lukas Zapletal 5 months ago

Fixes #2412 - don't continue wget downloads

Revision 3d87c6fe (diff)
Added by Lukas Zapletal 3 months ago

Refs #2412 - use curl for downloads

History

#1 Updated by Ohad Levy over 3 years ago

  • Triaged set to No
  • Assignee deleted (Ohad Levy)
  • Description updated (diff)

#2 Updated by Lukas Zapletal over 3 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.

#3 Updated by Lukas Zapletal 12 months ago

  • Triaged changed from No to Yes
  • Difficulty set to easy
  • Priority changed from Normal to High
  • Assignee set to Lukas Zapletal
  • Category changed from TFTP to TFTP
  • Project changed from Foreman to Smart Proxy

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.

#4 Updated by The Foreman Bot 12 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/smart-proxy/pull/785 added

#5 Updated by Lukas Zapletal 5 months ago

  • Related to Bug #33328: Files in tftpboot/boot don't pick up changed files added

#6 Updated by The Foreman Bot 5 months ago

  • Fixed in Releases 3.1.0 added

#7 Updated by The Foreman Bot 5 months ago

  • Pull request https://github.com/theforeman/smart-proxy/pull/798 added

#8 Updated by Lukas Zapletal 5 months ago

  • Target version set to 3.0.0

Requesting 3.0, multiple users hitting this due to CentOS Stream

#9 Updated by Anonymous 5 months ago

  • Status changed from Ready For Testing to Closed

#10 Updated by The Foreman Bot 5 months ago

  • Pull request https://github.com/theforeman/smart-proxy/pull/799 added

#11 Updated by Ewoud Kohl van Wijngaarden 4 months ago

  • Target version changed from 3.0.0 to 3.0.1

3.0.0 has been released already, moving the target version.

#12 Updated by Ewoud Kohl van Wijngaarden 3 months ago

  • Target version deleted (3.0.1)

Since this introduced a regression, I'm removing it from 3.0.1.

Also available in: Atom PDF