Bug 1660902 - REST/SDK create VM snapshot with the same image id as an existing image id in that VM -> Engine Error Image IDs ${ImageId} appear
Summary: REST/SDK create VM snapshot with the same image id as an existing image id in...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.3.1
: ---
Assignee: shani
QA Contact: Avihai
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-19 15:03 UTC by Avihai
Modified: 2019-05-30 14:47 UTC (History)
2 users (show)

Fixed In Version: ovirt-engine-4.3.1.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-03-13 16:39:33 UTC
oVirt Team: Storage
Embargoed:
rule-engine: ovirt-4.3+


Attachments (Terms of Use)
engine log (730.52 KB, application/gzip)
2018-12-19 15:03 UTC, Avihai
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 97769 0 master MERGED webadmin: Change parameter from ImageId to ImageIds 2019-02-17 07:07:15 UTC

Description Avihai 2018-12-19 15:03:43 UTC
Created attachment 1515622 [details]
engine log

Description of problem:
REST/SDK create VM snapshot with the same image id as an existing image id in that VM ->  Engine Error Image IDs ${ImageId} appear:

I would expect instead of the ${ImageId} that a real value with the existing imageId will appear 

Engine log:
2018-12-19 16:39:14,628+02 WARN  [org.ovirt.engine.core.bll.snapshots.CreateSnapshotForVmCommand] (default task-66) [129f219f-3477-42d6-8fbc-0e4073eeb6c7] Validation of action 'CreateSnapshotForVm' failed for us
er admin@internal-authz. Reasons: VAR__ACTION__CREATE,VAR__TYPE__SNAPSHOT,ACTION_TYPE_FAILED_VM_SNAPSHOT_IMAGE_ALREADY_EXISTS,$ImageIds      5eb35e6f-af89-4379-ba76-6880a3d106f7,$ImageIds_COUNTER 1
2018-12-19 16:39:14,630+02 INFO  [org.ovirt.engine.core.bll.snapshots.CreateSnapshotForVmCommand] (default task-66) [129f219f-3477-42d6-8fbc-0e4073eeb6c7] Lock freed to object 'EngineLock:{exclusiveLocks='[cbdc5
9db-9b4e-45c7-b2b4-276b9968773a=VM]', sharedLocks=''}'
2018-12-19 16:39:14,642+02 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (default task-66) [] Operation Failed: [Cannot create Snapshot. Image IDs ${ImageId} are already used by a snapsho
t.]


Version-Release number of selected component (if applicable):
4.3.0-0.4.master.20181217152209.git3c9ccc7.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1.Create VM + disk and snapshot
2.Try via SDK/REST to create a new snapshot with the same imageID

I used the following Resquest:

< POST /ovirt-engine/api/vms/cbdc59db-9b4e-45c7-b2b4-276b9968773a/snapshots HTTP/1.1
< Host: storage-ge-08.scl.lab.tlv.redhat.com
< User-Agent: PythonSDK/4.2.9
< Version: 4
< Content-Type: application/xml
< Accept: application/xml
< Authorization: Bearer 5Cq9kxY7DbxXv4QUeVYIxVP0HZlI2wB4oh_m-
< Content-Length: 285
< <snapshot>
<   <description>Snapshot0</description>
<   <disk_attachments>
<     <disk_attachment>
<disk id="c79759e8-4f62-497c-8f8a-c34611a742db">
<         <image_id>5eb35e6f-af89-4379-ba76-6880a3d106f7</image_id>
<       </disk>
<     </disk_attachment>
<   </disk_attachments>
</snapshot>


Actual results:
Engine Error Image IDs ${ImageId} appear instead of the real value

Expected results:
I would expect instead of the ${ImageId} that a real value with the existing imageId will appear 

Additional info:

Comment 1 Sandro Bonazzola 2019-01-28 09:34:10 UTC
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.

Comment 2 Avihai 2019-03-06 18:48:37 UTC
verified on ovirt-engine Software Version:4.3.2-0.1.el7

Comment 3 Sandro Bonazzola 2019-03-13 16:39:33 UTC
This bugzilla is included in oVirt 4.3.1 release, published on February 28th 2019.

Since the problem described in this bug report should be
resolved in oVirt 4.3.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.


Note You need to log in before you can comment on or make changes to this bug.