Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1092166

Summary: PRD35 - [RFE] Expose prepareImage and teardownImage commands in vdsClient
Product: Red Hat Enterprise Virtualization Manager Reporter: Federico Simoncelli <fsimonce>
Component: vdsmAssignee: Federico Simoncelli <fsimonce>
Status: CLOSED ERRATA QA Contact: Kevin Alon Goldblatt <kgoldbla>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.5.0CC: acanan, amureini, bazulay, dfediuck, ebenahar, fsimonce, gklein, iheim, lpeer, rjones, scohen, tdosek, tnisan, yeylon
Target Milestone: ---Keywords: FutureFeature
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: vt1.3, 4.16.0-1.el6_5 Doc Type: Enhancement
Doc Text:
Previously, it was impossible for a third-party tool to get access to VDSM images. It is now possible to prepare and teardown images (not in use by a virtual machine) in order to inspect the content.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-11 21:10:50 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:
Bug Depends On:    
Bug Blocks: 1036731, 1142923, 1153278, 1156165    

Description Federico Simoncelli 2014-04-28 21:37:13 UTC
Description of problem:
At the moment we are lacking of an easy tool to activate an image chain on block domains (including the required symlinks for the backing files to work).

This could also simplify the integration with third party tools that are relying on libguestfs.

It should be simple enough to expose the current prepareImage and teardownImage commands in vdsClient.

In the long run the preferred way to integrate would be through the image fleecing API.

Comment 2 Itamar Heim 2014-04-29 05:47:39 UTC
what's the level of concern of an LV chain active across multiple hosts? behavior when a host sees an already active LV?
level of effort to do this?

an HSM verb i assume?

Comment 3 Federico Simoncelli 2014-04-29 21:21:11 UTC
(In reply to Itamar Heim from comment #2)
> what's the level of concern of an LV chain active across multiple hosts?

There's no problem in activating the same chain on multiple hosts (as long as there's no concurrent access to the content).

Things that are problematic:

- read the content of the active layer if the vm is up (inconsistent) or writing data in the backing volumes corrupting the chain (these are not specific to lvm, they're true for file domains as well)
- if the volume chain is left active (no teardown) and a cold merge takes place on another host then at least one of the old active volumes may be using wrong segments (possible corruption if the vm is then started on this host)

> behavior when a host sees an already active LV?

Partially answered above. We have to clearly state that teardownImage must be issued. Anyway if there was no cold merge executed on another host then we're ok.

Anyway all this mumbo-jumbo related to teardownImage can be finally resolved if we issue an lvrefresh in case the lv is already active (food for another rfe).

> level of effort to do this?

Low, just expose the verbs in the xml-rpc bindings and in vdsClient.

> an HSM verb i assume?

Yes, but they already exist... we just need to expose them.

Comment 6 Jiri Moskovcak 2014-06-05 14:07:12 UTC
Works for my use case described in #1104672. Thanks!

Comment 11 Allon Mureinik 2014-06-26 17:59:51 UTC
Yeela, these patches are included in v4.16.0. Can you please explain why you returned this BZ to MODIFIED?

Comment 14 Kevin Alon Goldblatt 2014-06-30 13:43:13 UTC
Added External Tracker to Test Plan 6099

Comment 15 Kevin Alon Goldblatt 2014-07-03 11:10:13 UTC
Completed Test Plan
Added External Tracker
Added "Done" to QA Whiteboard

Comment 16 Elad 2014-08-21 11:59:58 UTC
TCMS plan was executed:
https://tcms.engineering.redhat.com/run/163705/

2 bugs were filed:
https://bugzilla.redhat.com/show_bug.cgi?id=1131160
https://bugzilla.redhat.com/show_bug.cgi?id=1130995

Verified using ovirt-3.5 RC1

Comment 18 Allon Mureinik 2014-11-10 14:54:50 UTC
Fede, can you provide some doctext here please?

Comment 20 errata-xmlrpc 2015-02-11 21:10:50 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.

https://rhn.redhat.com/errata/RHBA-2015-0159.html