Project

General

Profile

Actions

Feature #19389

closed

Change TFTP filename pattern to include unique installation media ID

Added by Lukas Zapletal over 7 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
TFTP
Target version:

Description

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.

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

Related issues 13 (2 open11 closed)

Related to Smart Proxy - Bug #20823: Make -c (continue) wget flag optional when downloading kernel/initramRejected09/01/2017Actions
Related to Smart Proxy - Feature #3034: TFTP file download should be synchronous and handle errorsNewActions
Related to Katello - Bug #24263: Create managed content medium providerClosedShimon ShteinActions
Related to Foreman - Bug #24639: Medium URL provider assumes managed hostClosedLukas ZapletalActions
Related to Boot disk - Refactor #25120: use medium provider interface to get bootfiles for disk generationClosedTimo GoebelActions
Related to Foreman - Bug #25567: Wrong provision method signature for RancherOSClosedTomer BriskerActions
Related to Foreman - Bug #25569: Windows templates: undefined method `medium_uri' for nil:NilClassClosedShimon ShteinActions
Related to Foreman - Refactor #25635: fix deprecation message for OS methodsClosedTomer BriskerActions
Related to Foreman - Bug #25708: Always download newest bootloader (if possible)ResolvedActions
Related to Foreman - Bug #25767: XenServer provisioning broken in 1.20ClosedShimon ShteinActions
Related to Foreman - Bug #25852: coreos medium path is not generated correctly with medium providerClosedTimo GoebelActions
Related to Foreman - Feature #26709: Rethink TFTP naming conventions for PXE filesNewActions
Related to Foreman - Bug #28965: Regression: Since #19389 boot image of debian is not updated and installation is brokenClosedLukas ZapletalActions
Actions

Also available in: Atom PDF