Feature #19389
Updated by Lukas Zapletal almost 7 years ago
Currently the TFTP file is named "OS_NAME-VERSION-vmlinuz" and the same for initramdisk. This does not work in scenarios where Installation Media gets changed as this causes redownloading of the boot files every new Host. Also there is a bug (associated) which is causing wget to corrupt files.
We need to include ID (ideally not database ID but some kind of short label) for each Media. Also we need to refactor Operating system, generating PXE names and TFTP filenames should not be responsibility of OS, but a host concern.
Once PR is filed, please create ticket for Katello, the project needs to change Synced Content source to match the changes and also include the ID.
---
Initially this Feature was called "*Change kernel/initram naming pattern*", for the record this is the original proposal:
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>