Bug 1660742
Summary: | Successful snapshot status returned by API although the snapshot creation got failed | ||
---|---|---|---|
Product: | Red Hat Enterprise Virtualization Manager | Reporter: | nijin ashok <nashok> |
Component: | ovirt-engine | Assignee: | Fred Rolland <frolland> |
Status: | CLOSED NOTABUG | QA Contact: | meital avital <mavital> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 4.2.7 | CC: | bzlotnik, dev-unix-virtualization, ebenahar, frolland, gauravjadhav.jadhav, gveitmic, max, mkalinin, rbarry, Rhev-m-bugs, tnisan |
Target Milestone: | ovirt-4.3.5 | Flags: | lsvaty:
testing_plan_complete-
|
Target Release: | 4.3.0 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-05-16 09:12:19 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: | |||
Bug Depends On: | |||
Bug Blocks: | 1660997 |
Description
nijin ashok
2018-12-19 06:25:17 UTC
The issue was observed while doing the backup using Commvault where the Commvault support provides the info that it's getting the success status when it queries the snapshot id although it failed in RHV. Sounds similar to bug 1660997, which was reported for upstream (In reply to Elad from comment #3) > Sounds similar to bug 1660997, which was reported for upstream I think this is different. In my case, the snapshot operation is marked as "failed" in the engine and is also getting cleaned up automatically. This bug has not been marked as blocker for oVirt 4.3.0. Since we are releasing it tomorrow, January 29th, this bug has been re-targeted to 4.3.1. Nijin, Can you please add engine and VDSM logs? (In reply to Eyal Shenitzky from comment #7) > Nijin, > Can you please add engine and VDSM logs? I don't have the same environment now. However, it was easy to reproduce. Could you please try at your end? Nijin hi, It seems that looking only at the status of the snapshot entry only is not enough. You could try one of the following: 1. Same as described, check the status of the snapshot but once the status is OK, check the 'snapshot_type'. - If it got back to 'ACTIVE', then it means that the operation failed. - If it is 'REGULAR' and the status is 'OK', then the operation is successful. 2. Add a correlation ID when creating the snapshot, and check that all jobs with this ID are finished without failures. This is the way it is implemented in oVirt system tests: - Add correlation ID: https://github.com/oVirt/ovirt-system-tests/blob/master/basic-suite-master/test-scenarios/004_basic_sanity.py#L363 - Search jobs with correlation ID: https://github.com/oVirt/ovirt-system-tests/blob/10d0662f1a34d0f1ac5e27b80ad7a79a5fda3779/basic-suite-master/test_utils/__init__.py#L211 I don't think that we plan to change the current logic of the snapshot statuses in the near future. Please tell me what you think about the above propositions. Thanks, Freddy (In reply to Fred Rolland from comment #9) > Nijin hi, > > It seems that looking only at the status of the snapshot entry only is not > enough. > > You could try one of the following: > > 1. Same as described, check the status of the snapshot but once the status > is OK, check the 'snapshot_type'. > - If it got back to 'ACTIVE', then it means that the operation failed. > - If it is 'REGULAR' and the status is 'OK', then the operation is > successful. > > 2. Add a correlation ID when creating the snapshot, and check that all jobs > with this ID are finished without failures. > This is the way it is implemented in oVirt system tests: > - Add correlation ID: > > https://github.com/oVirt/ovirt-system-tests/blob/master/basic-suite-master/ > test-scenarios/004_basic_sanity.py#L363 > - Search jobs with correlation ID: > > https://github.com/oVirt/ovirt-system-tests/blob/ > 10d0662f1a34d0f1ac5e27b80ad7a79a5fda3779/basic-suite-master/test_utils/ > __init__.py#L211 > > Thank you Fred. I have asked the customer to forward this feedback to Commvault team. Nijin, Can you please put this in a KCS as well? Thanks, Nijin! Should we close the bug now? Freddy, Can you please post the correct syntax for the XML request to create a snap using correlation id ? We tried the forms below and always receive a 400 from the API server. XML Req 1 : <snapshot> <description>My snapshot</description> <persist_memorystate>false</persist_memorystate> <query>correlation_id=test</query> </snapshot> XML Req 2 : <snapshot> <description>My snapshot</description> <persist_memorystate>false</persist_memorystate> <query><correlation_id>test</correlation_id></query> </snapshot> JSON Req ===> { "description" : "My snap2", "query": { "correlation_id": "test" } } Resp: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <fault> <detail>For correct usage, see: https://172.24.25.3/ovirt-engine/apidoc#services/snapshots/methods/add</detail> <reason>Request syntactically incorrect.</reason> </fault> Hi, You can pass the correlation_id as follows: POST /ovirt-engine/api/vms/{vm_id}/snapshots?correlation_id=097d3014-b5c4-4ab0-96d9-003f310a1b31 and to search for it you can use: GET /ovirt-engine/api/jobs?search=correlation_id%3D097d3014-b5c4-4ab0-96d9-003f310a1b31 *** Bug 1702188 has been marked as a duplicate of this bug. *** Nijin, Can we close the bug? Thanks Sure Fred. I think we can close it. |