Project

General

Custom queries

Profile

Actions

Feature #19389

closed

Change TFTP filename pattern to include unique installation media ID

Added by Lukas Zapletal about 8 years ago. Updated almost 7 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
#1

Updated by Dominic Cleal about 8 years ago

  • Project changed from Smart Proxy to Foreman
  • Subject changed from Change downoad policy of kernel/initram to Change download policy of kernel/initram
  • Category changed from TFTP to TFTP
#3

Updated by Dominic Cleal about 8 years ago

  • Status changed from New to Need more information
#4

Updated by Lukas Zapletal about 8 years ago

  • Status changed from Need more information to New
#5

Updated by Lukas Zapletal about 8 years ago

  • Subject changed from Change download policy of kernel/initram to Change kernel/initram naming pattern
#6

Updated by Lukas Zapletal about 8 years ago

  • Description updated (diff)
#7

Updated by Lukas Zapletal about 8 years ago

  • Bugzilla link set to 1447963
#8

Updated by Lukas Zapletal almost 8 years ago

  • Project changed from Foreman to Smart Proxy
  • Category changed from TFTP to TFTP
  • Bugzilla link deleted (1447963)
#9

Updated by Lukas Zapletal over 7 years ago

  • Related to Bug #20823: Make -c (continue) wget flag optional when downloading kernel/initram added
#13

Updated by Lukas Zapletal over 7 years ago

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

Updated by Lukas Zapletal over 7 years ago

  • Project changed from Smart Proxy to Foreman
  • Subject changed from Change kernel/initram naming pattern to Change TFTP filename pattern to include unique installation media ID
  • Description updated (diff)
  • Category changed from TFTP to TFTP
#20

Updated by The Foreman Bot over 7 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Shimon Shtein
  • Pull request https://github.com/theforeman/foreman/pull/5244 added
#21

Updated by Lukas Zapletal about 7 years ago

  • Bugzilla link set to 1447963
#22

Updated by Lukas Zapletal about 7 years ago

  • Priority changed from Normal to High
#23

Updated by Shimon Shtein almost 7 years ago

  • Related to Bug #24263: Create managed content medium provider added
#24

Updated by Marek Hulán almost 7 years ago

  • Target version set to 1.20.0
  • Fixed in Releases 1.20.0 added
#25

Updated by Shimon Shtein almost 7 years ago

  • Status changed from Ready For Testing to Closed
#26

Updated by The Foreman Bot almost 7 years ago

  • Pull request https://github.com/theforeman/foreman/pull/5882 added
#27

Updated by Lukas Zapletal almost 7 years ago

  • Related to Bug #24639: Medium URL provider assumes managed host added
#28

Updated by The Foreman Bot almost 7 years ago

  • Pull request https://github.com/theforeman/community-templates/pull/491 added
#29

Updated by Timo Goebel over 6 years ago

  • Related to Refactor #25120: use medium provider interface to get bootfiles for disk generation added
#30

Updated by Tomer Brisker over 6 years ago

  • Related to Bug #25567: Wrong provision method signature for RancherOS added
#31

Updated by Tomer Brisker over 6 years ago

  • Related to Bug #25569: Windows templates: undefined method `medium_uri' for nil:NilClass added
#32

Updated by Tomer Brisker over 6 years ago

#33

Updated by Lukas Zapletal over 6 years ago

  • Related to Bug #25708: Always download newest bootloader (if possible) added
#34

Updated by Tomer Brisker over 6 years ago

  • Related to Bug #25767: XenServer provisioning broken in 1.20 added
#35

Updated by Timo Goebel over 6 years ago

  • Related to Bug #25852: coreos medium path is not generated correctly with medium provider added
#36

Updated by Lukas Zapletal about 6 years ago

  • Related to Feature #26709: Rethink TFTP naming conventions for PXE files added
#37

Updated by Daniel Kraemer over 5 years ago

  • Related to Bug #28965: Regression: Since #19389 boot image of debian is not updated and installation is broken added
Actions

Also available in: Atom PDF