Bug #33328
closedFiles in tftpboot/boot don't pick up changed files
Description
I have first described this in here: https://community.theforeman.org/t/loading-tftpboot-with-wget/24994
When a build is initiated for a host, the foreman proxy will retrieve the initrd and vmlinuz via wget commands like this:
2021-08-23T19:10:24 4e404324 [I] [55918] Started task ["/usr/bin/wget", "--connect-timeout=10", "--dns-timeout=10", "--read-timeout=60", "--tries=3", "--no-check-certificate", "-nv", "-c", "http://foreman.example.com/pulp/content/ORG/Production/centos8/custom/centos8/BaseOS_x86_64//images/pxeboot/vmlinuz", "-O", "/var/lib/tftpboot/boot/centos-8-base-2744-vmlinuz"]
Due to the "-c" option ("Continue getting a partially-downloaded file") it doesn't pick up on new files. If the vmlinuz is updated in the repository it will never pick up the new version. If the new file is larger the wget will pick up the bytes at the end, but that's it. It's still basically the original file with some garbage at the end.
The initrd and vmlinuz may not change often, but I guess there quite a few scenarios where it may happen: important bug fixes, CentOS 8 Stream rolling updates, minor version update from CentOS 8.3 to 8.4 if you are using the /8/ repository URLs.