Feature #3034

TFTP file download should be synchronous and handle errors

Added by Dominic Cleal over 3 years ago. Updated about 1 month ago.

Status:Ready For Testing
Priority:Normal
Assigned To:Dmitri Dolguikh
Category:TFTP
Target version:Foreman - Team Ivan Iteration 6
Difficulty: Bugzilla link:1215588
Found in release: Pull request:https://github.com/theforeman/smart-proxy/pull/472
Story points-
Velocity based estimate-

Description

The TFTP file download feature currently spawns wget in the background, so offers no tracking of progress or download errors.

It should perform downloads as a synchronous operation, which will allow us to report success or failure back to Foreman when provisioning hosts. Async downloads also mean that Foreman often boots VMs up too quickly, before the boot files have downloaded.

wget has another issue under failure, as it leaves a zero byte file in place which means we think downloads were a success.

Given the proxy's usually deployed on WEBrick, a synchronous download could tie up its resources, making it inaccessible to others though.


Related issues

Related to Foreman - Refactor #5121: Download kernel and image during OS creation rather than ... New 04/09/2014
Related to Smart Proxy - Bug #6289: vmlinuz/initrd files corrupted during when multiple host... Closed 06/19/2014
Related to Smart Proxy - Bug #16674: when downloading boot images, a failure does not fail the... Duplicate 09/23/2016
Related to Smart Proxy - Bug #5069: TFTP automatic boot file download does not track updates New 04/03/2014
Duplicated by Smart Proxy - Bug #11067: Failing TFTP fetch filed doesn't trigger error in UI Duplicate 07/09/2015
Duplicated by Foreman - Bug #16609: race condition when using pxe icw virtual HW and a new OS Duplicate 09/20/2016

History

#1 Updated by Dominic Cleal about 3 years ago

  • Related to Refactor #5121: Download kernel and image during OS creation rather than prior build added

#2 Updated by Dominic Cleal almost 3 years ago

  • Bugzilla link set to https://bugzilla.redhat.com/show_bug.cgi?id=1110378

edit: moved to #6289

#3 Updated by Dominic Cleal almost 3 years ago

  • Related to Bug #6289: vmlinuz/initrd files corrupted during when multiple hosts created simultaneously added

#4 Updated by Dominic Cleal almost 3 years ago

  • Bugzilla link deleted (https://bugzilla.redhat.com/show_bug.cgi?id=1110378)

#5 Updated by Lukas Zapletal over 2 years ago

For the record, RHOSP team hit this. We might want to speak about bumping up the priority of this.

#6 Updated by Ohad Levy almost 2 years ago

  • Bugzilla link set to 1215588

#7 Updated by Dominic Cleal almost 2 years ago

  • Duplicated by Bug #11067: Failing TFTP fetch filed doesn't trigger error in UI added

#8 Updated by Dominic Cleal 7 months ago

  • Duplicated by Bug #16609: race condition when using pxe icw virtual HW and a new OS added

#9 Updated by Dmitri Dolguikh 7 months ago

  • Status changed from New to Assigned
  • Assigned To set to Dmitri Dolguikh

#10 Updated by Dmitri Dolguikh 7 months ago

  • Related to Bug #16674: when downloading boot images, a failure does not fail the operation in the UI added

#11 Updated by Lukas Zapletal 6 months ago

When touching this code, consider downloading the files under different (temporary) names so we shorten the window when different host (not the one being blocked by the download) sees incorrect file (e.g. during upgrading to newer version).

Also I would like to keep the current (asynchronous) behavior in some way so it can be used when we implement #5121

I am currently working on an issue when file was downloaded incorrectly (error during transmission) and wget is not able to fix this anymore since it only compares timestamps. If you can take this into consideration when designing the new way of downloading.

#12 Updated by The Foreman Bot 6 months ago

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

#13 Updated by Ivan Necas 6 months ago

  • Target version set to Team Ivan Iteration 6

#14 Updated by Michael Moll 4 months ago

  • Related to Bug #5069: TFTP automatic boot file download does not track updates added

Also available in: Atom PDF