Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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 1371379

Summary: Fail to inspect ppc64le ISO file
Product: Red Hat Enterprise Linux 7 Reporter: Xianghua Chen <xchen>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 7.3CC: ptoscano, wshi
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-10-05 13:53:13 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:
Attachments:
Description Flags
log.inspect-os.x86_64
none
log.inspect-os.ppc64le none

Description Xianghua Chen 2016-08-30 06:13:59 UTC
Created attachment 1195620 [details]
log.inspect-os.x86_64

Description of problem:
Fail to inspect ppc64le ISO file no matter on ppc64le or x86_64 host.

Please refer to the detailed log with -v -x in the attachments.
log.inspect-os.ppc64le is the log on ppc64le host.
log.inspect-os.x86_64 is the log on x86_64 host.

Version-Release number of selected component (if applicable):
libguestfs-1.32.7-2.el7.x86_64
libguestfs-1.32.7-2.el7.ppc64le

How reproducible:
Always

Steps to Reproduce:
1. Prepare an ppc64le iso file:
RHEL-7.2-20151030.0-Server-ppc64le-dvd1.iso
2. Inspect the iso file
# guestfish --ro -a RHEL-7.2-20151030.0-Server-ppc64le-dvd1.iso run : inspect-os

Actual results:
No output.

Expected results:
Should print the result of inspect-os, like /dev/sda

Additional info:

Comment 1 Xianghua Chen 2016-08-30 06:14:43 UTC
Created attachment 1195621 [details]
log.inspect-os.ppc64le

Comment 2 Richard W.M. Jones 2016-08-30 11:09:42 UTC
The reason for this is strange.

We only bother to check for installers if the disk we are
given either is a filesystem on a whole device, or contains
only a single partition.  The code is:

  else if ((whole_device || (partnum == 1 && nr_partitions == 1)) &&
           .... some more tests ....)
    fs->is_root = 1;
    fs->format = OS_FORMAT_INSTALLER;
    if (guestfs_int_check_installer_root (g, fs) == -1)
      return -1;
  }

For this image, guestfs_int_check_installer_root is never called
because nr_partitions == 2.

The disk appears to contain only a single partition, according to
the Linux kernel.

However parted seems to think that the disk contains two partitions:

$ parted -m -s -- /mnt/media/installers/RHEL-7.1-20150219.1-Server-ppc64/RHEL-7.1-20150219.1-Server-ppc64-dvd1.iso unit b print 2>/dev/null
BYT;
/mnt/media/installers/RHEL-7.1-20150219.1-Server-ppc64/RHEL-7.1-20150219.1-Server-ppc64-dvd1.iso:3267020800B:file:512:512:mac::;
1:512B:1535B:1024B::Apple:;
2:8192B:3266713599B:3266705408B::RHEL-7.1 Server.ppc64:;

There's not a good workaround that I can think of at the moment.

Comment 3 Richard W.M. Jones 2017-10-05 13:53:13 UTC
Upstream we've removed the feature of inspecting install media.
It didn't work in many cases such as this one, and it's better
to use libosinfo (osinfo-detect) for this purpose.