Bug 965495 - New APIs required in libguestfs for virt-v2v in RHEL 6.5
New APIs required in libguestfs for virt-v2v in RHEL 6.5
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libguestfs (Show other bugs)
6.5
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Pino Toscano
Virtualization Bugs
:
Depends On: 958183 1015157
Blocks: 1023565 965501 1012805
  Show dependency treegraph
 
Reported: 2013-05-21 06:05 EDT by Richard W.M. Jones
Modified: 2014-10-14 02:34 EDT (History)
7 users (show)

See Also:
Fixed In Version: libguestfs-1.20.11-7.el6
Doc Type: Bug Fix
Doc Text:
Cause: gdisk was not available as dependency for libguestfs. Consequence: The gdisk feature was not available, and thus the two APIs guestfs_part_get_gpt_type and guestfs_part_set_gpt_type were not usable. Fix: Add gdisk as dependency. Result: The gdisk feature is available, and the two APIs guestfs_part_get_gpt_type and guestfs_part_set_gpt_type are usable.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-10-14 02:34:44 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Richard W.M. Jones 2013-05-21 06:05:58 EDT
Description of problem:

libguestfs is being rebased in RHEL 6.5 (bug 958183) in order
to support the new version of virt-v2v (bug ?).  As well as
the rebase, some newer APIs will have to be backported.  It
appears only these are required:

 guestfs_part_get_gpt_type (added in 1.21.1)
 guestfs_part_set_gpt_type (added in 1.21.1)

Matt: Please add any further APIs to this bug.

Version-Release number of selected component (if applicable):

libguestfs 1.20.6
Comment 1 Richard W.M. Jones 2013-05-30 15:35:40 EDT
http://brewweb.devel.redhat.com/brew/taskinfo?taskID=5845372
Comment 9 bfan 2013-09-17 02:28:44 EDT
Verified with libguestfs-1.20.11-1.el6.x86_64

><fs> help part-get-gpt-type 
NAME
    part-get-gpt-type - get the type GUID of a GPT partition

SYNOPSIS
     part-get-gpt-type device partnum

DESCRIPTION
    Return the type GUID of numbered GPT partition "partnum". For MBR
    partitions, return an appropriate GUID corresponding to the MBR type.
    Behaviour is undefined for other partition types.

><fs> help part-set-gpt-type
NAME
    part-set-gpt-type - set the type GUID of a GPT partition

SYNOPSIS
     part-set-gpt-type device partnum guid

DESCRIPTION
    Set the type GUID of numbered GPT partition "partnum" to "guid". Return
    an error if the partition table of "device" isn't GPT, or if "guid" is
    not a valid GUID.

    See
    <http://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_type_GUIDs>
    for a useful list of type GUIDs.

New APIS add, and work, so change the status to verified
Comment 10 Richard W.M. Jones 2013-10-01 09:17:25 EDT
I'm afraid comment 9 doesn't count as verification.  tzheng
discovered (bug 1012805) that although the APIs exist, they
don't work because gdisk isn't included in RHEL 6.5.

It's fairly easy to demonstrate this:

$ guestfish -N part:1G:gpt part-get-gpt-type /dev/sda 1
libguestfs: error: part_get_gpt_type: feature 'gdisk' is not available in this
build of libguestfs.  Read 'AVAILABILITY' in the guestfs(3) man page for
how to check for the availability of features.

or:

$ guestfish -N part:1G:gpt part-set-gpt-type /dev/sda 1 0FC63DAF-8483-4772-8E79-3D69D8477DE4
libguestfs: error: part_set_gpt_type: feature 'gdisk' is not available in this
build of libguestfs.  Read 'AVAILABILITY' in the guestfs(3) man page for
how to check for the availability of features.
Comment 11 Richard W.M. Jones 2013-10-04 13:41:08 EDT
We decided (sensibly IMHO) to push this bug out to 6.6.
Comment 12 Richard W.M. Jones 2013-10-04 13:42:44 EDT
BTW I'm setting QA flag back to ? because I believe the QA
test for this to be wrong.  See comment 10.
Comment 16 bfan 2014-07-02 01:37:22 EDT
Verified with libguestfs-1.20.11-8.el6.x86_64

# guestfish -N fs part-disk /dev/sda gpt : part-get-gpt-type /dev/sda 1 : part-set-gpt-type /dev/sda 1 EBD0A0A2-B9E5-4433-87C0-68B6B72699C0 : part-get-gpt-type /dev/sda 1

EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
EBD0A0A2-B9E5-4433-87C0-68B6B72699C0

The API works.
Comment 17 errata-xmlrpc 2014-10-14 02:34:44 EDT
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.

http://rhn.redhat.com/errata/RHBA-2014-1458.html

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