Bug 2013696
| Summary: | [REST API] Incorrect disk snapshot returned for GET api/disks/xxx/disksnapshots/xxx request | ||
|---|---|---|---|
| Product: | [oVirt] ovirt-engine | Reporter: | Mark Kemel <mkemel> |
| Component: | RestAPI | Assignee: | Mark Kemel <mkemel> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Ilia Markelov <imarkelo> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 4.4.9.1 | CC: | ahadas, bugs, dfodor, michal.skrivanek, sfishbai |
| Target Milestone: | ovirt-4.5.1 | Flags: | pm-rhel:
ovirt-4.5?
|
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Fixed In Version: | ovirt-engine-4.5.1 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-06-23 05:54:58 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: | |||
any update/intention to fix? if not please close. Posted a PR https://github.com/oVirt/ovirt-engine/pull/283 Verified. Requested snapshots were returned as expected. Versions: engine-4.5.1-0.62.el8ev vdsm-4.50.1.1-1.el8ev.x86_64 This bugzilla is included in oVirt 4.5.1 release, published on June 22nd 2022. Since the problem described in this bug report should be resolved in oVirt 4.5.1 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report. |
Description of problem: On disks that have more than one snapshots, the REST API request ovirt-engine/api/disks/{diskid}/disksnapshots/{snapshotid} not necessarily return the requested disk snapshot. Version-Release number of selected component (if applicable): How reproducible: 100% Steps to Reproduce: 1. Create more than 1 snapshots for a disk 2. The request ovirt-engine/api/disks/{diskid}/disksnapshots?include_active returns all the snapshots of this disk, including Active VM snapshot 3. Request these snapshots one by one ovirt-engine/api/disks/{diskid}/disksnapshots/{snapshotid} Actual results: Only one of the snapshots is returned for any request with any {snapshotid} Expected results: The requested snapshot should be returned Additional info: The bug is in BackendDiskSnapshotResource::get. GetAllDiskSnapshots query is used, which returns all the disk snapshots. Need to use another query that will return the single requested snapshot