Bug 1447963 - Switching installation media (or source) back and forth corrupts initdamdisk/kernel
Summary: Switching installation media (or source) back and forth corrupts initdamdisk/...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: TFTP
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.5.0
Assignee: Shimon Shtein
QA Contact: Roman Plevka
URL: http://projects.theforeman.org/issues...
Whiteboard: hotfix, hotfix_delivered
Depends On:
Blocks: 1122832 1459226
TreeView+ depends on / blocked
 
Reported: 2017-05-04 10:27 UTC by Lukas Zapletal
Modified: 2021-09-09 12:17 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Release Note
Doc Text:
Satellite 6.5 is changing naming conventions of kernel and initramdisk in TFTP folder. It was previously based operating system name, version and architecture: boot/Redhat-6.1-x86_64-vmlinuz boot/Redhat-6.1-x86_64-initrd.img However this was causing issues when operating system variant (Server, Workstation) was changed leading to corrupted files. The new naming convention is based on installation media or repository name followed by hash of URL: boot/CentOS_mirror-aBsbsZ_lDn-vmlinuz boot/CentOS_mirror-aBsbsZ_lDn-initrd.img Note when a content is promoted to a new content view, the URL changes therefore new pair of files is downloaded. This is expected behavior, more files will appear in the TFTP folder compared to previous naming scheme.
Clone Of:
Environment:
Last Closed: 2019-05-14 12:36:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 19389 0 High Closed Change TFTP filename pattern to include unique installation media ID 2020-09-17 17:13:39 UTC
Red Hat Product Errata RHSA-2019:1222 0 None None None 2019-05-14 12:36:30 UTC

Description Lukas Zapletal 2017-05-04 10:27:25 UTC
Katello automatically creates OS called "RedHat 7.x" associating two installation media - one for Server the other for Workstation. This is because Puppet insist on this name (https://bugzilla.redhat.com/show_bug.cgi?id=1155704).

User needs to pick up in host/hosgroup proper inst. media, which causes redownload of kernel/initram disk every time different OS variant is being installed. There is a bug in smart-proxy that corrupts redownloaded files under some circumstances (when remote file is bigger than local) thank to how wget utilizes the -c option.

We can solve this by either changing the naming pattern:

http://projects.theforeman.org/issues/19389

Or simply removing the "-c" option which will cause redownloads on every single provisioning. This should be opt-in setting.

Comment 5 Lukas Zapletal 2017-09-20 11:19:04 UTC
WORKAROUND:

Locate http_download.rb file in /usr/share/foreman-proxy directory and remove "-c" (continue) flag.

https://github.com/theforeman/smart-proxy/blob/933f2b096a8474538915a1edefadfb8f5e757a0d/lib/proxy/http_download.rb

Comment 11 Mike McCune 2018-03-09 16:27:47 UTC
Lukas, it doesn't appear there is any solid upstream patch for this yet? Can you confirm if the workaround is suitable for a real fix?

Comment 12 Lukas Zapletal 2018-03-12 12:28:02 UTC
Sup Mike,

upstream did not much like the idea of adding temporary setting for wget to be able to remove faulty "-c" option. On the other hand, there is a associated ticket which solves this problem in a nicer way and it is Pending Merge:

http://projects.theforeman.org/issues/19389

I am now associating this with this BZ and closing the original issue.

Comment 13 Lukas Zapletal 2018-04-24 13:15:23 UTC
This problem can also happen when there is kernel/initramdisk update from Red Hat release engineering (it rarely happens).

Comment 14 Lukas Zapletal 2018-04-24 13:15:48 UTC
*** Bug 1571290 has been marked as a duplicate of this bug. ***

Comment 16 Satellite Program 2018-06-22 20:08:42 UTC
Upstream bug assigned to sshtein

Comment 17 Satellite Program 2018-06-22 20:08:45 UTC
Upstream bug assigned to sshtein

Comment 18 Ivan Necas 2018-07-23 11:31:45 UTC
I don't think the change we are talking about is back-portable to 6.3 (or even 6.4)

Comment 19 Satellite Program 2018-07-26 16:08:13 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/19389 has been resolved.

Comment 22 Roman Plevka 2019-03-13 14:14:30 UTC
VERIFIED
on sat6.5.0 snap #19

i enabled & synced (immediate dl policy) both Rhel 7.5 Workstation & Server kickstart repos.
- then i provisioned a rhel server host and after that a rhe lworkstation host:


[root@sat-6-5-qa-rhel7 boot]# pwd
/var/lib/tftpboot/boot
[root@sat-6-5-qa-rhel7 boot]# ll
total 119016
-rw-r--r--. 1 foreman-proxy foreman-proxy 54525200 Mar 13 13:45 red-hat-enterprise-linux-7-server-kickstart-x86_64-7-5-29-initrd.img
-rw-r--r--. 1 foreman-proxy foreman-proxy  6381872 Mar 13 13:44 red-hat-enterprise-linux-7-server-kickstart-x86_64-7-5-29-vmlinuz
-rw-r--r--. 1 foreman-proxy foreman-proxy 54572776 Mar 13 13:54 red-hat-enterprise-linux-7-workstation-kickstart-x86_64-7-5-30-initrd.img
-rw-r--r--. 1 foreman-proxy foreman-proxy  6381872 Mar 13 13:54 red-hat-enterprise-linux-7-workstation-kickstart-x86_64-7-5-30-vmlinuz

both hosts got provisioned properly

Comment 25 errata-xmlrpc 2019-05-14 12:36:19 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:1222


Note You need to log in before you can comment on or make changes to this bug.