Bug 2006542
| Summary: | rhv-image-discrepancies reports VM templates as LEAF in the DB. | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Bimal Chollera <bcholler> |
| Component: | rhv-log-collector-analyzer | Assignee: | Germano Veit Michel <gveitmic> |
| Status: | CLOSED DUPLICATE | QA Contact: | meital avital <mavital> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 4.4.7 | CC: | gveitmic |
| Target Milestone: | ovirt-4.4.9 | Keywords: | FieldEngineering, Unconfirmed |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-09-22 21:13:06 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
2021-09-21 20:10:35 UTC
This is not too different from the problem in BZ1873382, there is no direct equivalent in the DB so we need to make assumptions, I'll add some code to handle this case as well. Bimal, actually I think I've already fixed this one, what rhv-log-collector-analyzer version was this?
$ git show 7c6da6a2dd27a919fbe816d7fb1a06edcfe56249
commit 7c6da6a2dd27a919fbe816d7fb1a06edcfe56249
Author: Germano Veit Michel <germano>
Date: Mon May 10 15:33:19 2021 +1000
rhv-image-discrepancies: templates use shared type
Images used by templates have LEAF type on the DB
but SHARED on the storage. This changes the SQL on
the DB side to produce a SHARED output if the LEAF
image is part of a disk attached to a template.
Bug-Url: https://bugzilla.redhat.com/1955582
Signed-off-by: Germano Veit Michel <germano>
Change-Id: Iad9555b4fbcd7f6f6c60ca48f9d04efeea1e113f
diff --git a/src/live/tools/rhv-image-discrepancies b/src/live/tools/rhv-image-discrepancies
index d588caa..b52c6da 100755
--- a/src/live/tools/rhv-image-discrepancies
+++ b/src/live/tools/rhv-image-discrepancies
@@ -47,11 +47,15 @@ DB_IMAGES = ("SELECT image_id, parentid, size, active, image_group_id, "
" WHEN '2' THEN 'SPARSE' "
"END as volume_type, "
"CASE "
- " WHEN i.active = 't' THEN 'LEAF' "
" WHEN i.parentid IN ("
" SELECT image_guid FROM snapshots s "
" INNER JOIN images i ON i.vm_snapshot_id = s.snapshot_id "
" WHERE s.status = 'IN_PREVIEW') THEN 'LEAF' "
+ " WHEN i.image_guid IN ("
+ " SELECT image_guid FROM images i "
+ " JOIN vms_for_disk_view v ON i.image_group_id = v.device_id "
+ " WHERE entity_type = 'TEMPLATE') THEN 'SHARED' "
+ " WHEN i.active = 't' THEN 'LEAF' "
" ELSE 'INTERNAL' "
"END AS active "
"FROM images i "
$ git tag --contains 7c6da6a2dd27a919fbe816d7fb1a06edcfe56249 rhv-log-collector-analyzer-1.0.10 rhv-log-collector-analyzer-1.0.11 rhv-log-collector-analyzer-1.0.9 1.0.10 was shipped 2 months ago: https://access.redhat.com/errata/RHSA-2021:2865 Germano, The version is rhv-log-collector-analyzer-1.0.8-1.el8ev.noarch. You are correct, it is fixed in the rhv-log-collector-analyzer-1.0.10-1.el8ev.noarch. Sorry for this and I guess we can close it out. Thanks Bimal. All good! *** This bug has been marked as a duplicate of bug 1955582 *** |