Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1809875 - rhv-image-discrepancies only compares images on the last DC
Summary: rhv-image-discrepancies only compares images on the last DC
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: rhv-log-collector-analyzer
Version: 4.3.8
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ovirt-4.4.0
: ---
Assignee: Germano Veit Michel
QA Contact: Qin Yuan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-04 05:00 UTC by Germano Veit Michel
Modified: 2020-08-04 13:22 UTC (History)
2 users (show)

Fixed In Version: rhv-log-collector-analyzer-1.0.0
Doc Type: Bug Fix
Doc Text:
Before this update, a problem in the per Data-Center loop collecting images information caused incomplete data for analysis for all but the last Data-Center collected. With this update, the information is properly collected for all Data-Centers, resolving the issue.
Clone Of:
Environment:
Last Closed: 2020-08-04 13:21:58 UTC
oVirt Team: Integration
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2020:3247 0 None None None 2020-08-04 13:22:36 UTC

Description Germano Veit Michel 2020-03-04 05:00:13 UTC
Description of problem:

3 Data-Centers, only the last one is analysed:

# rhv-image-discrepancies 
IT IS HIGHLY RECOMMENDED YOU RUN THIS WITH RED HAT SUPPORT INVOLVED
Do you want to continue? [y/N]
y
Using host rhevh5.rhev.gsslab.bne.redhat.com on DC 8922eadb-09a6-4a42-88ca-e6298e95b605 to run the storage check
Collecting dump from SD a22db68a-00e5-43e2-afd1-b42e5689629f...
Collecting dump from SD f50a1e6e-5b88-4d1d-ab44-0c0b2bb804f8...
Using host rhevh1.rhev.gsslab.bne.redhat.com on DC da42e5a5-f6f7-49b4-8256-2adf690ddf4c to run the storage check
Collecting dump from SD 43c67df7-2293-4756-9aa3-de09d67d7050...
Collecting dump from SD 51e44de8-2fc0-4e99-8860-6820ff023108...
Collecting dump from SD b434277c-1bc4-42db-a5b5-c8770e05a0bd...
Using host testhost01 on DC e0d7c6e5-b57d-48b8-95a8-f9ed7745da75 to run the storage check
Collecting dump from SD 83f76a58-5e6a-40de-8fb4-4f557bb80cb1...

 Checking storage domain 83f76a58-5e6a-40de-8fb4-4f557bb80cb1
	Looking for missing images...
	No missing images found
	Checking discrepancies between SD/DB attributes...
	No discrepancies found

Version-Release number of selected component (if applicable):
rhv-log-collector-analyzer-0.2.15-0.el7ev.noarch

How reproducible:
Always

Steps to Reproduce:
1. Run the run with more than 1 DC

Actual results:
Only last DC analyzed

Expected results:
All DCs analyzed

Additional info:

These loops in check_images() are not correct:

def check_dumps():
    conf = db.load_engine_credentials()
    with db.Database(conf["host"],
                     conf["port"],
                     conf["user"],
                     conf["password"],
                     conf["database"],
                     ) as d:
        result_set = d.execute(HOST_PER_DC)

        if len(result_set) == 0:
            print("No hosts in status UP found!")
            exit(1)

        storage_sds = {}
        for record in result_set:
            host = record["host_name"]
            sp_id = record["storage_pool_id"]
            print("Using host {} on DC {} to run the storage check".format(
                host, sp_id))
            sd_ids = [i["id"] for i in d.execute(SDS_PER_DC.format(storage_pool_id=sp_id))]
            storage_sds = collect_images_from_sd(host, sp_id, sd_ids)

        for sd in sd_ids:                                                 <--- sd_ids is overwritten for every iteration (per DC) of the loop above
            print("\n Checking storage domain {}".format(sd))
            db_images = [i for i in d.execute(DB_IMAGES.format(sd_id=sd))]
            report_missing_images(d, storage_sds[sd], db_images)
            report_image_discrepancies(d, storage_sds[sd], db_images)

Comment 3 Qin Yuan 2020-04-21 15:47:37 UTC
Verified with rhv-log-collector-analyzer-1.0.0-1.el8ev.noarch:

# rhv-image-discrepancies
IT IS HIGHLY RECOMMENDED YOU RUN THIS WITH RED HAT SUPPORT INVOLVED
Do you want to continue? [y/N]
y
Using host puma20.scl.lab.tlv.redhat.com on DC 0903f89a-e7ad-4a56-87d1-4f6a59f64d53 to run the storage check
Collecting dump from SD 41f36b04-5b56-407d-be9b-e7879879360d...
Collecting dump from SD 33c2b206-56be-46e0-ad57-1e2309ef7d0c...
Collecting dump from SD e88c43b8-ab0e-4e0b-a2bb-eabf09256c10...
Using host rose07.qa.lab.tlv.redhat.com on DC 340b615c-5c5a-4f80-9425-3e525e4bd9ec to run the storage check

 Checking storage domain 41f36b04-5b56-407d-be9b-e7879879360d
	Looking for missing images...
	No missing images found
	Checking discrepancies between SD/DB attributes...
	No discrepancies found

 Checking storage domain 33c2b206-56be-46e0-ad57-1e2309ef7d0c
	Looking for missing images...
	No missing images found
	Checking discrepancies between SD/DB attributes...
	No discrepancies found

 Checking storage domain e88c43b8-ab0e-4e0b-a2bb-eabf09256c10
	Looking for missing images...
	No missing images found
	Checking discrepancies between SD/DB attributes...
	No discrepancies found

Comment 6 errata-xmlrpc 2020-08-04 13:21:58 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 (Important: RHV Manager (ovirt-engine) 4.4 security, bug fix, and enhancement update), 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-2020:3247


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