Bug 611183 - [RFE] Run qemu-img check before/post image operations
[RFE] Run qemu-img check before/post image operations
Status: CLOSED WONTFIX
Product: oVirt
Classification: Community
Component: vdsm (Show other bugs)
unspecified
All Linux
low Severity medium
: ---
: 3.3.4
Assigned To: Allon Mureinik
Aharon Canan
storage
: EasyFix, FutureFeature, Improvement
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-04 02:56 EDT by Dor Laor
Modified: 2015-01-24 05:29 EST (History)
13 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-08-04 04:54:09 EDT
Type: ---
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 Dor Laor 2010-07-04 02:56:44 EDT
Description of problem:
Since there is a potential of corruptions due to various storage issues, qcow2 bugs, live migration, etc we need to test the qcow2 images for correctness.

The test itself is relateively fast. It needs to be do done at least when image operations are taken place. It would even nice to have to do it every time a guest is booted. This is pending of a test to see how much time is added. Internal testing revealed is it pretty fast.

+ * Checks an image for consistency. Exit codes:
+ *
+ * 0 - Check completed, image is good
+ * 1 - Check not completed because of internal errors
+ * 2 - Check completed, image is corrupted
+ * 3 - Check completed, image has leaked clusters, but is good otherwise
Comment 1 Itamar Heim 2010-07-04 03:12:20 EDT
I would understand doing this in backend for a specific check if user asks for it.
but if we want this implicitly done, why not just have VDSM perform it and fail actions on integrity errors?
Comment 2 Dor Laor 2010-07-04 04:04:52 EDT
You're welcome to move it to vdsm if you like
Comment 3 Miki Kenneth 2010-07-26 04:30:10 EDT
After consulting with DanKen - moved this to VDSM.
Flagged to 2.3 - stretch goal.
Comment 11 Itamar Heim 2010-07-27 10:47:18 EDT
(In reply to comment #8)
> This is really easy to do on our side, but the question is how much time it
> adds to VM startup because this could have an adverse affect on the user
> experience.
> If you say it should always finish within a certain amount of time (lets say 5
> sec
> tops) then we could just kill the process and log that it took >5 sec and then
> allow to run the VM (or not, depending on what you suggest).
> Miki, what do you think?
> 
> Kevin, what about a 2TB disk? worst case scenario?    

the default max disk size in 2.2 is 16TB, so let's check for a pre-allocated
16TB disk somehow please:
1. let's make sure it is a reasonable time.
2. maybe make the timeout relative to image size...
Comment 14 Federico Simoncelli 2012-04-13 11:08:52 EDT
The qemu-img check will probably be included in the validateImage command (and exposed in some way internally as a Volume method so that it could be used in other flows too):

http://gerrit.ovirt.org/3491
Comment 16 Dan Kenigsberg 2013-03-14 05:30:13 EDT
FYI, I've just taken in 

  http://gerrit.ovirt.org/9154
  vdsm_hooks: Add support for checkimages VDSM hook

by Jan Lieskovsky. It may be useful until such a feature is incorporated in oVirt.
Comment 17 Ayal Baron 2013-09-26 13:44:26 EDT
Bug 998443 shows that sometimes the qemu-img is corrupted and possibly indicates we need such a utility still
Comment 19 Itamar Heim 2014-08-04 04:54:09 EDT
I don't think we saw qcow corruptions in a while. closing. a hook is available (comment 16)

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