Bug 1371379 - Fail to inspect ppc64le ISO file
Summary: Fail to inspect ppc64le ISO file
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.3
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-30 06:13 UTC by Xianghua Chen
Modified: 2017-10-05 13:53 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-10-05 13:53:13 UTC
Target Upstream Version:


Attachments (Terms of Use)
log.inspect-os.x86_64 (63.91 KB, text/plain)
2016-08-30 06:14 UTC, Xianghua Chen
no flags Details
log.inspect-os.ppc64le (70.24 KB, text/plain)
2016-08-30 06:14 UTC, Xianghua Chen
no flags Details

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.


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