Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1324363

Summary: [REST-API] Copy of template disk doesn't complete nicely
Product: [oVirt] ovirt-engine Reporter: Liron Aravot <laravot>
Component: BLL.StorageAssignee: Liron Aravot <laravot>
Status: CLOSED CURRENTRELEASE QA Contact: Aharon Canan <acanan>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.6.5CC: amureini, bugs, ebenahar, tnisan
Target Milestone: ovirt-3.6.6Flags: tnisan: ovirt-3.6.z?
rule-engine: planning_ack?
tnisan: devel_ack+
rule-engine: testing_ack+
Target Release: 3.6.6   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-30 10:51:34 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:

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 (*)