Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1578290

Summary: Unify kernel and initramdisk path with upstream
Product: Red Hat Satellite Reporter: Lukas Zapletal <lzap>
Component: Discovery ImageAssignee: Lukas Zapletal <lzap>
Status: CLOSED ERRATA QA Contact: Roman Plevka <rplevka>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.4CC: ehelms, lzap, mhulan, rabajaj, rplevka, spetrosi, zhunting
Target Milestone: 6.4.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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 16:48:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1572980, 1598020    

Description Lukas Zapletal 2018-05-15 08:17:20 UTC
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 08:24:56 UTC
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 08:26:50 UTC
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 07:41:54 UTC
REL-ENG: This is a FDI SPEC change, see the patch in comment 2.

Comment 11 Lukas Zapletal 2018-07-20 08:59:33 UTC
This BZ must be part of our next FDI build for 6.4. Setting depends-on.

Comment 14 Roman Plevka 2018-09-10 08:43:11 UTC
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 16:48:22 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/RHBA-2018:2928