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
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?
You're welcome to move it to vdsm if you like
After consulting with DanKen - moved this to VDSM.
Flagged to 2.3 - stretch goal.
(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
> If you say it should always finish within a certain amount of time (lets say 5
> 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...
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):
FYI, I've just taken in
vdsm_hooks: Add support for checkimages VDSM hook
by Jan Lieskovsky. It may be useful until such a feature is incorporated in oVirt.
Bug 998443 shows that sometimes the qemu-img is corrupted and possibly indicates we need such a utility still
I don't think we saw qcow corruptions in a while. closing. a hook is available (comment 16)