Bug 583921

Summary: virt-inspector dies without user-friendly message when RPM database in guest is corrupt
Product: [Fedora] Fedora Reporter: Marek Goldmann <mgoldman>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: mbooth, rjones, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-05-19 13:11:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Marek Goldmann 2010-04-20 08:57:01 UTC
Description of problem:

After running virt-inspector for image with broken RPM database it crashes without user friendly info.

[oddthesis@lolek-f12 vmware]$ virt-inspector jeos-centos.raw
open /dev/kvm: No such file or directory
Could not initialize KVM, will disable KVM support
command_lines: at /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi/Sys/Guestfs/Lib.pm line 1438.

Version-Release number of selected component (if applicable):
libguestfs-1.0.85-1.fc12.3.i686

How reproducible:
Always with an image with bad RPM database.

Steps to Reproduce:
1.
2.
3.
  
Actual results:
Crash.

Expected results:
Message and exit or working without getting the list of packages.

Additional info:

Comment 1 Richard W.M. Jones 2010-04-20 09:18:00 UTC
This is quite an old version of libguestfs.  Does it still happen
with version 1.2.2 or 1.2.3?

Comment 2 Richard W.M. Jones 2010-05-18 14:51:52 UTC
I confirmed with Marek on IRC that this is still an issue with
recent versions of libguestfs.

Comment 3 Richard W.M. Jones 2010-05-19 13:11:22 UTC
I was unable to reproduce this with libguestfs 1.3.13.  I
deliberately corrupted the RPM database in a copy of a
guest, then ran virt-inspector against that guest.
virt-inspector ran fine, just leaving the 'Applications'
section of the output empty.

I suspect the following commit is what fixed this:
http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=39416cdb

Therefore I am closing this.  Please reopen if you can reproduce
this bug with a recent version of libguestfs.