Bug 1873382
Summary: | [RFE] Provide a way to identify volume chains that have snapshots in preview | ||
---|---|---|---|
Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Germano Veit Michel <gveitmic> |
Component: | vdsm | Assignee: | Arik <ahadas> |
Status: | CLOSED DEFERRED | QA Contact: | Avihai <aefrat> |
Severity: | low | Docs Contact: | |
Priority: | unspecified | ||
Version: | 4.4.1 | CC: | ahadas, lsurette, michal.skrivanek, srevivo, tnisan, ycui |
Target Milestone: | --- | Keywords: | FutureFeature, Reopened, ZStream |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2022-04-20 11:43:38 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | Storage | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Germano Veit Michel
2020-08-28 05:31:48 UTC
I came up with this, but its overly complicated as the only way is to try to guess if the problematic chain is in preview or not. def _is_chain_in_preview(volumes_children, volumes_type): # a duplicate parent in chain could mean a snapshot in preview # a snapshot in preview has the following properties: # - chain contains 2 leaves in total # - exactly 2 volumes pointing to the same unique parent # - at least 1 volume pointing to the duplicate parent is leaf voltype_count = Counter(volumes_type.values()) if voltype_count['LEAF'] != 2: return False parent_count = Counter(map(itemgetter(0), volumes_children)) parent_count = dict(filter(lambda count: count[1] > 1, parent_count.items())) if sum(count for count in parent_count.values()) > 2: return False parent = next(iter(parent_count)) children = [child for volume, child in volumes_children if volume == parent] if all(volumes_type[volume] != 'LEAF' for volume in children): return False return True After discussions on ovirt devel list we found there is no reliable way to determine if the chain has a snapshot in preview based only on storage metadata. All the changes required to make this happen are not worth it and maybe even risky. I'll suggest a patch to change the text of DuplicateParentError to warn the user it could be a preview. Re-opening after more discussions :) On ovirt-devel list: [storage] how to find if a snapshot is in preview based on storage domain metadata only? We are past 4.5.0 feature freeze, please re-target. |