Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 886133 (domain_scan) - PRD32 - [RFE] Add the ability to scan/import existing disk images in a storage domain using REST-API
Summary: PRD32 - [RFE] Add the ability to scan/import existing disk images in a storag...
Keywords:
Status: CLOSED ERRATA
Alias: domain_scan
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: RFEs
Version: 3.2.0
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
: 3.2.0
Assignee: Ayal Baron
QA Contact: Jakub Libosvar
URL: http://wiki.ovirt.org/Features/Domain...
Whiteboard: storage
Depends On:
Blocks: 948448
TreeView+ depends on / blocked
 
Reported: 2012-12-11 15:34 UTC by Chris Morrissey
Modified: 2015-09-22 13:09 UTC (History)
12 users (show)

Fixed In Version: sf11
Doc Type: Release Note
Doc Text:
The REST API can be used to check a storage domain for images that exist on it and are not saved to the Red Hat Enterprise Virtualization Manager's database. These disks images can be found by issuing the following GET request: http://<rhevm-engine>:8700/api/storagedomains/<storage domain id>/disks;unregistered These images can also be registered by issuing a POST request: http://<rhevm-engine>:8700/api/storagedomains/<storage domain id>/disks;unregistered <disk id="..."> <alias>myAlias</alias> </disk>
Clone Of:
Environment:
Last Closed: 2013-06-10 21:27:14 UTC
oVirt Team: ---
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1210498 None None None Never
Red Hat Product Errata RHSA-2013:0888 normal SHIPPED_LIVE Moderate: Red Hat Enterprise Virtualization Manager 3.2 update 2013-06-11 00:55:41 UTC
oVirt gerrit 11783 None None None Never

Internal Links: 1210498

Description Chris Morrissey 2012-12-11 15:34:30 UTC
Description of problem:
There is currently no way to import a disk that has been cloned outside of RHEV-M. We are working on a solution to provide access to utilize NetApp's rapid cloning capabilities and require the ability to import disks into REHV-M that we clone externally.

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

How reproducible:
This can be manually reproduced by copying an existing disk image into a new directory on the storage domain with a new UUID for the image and volumes contained inside. The metadata for the volume would then need to be updated to include the new UUID of the image containing it.

Steps to Reproduce:
1. Mount an existing NFS storage domain on a linux system and create a new directory under the images directory with a newly generated UUID for the name. You can generate a new UUID using the command "uuidgen".
2. Copy another volume including the meta data file to that new image directory.
3. Generate another new UUID and rename the volume file and meta file to the new UUID.
4. Open the <UUID>.meta file and update the UUID value for the IMAGE to be the new image UUID.
5. Log into RHEV-M and notice that the disk does not show up in the available disks.  

Actual results:
The new disk does not show up.

Expected results:
After running the new REST API, the disk will be available for use in RHEV-M.

Testing steps:
1. Perform steps 1 - 4 in the reproduction steps.
2. Execute the REST API with the URL: http://hostname:port/api/disks/scan/<storage domain UUID>
3. The storage domain will be scanned for new disks and they will be added to RHEV-M.
4. Log into the RHEV-M admin UI and verify the disks are now available for use.

Comment 2 Ayal Baron 2012-12-19 08:31:04 UTC
(In reply to comment #0)
> Description of problem:
> There is currently no way to import a disk that has been cloned outside of
> RHEV-M. We are working on a solution to provide access to utilize NetApp's
> rapid cloning capabilities and require the ability to import disks into
> REHV-M that we clone externally.
> 
> Version-Release number of selected component (if applicable):
> 3.2
> 
> How reproducible:
> This can be manually reproduced by copying an existing disk image into a new
> directory on the storage domain with a new UUID for the image and volumes
> contained inside. The metadata for the volume would then need to be updated
> to include the new UUID of the image containing it.
> 
> Steps to Reproduce:
> 1. Mount an existing NFS storage domain on a linux system and create a new
> directory under the images directory with a newly generated UUID for the
> name. You can generate a new UUID using the command "uuidgen".
> 2. Copy another volume including the meta data file to that new image
> directory.
> 3. Generate another new UUID and rename the volume file and meta file to the
> new UUID.
> 4. Open the <UUID>.meta file and update the UUID value for the IMAGE to be
> the new image UUID.
> 5. Log into RHEV-M and notice that the disk does not show up in the
> available disks.  
> 
> Actual results:
> The new disk does not show up.
> 
> Expected results:
> After running the new REST API, the disk will be available for use in RHEV-M.
> 
> Testing steps:
> 1. Perform steps 1 - 4 in the reproduction steps.
> 2. Execute the REST API with the URL:
> http://hostname:port/api/disks/scan/<storage domain UUID>
> 3. The storage domain will be scanned for new disks and they will be added
> to RHEV-M.

One small point about this, I would prefer the import of the disks into the system to be manual (i.e. scan should return a list and then you would need to specifically choose which disks you want to import as 'floating')

> 4. Log into the RHEV-M admin UI and verify the disks are now available for
> use.

Comment 5 Chris Morrissey 2013-01-10 17:52:31 UTC
The NetApp QA team will be testing this functionality in the context of NetApp controllers. This will include various positive and negative test scenarios.

Comment 8 James Rankin 2013-02-07 19:58:42 UTC
Chris, has the last patch needed for this been pushed yet? Thanks

Comment 9 Chris Morrissey 2013-02-07 20:32:12 UTC
James, The latest patch has been pushed for this. I'm working on updates based on initial reviews. Looks like minor change so far which is good.

Ayal, The latest patch has changed to split the scanning and registering into two separate API calls as you suggest. One call lists the available unregistered disks and the other will register a single disk at a time.

Here's a link to the associated patch: http://gerrit.ovirt.org/#/c/11783/

Comment 10 Ayal Baron 2013-02-08 06:39:43 UTC
(In reply to comment #9)
> James, The latest patch has been pushed for this. I'm working on updates
> based on initial reviews. Looks like minor change so far which is good.
> 
> Ayal, The latest patch has changed to split the scanning and registering
> into two separate API calls as you suggest. One call lists the available
> unregistered disks and the other will register a single disk at a time.
> 
> Here's a link to the associated patch: http://gerrit.ovirt.org/#/c/11783/

Comment 13 Jakub Libosvar 2013-04-22 10:26:30 UTC
Verified in rhevm-3.2.0-10.19.beta2.el6ev.noarch

Comment 14 errata-xmlrpc 2013-06-10 21:27:14 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, 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/RHSA-2013-0888.html


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