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 #1

Updated by Ohad Levy almost 6 years ago

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

Updated by Lukas Zapletal almost 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.

Actions #3

Updated by Lukas Zapletal about 3 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.

Actions #4

Updated by The Foreman Bot about 3 years ago

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

Updated by Lukas Zapletal over 2 years ago

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

Updated by The Foreman Bot over 2 years ago

  • Fixed in Releases 3.1.0 added
Actions #7

Updated by The Foreman Bot over 2 years ago

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

Updated by Lukas Zapletal over 2 years ago

  • Target version set to 3.0.0

Requesting 3.0, multiple users hitting this due to CentOS Stream

Actions #9

Updated by Anonymous over 2 years ago

  • Status changed from Ready For Testing to Closed
Actions #10

Updated by The Foreman Bot over 2 years ago

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

Updated by Ewoud Kohl van Wijngaarden over 2 years ago

  • Target version changed from 3.0.0 to 3.0.1

3.0.0 has been released already, moving the target version.

Actions #12

Updated by Ewoud Kohl van Wijngaarden over 2 years ago

  • Target version deleted (3.0.1)

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

Actions

Also available in: Atom PDF