Project

General

Profile

Feature #19389

Updated by Lukas Zapletal about 2 years ago

Currently we download kernel and initramdisk and store it under Operating System name and version (e.g. RedHat-7.3-x86_64-initrd.img and RedHat-7.3-x86_64-vmlinuz). This does not work when Katello plugin is installed and several OS variants are in use (e.g. RHEL Server and Workstation) because Katello uses generic OS name (e.g. RedHat 7.3) with Content Source (e.g. Red_Hat_Enterprise_Linux_Workstation-Red_Hat_Enterprise_Linux_7_Workstation_Kickstart_x86_64_7_3 or Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_Kickstart_x86_64_7_3).

When user with multiple OS variants provisions one or then another, our current policy will redownload files using @wget -c@ which will corrupt them.

This is a proposal to change download policy:

* Store both files as sha sum of the source URL for example @vmlinuz-cfa27af2f1fc0fb6f29fb75e97baaecae13b97d4@
* Create symlink to files named after host and not operating system so each one gets its own unique symlinks (after target is downloaded to prevent sending of unfinished files)
* Implement @defTftpFiles@ orchestration method and remove those symlinks upon host removal

Alternatively, the file name could be sha sum of URL and optionally last modification time, if the web server provides it. This way also updates could be seamlessly propagated into TFTP since most HTTP servers do provide this information.


<pre>
echo http://capsule/pulp/kickstart/x/y/vmlinuz | sha1sum
cfa27af2f1fc0fb6f29fb75e97baaecae13b97d4
</pre>

Back