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 1787329 - change filename in initrd live CPIO archive to fdi.iso
Summary: change filename in initrd live CPIO archive to fdi.iso
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Discovery Image
Version: 6.6.0
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: 6.8.0
Assignee: Lukas Zapletal
QA Contact: Roman Plevka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-02 12:32 UTC by Sayan Das
Modified: 2020-10-27 13:00 UTC (History)
7 users (show)

Fixed In Version: foreman-discovery-image-3.6.7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 12:59:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2020:4366 0 None None None 2020-10-27 13:00:06 UTC

Description Sayan Das 2020-01-02 12:32:01 UTC
Created attachment 1649169 [details]
Debug output of discovery-iso-to-pxe

Description of problem:

While using "/usr/bin/discovery-iso-to-pxe" utility to extact vmlinuz and initrd files from a foreman-discovery-image-XX.iso , It creates the initrd file by packing it the live image iso named foreman-discovery-image-XX.iso  but expected is that it will have the need build with fdi.iso .



Version-Release number of selected component (if applicable):
Satellite 6.6 [ 6.5 and 6.4 as well ]

How reproducible:
Always


Steps to Reproduce:
1. Install foreman-discovery-package on Satellite

2. Perform the steps as mentioned below.

[root@syssat66 foreman-discovery-image]# /usr/bin/discovery-iso-to-pxe foreman-discovery-image-3.5.4-6.iso
mount: /dev/loop0 is write-protected, mounting read-only
Your pxeboot image is complete.

Copy tftpboot/ subdirectory to /tftpboot or a subdirectory of /tftpboot.
Set up your DHCP, TFTP and PXE server to serve /tftpboot/.../pxeboot.0

Note: The initrd image contains the whole CD ISO and is consequently
very large.  You will notice when pxebooting that initrd can take a
long time to download.  This is normal behaviour.



[root@syssat66 foreman-discovery-image]# ll
total 257148
-rw-r--r-- 1 root root 263192576 Aug  2 14:05 foreman-discovery-image-3.5.4-6.iso
-rw-r--r-- 1 root root    119511 Aug  2 14:05 foreman-discovery-image.ks
drwxr-xr-x 3 root root        79 Jan  2 06:51 tftpboot


 
[root@syssat66 foreman-discovery-image]# ll tftpboot/
total 226272
-rw-r--r-- 1 root root 225032553 Jan  2 06:51 initrd0.img
-rw-r--r-- 1 root root     26743 Jan  2 06:51 pxelinux.0
drwxr-xr-x 2 root root        21 Jan  2 06:51 pxelinux.cfg
-r--r--r-- 1 root root   6635920 Jan  2 06:51 vmlinuz0



[root@syssat66 foreman-discovery-image]# cat tftpboot/pxelinux.cfg/default
DEFAULT pxeboot
TIMEOUT 20
PROMPT 0
LABEL pxeboot
	KERNEL vmlinuz0
	APPEND rootflags=loop initrd=initrd0.img root=live:/foreman-discovery-image-3.5.4-6.iso rootfstype=auto ro rd.live.image acpi=force rd.luks=0 rd.md=0 rd.dm=0 nomodeset nomodeset fdi.defaultoptions
ONERROR LOCALBOOT 0


[root@syssat66 foreman-discovery-image]# grep live /var/lib/tftpboot/pxelinux.cfg/default 
  APPEND initrd=boot/fdi-image/initrd0.img rootflags=loop root=live:/fdi.iso rootfstype=auto ro rd.live.image acpi=force rd.luks=0 rd.md=0 rd.dm=0 rd.lvm=0 rd.bootif=0 rd.neednet=0 nokaslr nomodeset proxy.url=https://syssat66.gsslab.pnq2.redhat.com proxy.type=foreman




Actual results:

Getting "root=live:/foreman-discovery-image-3.5.4-6.iso" in APPEND line which means the initrd was packed with that live image.
~~~~~~~~~~~~~~~~~~~~~~~~
[root@syssat66 foreman-discovery-image]# cat tftpboot/pxelinux.cfg/default
DEFAULT pxeboot
TIMEOUT 20
PROMPT 0
LABEL pxeboot
	KERNEL vmlinuz0
	APPEND rootflags=loop initrd=initrd0.img root=live:/foreman-discovery-image-3.5.4-6.iso rootfstype=auto ro rd.live.image acpi=force rd.luks=0 rd.md=0 rd.dm=0 nomodeset nomodeset fdi.defaultoptions
ONERROR LOCALBOOT 0
~~~~~~~~~~~~~~~~~~~~~~~~


Expected results:

It should pack the initrd file with live image names fdi.iso and the same should reflect in the "tftpboot/pxelinux.cfg/default" file.



Additional info:


If someone attempts to extract the vmlinuz and initrd from any foreman-discovery-image-XX.iso and just place them inside "/var/lib/tftpboot/boot/fdi-image/" , It will fail with below error.

[    2.778722] localhost dracut-initqueue[474]: losetup: /fdi.iso: failed to set up loop device: No such file or directory

But if we modify the APPEND section of "/var/lib/tftpboot/pxelinux.cfg/default " to point to correct ISO name, it will work.


Attached the debug output of the command and it seems everywhere the ISO variable is being referred for the name of the image and that is being used while packing the initrd file.

Comment 3 Lukas Zapletal 2020-01-06 14:00:53 UTC
Good analysis, fixed in: https://github.com/theforeman/foreman-discovery-image/commit/e4eaff5568272ae599190c33f9fbb1179c5e38e6 for Satellite 6.8.

Comment 4 Sayan Das 2020-01-07 09:25:06 UTC
(In reply to Lukas Zapletal from comment #3)
> Good analysis, fixed in:
> https://github.com/theforeman/foreman-discovery-image/commit/
> e4eaff5568272ae599190c33f9fbb1179c5e38e6 for Satellite 6.8.

Thanks Lukas, for your prompt response on this one.

Comment 6 Roman Plevka 2020-09-30 14:29:03 UTC
FAILED QA
in sat6.8.0-17

Installed Packages
foreman-discovery-image.noarch 1:3.6.5-1.el7sat @Sat6-CI_Satellite_6_8_Composes_Satellite_6_8_RHEL7
probably a packaging bug, the patch is not present in /usr/bin/discovery-iso-to-pxe

Comment 7 Lukas Zapletal 2020-10-01 15:49:29 UTC
Looking into why this is not shipped, weird.

Comment 8 Lukas Zapletal 2020-10-02 12:50:10 UTC
This was a problem in our rel-eng process, the image we were testing was actually 3.5.4. We would like to respin FDI version 3.6.7 to fix this issue but full re-test is needed.

Comment 9 Mike McCune 2020-10-06 15:05:18 UTC
MODIFIED, available in brew:

https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=1340957

Comment 10 Roman Plevka 2020-10-13 14:36:23 UTC
VERIFIED
on sat6.8.0-19

Comment 13 errata-xmlrpc 2020-10-27 12:59:52 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 (Important: Satellite 6.8 release), 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-2020:4366


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