Bug 1414867

Summary: Trying to sparsify a direct lun leads to a UI exception
Product: [oVirt] ovirt-engine Reporter: Idan Shaby <ishaby>
Component: BLL.VirtAssignee: Shmuel Melamud <smelamud>
Status: CLOSED CURRENTRELEASE QA Contact: sefi litmanovich <slitmano>
Severity: high Docs Contact:
Priority: unspecified    
Version: futureCC: bugs, gklein, tjelinek, tnisan
Target Milestone: ovirt-4.1.0-betaFlags: rule-engine: ovirt-4.1+
rule-engine: planning_ack+
tjelinek: devel_ack+
gklein: testing_ack+
Target Release: 4.1.0.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-01 14:55:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Idan Shaby 2017-01-19 15:54:31 UTC
Description of problem:
When trying to sparsify a direct lun that is attached to a vm, a UI exception is shown.

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

How reproducible:
100%

Steps to Reproduce:
1. Create a vm.
2. Create a direct lun as one of the vm disks.
3. Click on "Sparsify" when selecting this disk.

Actual results:
UI exception

Expected results:
Should work/be blocked/fail with an error.

Additional info:
It seems to be a class cast exception because of a cast from Disk to DiskImage, so I guess that it will happen with cinder disks, too.
I, personally, don't know what the right behavior should be with disks other than images, I'll leave it to you to decide.

Comment 1 Yaniv Kaul 2017-01-22 09:53:30 UTC
I'd block it.

Comment 2 sefi litmanovich 2017-02-01 11:44:07 UTC
Verified with rhevm-4.1.0.3-0.1.el7.noarch.
1. Create a vm.
2. Created a vm with direct lun as one of vm's disks.
3. Sparsify option in UI is disabled.
4. Via REST API sparsify action fails - The error message is 'Internal error' too general, opened a bug for this: https://bugzilla.redhat.com/show_bug.cgi?id=1418255