Bug #6289

vmlinuz/initrd files corrupted during when multiple hosts created simultaneously

Added by Dominic Cleal over 3 years ago. Updated over 3 years ago.

Status:Closed
Priority:Normal
Assigned To:Dmitri Dolguikh
Category:TFTP
Target version:Foreman - Sprint 26
Difficulty: Bugzilla link:1110378
Found in release: Pull request:
Story points-
Velocity based estimate-
Release1.6.0Release relationshipAuto

Description

Linked BZ describes a side effect of async downloads:

--- Additional comment from James Slagle on 2014-06-17 15:02:27 BST ---

i been able to reliably reproduce this now and I believe what triggers this is assigning a 2nd host to a host group before the vmlinuz/initrd download has finished from the first host to host group assignment.

according to the foreman-proxy.log, the 2nd assignment causes an additional background task to get started to download the files. You then have multiple downloads clobbering each other.

likewise for any subsequent assignment if there is already a download running.

I've attached my foreman-proxy.log. It doesn't show anything different really from a successful download, but you can at least see it starting an additional download task before the first has even finished.

I end up with files that are much larger than they should be:

[root@staypuft boot]# pwd
/var/lib/tftpboot/boot
[root@staypuft boot]# ll -h
total 277M
-rw-r--r--. 1 foreman-proxy root          165M Jun  5 14:45 foreman-discovery-image-latest.el6.iso-img
-rw-r--r--. 1 foreman-proxy root          3.9M Jun  5 14:45 foreman-discovery-image-latest.el6.iso-vmlinuz
-rw-r--r--. 1 foreman-proxy foreman-proxy 101M May  7 03:39 RedHat-7.0-x86_64-initrd.img
-rw-r--r--. 1 foreman-proxy foreman-proxy 7.4M May  5 11:21 RedHat-7.0-x86_64-vmlinuz

Related issues

Related to Smart Proxy - Feature #3034: TFTP file download should be synchronous and handle errors Ready For Testing 09/06/2013

Associated revisions

Revision d44cdd95
Added by Dmitri Dolguikh over 3 years ago

fixes #6289: avoids concurrent downloads of files with the same name and destination dir.

History

#1 Updated by Dominic Cleal over 3 years ago

  • Related to Feature #3034: TFTP file download should be synchronous and handle errors added

#2 Updated by Dmitri Dolguikh over 3 years ago

  • Status changed from Assigned to Ready For Testing

#4 Updated by Dominic Cleal over 3 years ago

  • Release set to 1.6.0

#5 Updated by Dmitri Dolguikh over 3 years ago

  • Target version changed from Sprint 25 to Sprint 26

#6 Updated by Dmitri Dolguikh over 3 years ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF