Created attachment 1339728 [details] NullPointerException when trying to restore a snapshot with disks parameters on REST API Description of problem: When trying to restore a snapshot with disks parameters on REST API, the user gets NullPointerException. Version-Release number of selected component (if applicable): Reproduced for 4.2 version, although according to the code, was probably present before that. How reproducible: 100% Steps to Reproduce: 1. Using the REST API, run the following: Method: ------- POST URL: ---- https://xxxx.xxxx.xxxx.xxxx.com/ovirt-engine/api/vms/<VM_ID>/snapshots/<SNAPSHOT_ID>/restore Body: ----- <action> <disks> <disk id = "DISK_GUID"></disk> </disks> </action> Actual results: NullPointerException Expected results: The snapshot's restore should be performed. Additional info: See attached screenshot.
Can you attach the logs too pleaes?
Created attachment 1340000 [details] engine.log
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/snapshots/967d52c6-0aab-4947-8550-e586e541dfe2/restore Content-Type application/xml Body <action> <disks> <disk id = "a2487ec9-53db-42d6-b112-687dd8ddd846"> <image_id>c5b95c67-5713-4a93-8963-987dcdb70835</image_id> </disk> </disks> </action> Response <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <action> <async>false</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/3e9fd1ee-f3d5-44fb-a8c0-50c6c58903e9" id="3e9fd1ee-f3d5-44fb-a8c0-50c6c58903e9"/> <snapshot href="/ovirt-engine/api/vms/9f00362d-3712-44e5-b846-7e6298690ad7/snapshots/967d52c6-0aab-4947-8550-e586e541dfe2" id="967d52c6-0aab-4947-8550-e586e541dfe2"> <actions> <link href="/ovirt-engine/api/vms/9f00362d-3712-44e5-b846-7e6298690ad7/snapshots/967d52c6-0aab-4947-8550-e586e541dfe2/restore" rel="restore"/> </actions> <link href="/ovirt-engine/api/vms/9f00362d-3712-44e5-b846-7e6298690ad7/snapshots/967d52c6-0aab-4947-8550-e586e541dfe2/cdroms" rel="cdroms"/> <link href="/ovirt-engine/api/vms/9f00362d-3712-44e5-b846-7e6298690ad7/snapshots/967d52c6-0aab-4947-8550-e586e541dfe2/nics" rel="nics"/> <link href="/ovirt-engine/api/vms/9f00362d-3712-44e5-b846-7e6298690ad7/snapshots/967d52c6-0aab-4947-8550-e586e541dfe2/disks" rel="disks"/> <vm href="/ovirt-engine/api/vms/9f00362d-3712-44e5-b846-7e6298690ad7" id="9f00362d-3712-44e5-b846-7e6298690ad7"/> </snapshot> <status>complete</status> </action> The restore snapshot operation was successfull 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.