Bug 1537119
Summary: | When trying to preview a snapshot of a VM using REST-API, and supplying a list of disks, operation fails with NPE | ||||||
---|---|---|---|---|---|---|---|
Product: | [oVirt] ovirt-engine | Reporter: | Natalie Gavrielov <ngavrilo> | ||||
Component: | Backend.Core | Assignee: | shani <sleviim> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Kevin Alon Goldblatt <kgoldbla> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 4.1.9 | CC: | amureini, bugs, ebenahar, lveyde, ngavrilo, ratamir, sleviim, tnisan, ylavi | ||||
Target Milestone: | ovirt-4.2.2 | Keywords: | Regression | ||||
Target Release: | --- | Flags: | rule-engine:
ovirt-4.2+
rule-engine: blocker+ |
||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | ovirt-engine-4.2.2.4 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2018-04-05 09:39:24 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: | |||||||
Attachments: |
|
Description
Natalie Gavrielov
2018-01-22 13:20:14 UTC
Shani, I have a vague recollection that you worked on something like this a couple of month ago, although I can't see any trace of it in the engine's git (perhaps you worked on this and ultimately decided to push this out of 4.2?). Can you please take a look? Tentative targetting to 4.2.2. If we see this is too risky I think we can safely push this out to 4.3, considering the fact that this bug occurs even in 4.1 - assuming this isn't a regression from an earlier 4.1 z-stream. Natalie - is this part of the automation, or a manual test? What's the last version this flow worked properly (if at all)? (In reply to Allon Mureinik from comment #1) > Shani, I have a vague recollection that you worked on something like this a > couple of month ago, although I can't see any trace of it in the engine's > git (perhaps you worked on this and ultimately decided to push this out of > 4.2?). > > Can you please take a look? > > Tentative targetting to 4.2.2. > If we see this is too risky I think we can safely push this out to 4.3, > considering the fact that this bug occurs even in 4.1 - assuming this isn't > a regression from an earlier 4.1 z-stream. > Natalie - is this part of the automation, or a manual test? What's the last > version this flow worked properly (if at all)? I've open this [1] bug a couple of months ago. It's not the exact same scenario, but it seems to be related. I haven't tried to solve it yet (just opened the bug so we would be able to track it) [1] https://bugzilla.redhat.com/show_bug.cgi?id=1503172 (In reply to Allon Mureinik from comment #1) > Natalie - is this part of the automation, or a manual test? What's the last > version this flow worked properly (if at all)? This was tested manually, we have automated tests that are performing custom snapshot preview - but AFAIK, they all work fine because the *tests specify the snapshot to preview for a disk*, like this: Method: POST URL: https://ovirt-engine-url/ovirt-engine/api/vms/vm-id/previewsnapshot Body: <action> <async>false</async> <disks> <disk id="disk_id"> <image_id>image_id</image_id> <snapshot id="snapshot_id"/> <-- It works when specifing the snapshot </disk> </disks> <restore_memory>false</restore_memory> <snapshot id="snapshot_id"/> </action> So, the problem was that I didn't specify a snapshot-id to preview for a disk (another problem is the documentation about it but that's a whole nother story..) My guess is no one ever tried it that way.. Shani, The issue you opened looks almost the same to me, only differences I see is, you were using /restore and I used /previewsnapshot and the ovirt versions this issue addresses 4.1.9 and Bug 1503172 is for 4.2. If you want you can close it as dup. This bug report has Keywords: Regression or TestBlocker. Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP. Not all patches are merged yet, returning to POST. The patch wasn't included in 4.2.2-0.1 moving to modified. Moving back to "assigned", due to some code changes I should do and will affect this bug. Verified with the following code: ---------------------------------------- ovirt-engine-4.2.2.6-0.1.el7.noarch vdsm-4.20.23-1.el7ev.x86_64 Verified with the following scenario: ---------------------------------------- Method POST Url https://storage-ge-10.scl.lab.tlv.redhat.com/ovirt-engine/api/vms/9f00362d-3712-44e5-b846-7e6298690ad7/previewsnapshot Content-Type application/xml Body <action> <async>true</async> <disks> <disk id="a2487ec9-53db-42d6-b112-687dd8ddd846"> <image_id>c5b95c67-5713-4a93-8963-987dcdb70835</image_id> </disk> </disks> <restore_memory>false</restore_memory> <snapshot id="967d52c6-0aab-4947-8550-e586e541dfe2"/> <vm id="9f00362d-3712-44e5-b846-7e6298690ad7"/> </action> Response <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <action href="/ovirt-engine/api/vms/9f00362d-3712-44e5-b846-7e6298690ad7/previewsnapshot/2b67ee45-85c5-455a-84b7-269cacbbd30f" id="2b67ee45-85c5-455a-84b7-269cacbbd30f"> <link href="/ovirt-engine/api/vms/9f00362d-3712-44e5-b846-7e6298690ad7" rel="parent"/> <link href="/ovirt-engine/api/vms/9f00362d-3712-44e5-b846-7e6298690ad7/previewsnapshot" rel="replay"/> <async>true</async> <disks> <disk id="a2487ec9-53db-42d6-b112-687dd8ddd846"> <image_id>c5b95c67-5713-4a93-8963-987dcdb70835</image_id> </disk> </disks> <job href="/ovirt-engine/api/jobs/65d76c62-c48f-480e-9eb3-c4d0e1dba7c7" id="65d76c62-c48f-480e-9eb3-c4d0e1dba7c7"/> <restore_memory>false</restore_memory> <snapshot id="967d52c6-0aab-4947-8550-e586e541dfe2"/> <status>pending</status> <vm id="9f00362d-3712-44e5-b846-7e6298690ad7"/> </action> Moving to VERIFIED This bugzilla is included in oVirt 4.2.2 release, published on March 28th 2018. Since the problem described in this bug report should be resolved in oVirt 4.2.2 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. |