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

Bug 1838505

Summary: edit/update Direct LUN disk fails with "LunDisk cannot be cast to class org.ovirt.engine.core.common.businessentities.storage.DiskImage"
Product: [oVirt] ovirt-engine Reporter: Avihai <aefrat>
Component: BLL.StorageAssignee: Tal Nisan <tnisan>
Status: CLOSED DUPLICATE QA Contact: Avihai <aefrat>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.4.0.2CC: bugs, eshenitz
Target Milestone: ---Keywords: Regression, TestBlocker
Target Release: ---   
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: 2020-05-25 14:14:23 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:
Attachments:
Description Flags
rhv-4.4.0-36_rep_engine_log
none
video_capture of the issue none

Description Avihai 2020-05-21 09:56:46 UTC
Created attachment 1690575 [details]
rhv-4.4.0-36_rep_engine_log

Description of problem:
Updating direct LUN disk via webadmin "Edit Virtual Disk" window on any checkboxes(sharable/readonly/passthrough/...) fails with "engine server error" in webadmin and the following errors in engine log:

Attached video and print screen.

Engine log:
2020-05-21 12:40:45,370+03 INFO  [org.ovirt.engine.core.bll.storage.disk.UpdateDiskCommand] (default task-10) [ae51a687-d456-424d-9b74-7ee7acf5edbb] Running command: UpdateDiskCommand internal: false. Entities affected :  ID: dbd8b989-e007-4d3c-8439-a6db6d79f44b Type: DiskAction group EDIT_DISK_PROPERTIES with role type USER,  ID: dbd8b989-e007-4d3c-8439-a6db6d79f44b Type: DiskAction group CONFIGURE_SCSI_GENERIC_IO with role type ADMIN
2020-05-21 12:40:45,370+03 ERROR [org.ovirt.engine.core.bll.storage.disk.UpdateDiskCommand] (default task-10) [ae51a687-d456-424d-9b74-7ee7acf5edbb] Command 'org.ovirt.engine.core.bll.storage.disk.UpdateDiskCommand' failed: class org.ovirt.engine.core.common.businessentities.storage.LunDisk cannot be cast to class org.ovirt.engine.core.common.businessentities.storage.DiskImage (org.ovirt.engine.core.common.businessentities.storage.LunDisk and org.ovirt.engine.core.common.businessentities.storage.DiskImage are in unnamed module of loader 'org.ovirt.engine.core.common' @5a7003ca)
2020-05-21 12:40:45,370+03 ERROR [org.ovirt.engine.core.bll.storage.disk.UpdateDiskCommand] (default task-10) [ae51a687-d456-424d-9b74-7ee7acf5edbb] Exception: java.lang.ClassCastException: class org.ovirt.engine.core.common.businessentities.storage.LunDisk cannot be cast to class org.ovirt.engine.core.common.businessentities.storage.DiskImage (org.ovirt.engine.core.common.businessentities.storage.LunDisk and org.ovirt.engine.core.common.businessentities.storage.DiskImage are in unnamed module of loader 'org.ovirt.engine.core.common' @5a7003ca)
        at deployment.engine.ear.bll.jar//org.ovirt.engine.core.bll.storage.disk.UpdateDiskCommand.lockImageInDb(UpdateDiskCommand.java:1050)
        at deployment.engine.ear.bll.jar//org.ovirt.engine.core.bll.storage.disk.UpdateDiskCommand.executeVmCommand(UpdateDiskCommand.java:217)


Version-Release number of selected component (if applicable):
ovirt engine 4.4.0.2-0.1.el8ev
vdsm-4.40.16-1.el8ev.x86_64

How reproducible:
100%

Steps to Reproduce(manually via webadmin):
1. Create VM from template
2. Create direct LUN disk
3. Attach disk to VM
4. Try to update the VM 
Via Edit Virtual Disk-> by checking checkboxes(sharable/readonly/passthrough/...) and press 'OK'

Actual results:
Operation fails with "engine server error" in webamdin.

Expected results:


Additional info:
Issue occurs when VM is up/down.
Only occurs on direct LUN disk, regular disk works fine.

Comment 1 Avihai 2020-05-21 10:00:26 UTC
Regression as this works without issues in 4.3.

Comment 2 Avihai 2020-05-21 15:25:05 UTC
Created attachment 1690688 [details]
video_capture of the issue

Comment 3 Eyal Shenitzky 2020-05-25 14:14:23 UTC

*** This bug has been marked as a duplicate of bug 1837911 ***