Bug 1324363 - [REST-API] Copy of template disk doesn't complete nicely
Summary: [REST-API] Copy of template disk doesn't complete nicely
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 3.6.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ovirt-3.6.6
: 3.6.6
Assignee: Liron Aravot
QA Contact: Aharon Canan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-06 07:31 UTC by Liron Aravot
Modified: 2016-05-30 10:51 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-30 10:51:34 UTC
oVirt Team: Storage
Embargoed:
tnisan: ovirt-3.6.z?
rule-engine: planning_ack?
tnisan: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1332421 0 unspecified CLOSED [REST-API] The completion of copying template disk audit log is shown with user SYSTEM 2021-02-22 00:41:40 UTC
oVirt gerrit 55718 0 master MERGED restapi: BackendTemplateDiskResource.copy() - pass the disk id 2016-04-06 07:44:37 UTC
oVirt gerrit 55727 0 ovirt-engine-3.6 MERGED restapi: BackendTemplateDiskResource.copy() - pass the disk id 2016-04-07 07:46:38 UTC

Internal Links: 1332421

Description Liron Aravot 2016-04-06 07:31:31 UTC
Description of problem:
WHen copying a template disk using the rest api an exception is
thrown on endAction() which affects the ovf update of the template
and the audit log

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Create a template with at least one disk
2. Copy one of the template disks using the rest api (request to
/api/templates/TEMPLATE_ID/disks/DISK_ID/copy


Actual results:
An exception is logged, an audit log with no disk alias is shown, the generation
of the template isn't incremented (so its ovf won't be updated)


Expected results:
No exception should occur, proper audit log should be added, generation should
be incremented successfully.


Additional info:

Comment 1 Red Hat Bugzilla Rules Engine 2016-04-06 08:29:33 UTC
Bug tickets must have version flags set prior to targeting them to a release. Please ask maintainer to set the correct version flags and only then set the target milestone.

Comment 2 Elad 2016-05-03 07:20:00 UTC
Copy template disk operation, via REST-API, gets completed successfully with no exceptions or wrong audit logs(*). 
Tested against 3.6.3 where a  java.lang.NullPointerException is thrown for MoveOrCopyDisk and an audit log with an UNKNOWN disk alias is shown.


Verified using:
rhevm-3.6.6-0.1.el6.noarch
rhevm-restapi-3.6.6-0.1.el6.noarch
rhevm-webadmin-portal-3.6.6-0.1.el6.noarch



(*) The following audit log is shown in Webadmin portal for copying a template disk via REST-API (for the operation completion):

User SYSTEM finished copying disk 1_Disk1 to domain nfs9.

This is different from the audit log shown for the same operation completion while it's being done via Webadmin portal:

User admin@internal finished copying disk 1_Disk1 to domain nfs9.


Will file a separate bug for (*)


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