Bug 1903385

Summary: RFE: rhv-image-discrepancies should report if the truesize from VDSM has different size in images in the engine.
Product: Red Hat Enterprise Virtualization Manager Reporter: Bimal Chollera <bcholler>
Component: rhv-log-collector-analyzerAssignee: Germano Veit Michel <gveitmic>
Status: CLOSED ERRATA QA Contact: Guilherme Santos <gdeolive>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.4.3CC: gdeolive, gveitmic, pelauter
Target Milestone: ovirt-4.4.4Keywords: FieldEngineering, FutureFeature
Target Release: 4.4.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rhv-log-collector-analyzer-1.0.6 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-02 13:57:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Bimal Chollera 2020-12-01 23:45:59 UTC
Description of problem:

rhv-image-discrepancies should report if the truesize from VDSM has different size in images in the engine.

-	Image is size 3221225472 per the image table in the engine.

~~~
-[ RECORD 1 ]---------+-------------------------------------
image_guid            | 8abc8dd3-8ca9-4593-87e1-03dc3d4e4ab2
creation_date         | 2020-12-01 22:53:10+00
size                  | 3221225472  <<=================================
volume_type           | 2
volume_format         | 4
~~~

-	vdsm-tool dump-volume-chains 1810c39d-bd04-4ca9-867d-c0a31a0cda26 shows the truesize as 5368709120

~~~
   image:    678ba61d-ef4d-4465-a36b-97de7c086e7d

             - 8abc8dd3-8ca9-4593-87e1-03dc3d4e4ab2
               status: OK, voltype: LEAF, format: COW, legality: LEGAL, type: SPARSE, capacity: 3221225472, truesize: 5368709120
~~~


The lvm lvs shows the size as 5gb.

~~~
8abc8dd3-8ca9-4593-87e1-03dc3d4e4ab2 1810c39d-bd04-4ca9-867d-c0a31a0cda26 -wi-ao----    5.00g  IU_678ba61d-ef4d-4465-a36b-97de7c086e7d,MD_29,PU_00000000-0000-0000-0000-000000000000           
~~~


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

4.4.3

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:

rhv-image-discrepancies doesn't report this information.

Expected results:

rhv-image-discrepancies should report this information.


Additional info:

Comment 4 Guilherme Santos 2021-01-07 00:22:36 UTC
Verified on:
rhv-log-collector-analyzer-1.0.6-1.el8ev.noarch

Steps:
1. uploaded an image as disk on UI
# vdsm-tool dump-volume-chains e110ae75-a607-4e19-af2f-dcba4fe40536
~~~
   image:    c4269250-942f-471a-85c4-b28eeb9078d1

             - 27ba6f55-3b78-4182-bbf4-f57e7705d28b
               status: OK, voltype: LEAF, format: RAW, legality: LEGAL, type: SPARSE, capacity: 663552, truesize: 671744
~~~

2. created a fake file with bigger size overwriting the uploaded image mounted on the host
# fallocate -x -l 2G /rhev/data-center/mnt/<nfs_mounted_domain>/e110ae75-a607-4e19-af2f-dcba4fe40536/images/c4269250-942f-471a-85c4-b28eeb9078d1/27ba6f55-3b78-4182-bbf4-f57e7705d28b
3. on engine run rhv-image-discrepancies 
# rhv-image-discrepancies 
~~~
 Checking storage domain e110ae75-a607-4e19-af2f-dcba4fe40536
         Image 27ba6f55-3b78-4182-bbf4-f57e7705d28b size on the storage(2148540416) is larger than the capacity(663552)
~~~

Results:
rhv-image-discrepancies properly reporting image with bigger storage than truesize

Comment 8 errata-xmlrpc 2021-02-02 13:57:12 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 (Low: RHV-M(ovirt-engine) 4.4.z security, bug fix, enhancement update [ovirt-4.4.4]), 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://access.redhat.com/errata/RHSA-2021:0381