Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1578290 - Unify kernel and initramdisk path with upstream
Unify kernel and initramdisk path with upstream
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Discovery Image (Show other bugs)
6.4
Unspecified Unspecified
unspecified Severity medium (vote)
: GA
: Unused
Assigned To: Lukas Zapletal
Roman Plevka
: Triaged
Depends On:
Blocks: 1572980 1598020
  Show dependency treegraph
 
Reported: 2018-05-15 04:17 EDT by Lukas Zapletal
Modified: 2018-10-16 12:49 EDT (History)
7 users (show)

See Also:
Fixed In Version: foreman-discovery-image-3.5.1
Doc Type: Release Note
Doc Text:
Starting from Satellite 6.4, the paths to the foreman discovery image are changed to conform with upstream: * `boot/fdi-image-rhel_7-vmlinuz` > `boot/fdi-image/vmlinuz0` * `initrd=boot/fdi-image-rhel_7-img` > `boot/fdi-image/initrd0.img` It was leading to issues with PXE templates previously. Now the new global templates already contains the new paths.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-10-16 12:48:22 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:2928 None None None 2018-10-16 12:49 EDT

  None (edit)
Description Lukas Zapletal 2018-05-15 04:17:20 EDT
Upstream uses these paths:

boot/fdi-image/vmlinuz0
initrd=boot/fdi-image/initrd0.img

But downstream we have:

boot/fdi-image-rhel_7-vmlinuz
initrd=boot/fdi-image-rhel_7-img

We need to keep copying PXE templates for every release, let's ditch it and create symlinks downstream.
Comment 1 Lukas Zapletal 2018-05-15 04:24:56 EDT
diff --git a/foreman-discovery-image.spec.tmpl b/foreman-discovery-image.spec.tmpl
index f81f322..4f71678 100644
--- a/foreman-discovery-image.spec.tmpl
+++ b/foreman-discovery-image.spec.tmpl
@@ -66,6 +66,9 @@ cp %{app_root}/tftpboot/initrd0.img %{boot_dir}/%{iso_filename}-img
 cd %{boot_dir}
 ln -snf %{iso_filename}-vmlinuz %{image_full_name}-vmlinuz
 ln -snf %{iso_filename}-img %{image_full_name}-img
+mkdir fdi-image
+ln -snf fdi-image/vmlinuz0 %{image_full_name}-vmlinuz
+ln -snf fdi-image/initrd0.img %{image_full_name}-img
 rm -rf %{app_root}/fdi.iso %{app_root}/tftpboot
 
 
@@ -84,6 +87,8 @@ rm -rf %{boot_dir}/%{iso_filename}-vmlinuz \
 %{_datarootdir}/%{name}/%{name}.ks
 %ghost %{boot_dir}/%{iso_filename}-vmlinuz
 %ghost %{boot_dir}/%{iso_filename}-img
+%ghost %{boot_dir}/fdi-image/vmlinuz0
+%ghost %{boot_dir}/fdi-image/initrd0.img
 %ghost %{boot_dir}/%{image_full_name}-vmlinuz
 %ghost %{boot_dir}/%{image_full_name}-img
Comment 3 Lukas Zapletal 2018-05-15 04:26:50 EDT
QA NOTES:

1) Install foreman-discovery-image RPM
2) Verify there are no post RPM scriplet errors
3) Verify that these symlinks are valid:

cd /var/lib/tftpboot/boot
ls
fdi-image/vmlinuz0 -> kernel file
fdi-image/initrd0.img -> initrd file
Comment 8 Lukas Zapletal 2018-05-30 03:41:54 EDT
REL-ENG: This is a FDI SPEC change, see the patch in comment 2.
Comment 11 Lukas Zapletal 2018-07-20 04:59:33 EDT
This BZ must be part of our next FDI build for 6.4. Setting depends-on.
Comment 14 Roman Plevka 2018-09-10 04:43:11 EDT
VERIFIED

on sat6.4.0-21

# yum install foreman-discovery-image

==============================================================================================================================================================================================================================================
 Package                                                Arch                                  Version                                         Repository                                                                                 Size
==============================================================================================================================================================================================================================================
Installing:
 foreman-discovery-image                                noarch                                1:3.5.2-1.el7sat                                Sat6-CI_Red_Hat_Satellite_6_4_Composes_Satellite_6_4_RHEL7                                210 M

Transaction Summary
==============================================================================================================================================================================================================================================
Install  1 Package

Total download size: 210 M
Installed size: 239 M
Is this ok [y/d/N]: y

Installed:
  foreman-discovery-image.noarch 1:3.5.2-1.el7sat                                                                                                                                                                                             

[root@intel-lizardhead-02 fdi-image]# ll /var/lib/tftpboot/boot
total 0
drwxr-xr-x. 2 foreman-proxy root 139 Sep 10 04:38 fdi-image
[root@intel-lizardhead-02 fdi-image]# ll /var/lib/tftpboot/boot/fdi-image/
total 213992
-rw-r--r--. 1 root root 212738406 Sep 10 04:38 foreman-discovery-image-3.5.2-1.iso-img
-r--r--r--. 1 root root   6381872 Sep 10 04:38 foreman-discovery-image-3.5.2-1.iso-vmlinuz
lrwxrwxrwx. 1 root root        39 Sep 10 04:38 initrd0.img -> foreman-discovery-image-3.5.2-1.iso-img
lrwxrwxrwx. 1 root root        43 Sep 10 04:38 vmlinuz0 -> foreman-discovery-image-3.5.2-1.iso-vmlinuz
Comment 16 errata-xmlrpc 2018-10-16 12:48:22 EDT
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/RHBA-2018:2928

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