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

Bug 866539

Summary: [engine] NPE - Unable to remove directLUN disk
Product: Red Hat Enterprise Virtualization Manager Reporter: Gadi Ickowicz <gickowic>
Component: ovirt-engineAssignee: Liron Aravot <laravot>
Status: CLOSED CURRENTRELEASE QA Contact: Attila Darazs <adarazs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.1.0CC: abaron, amureini, dyasny, hateya, iheim, lnatapov, lpeer, nlevinki, Rhev-m-bugs, sgrinber, vvyazmin, yeylon, ykaul
Target Milestone: ---Keywords: Regression
Target Release: 3.1.0   
Hardware: All   
OS: Linux   
Whiteboard: storage
Fixed In Version: SI22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:
Bug Depends On: 869596    
Bug Blocks:    
Attachments:
Description Flags
engine logs none

Description Gadi Ickowicz 2012-10-15 15:16:52 UTC
Created attachment 627511 [details]
engine logs

Description of problem:
When attempting to remove a directLUN disk that does not exist, it fails with a NullPointerException in the logs:

2012-10-15 15:20:29,544 INFO  [org.ovirt.engine.core.bll.RemoveDiskCommand] (pool-4-thread-47) [9be4797] Running command: RemoveDiskCommand internal: false. Entities affected :  ID: 7a7ebc73-6777-4f4c-83e8-ac3ad2e
7291d Type: Disk
2012-10-15 15:20:29,546 INFO  [org.ovirt.engine.core.utils.transaction.TransactionSupport] (pool-4-thread-47) [9be4797] transaction rolled back
2012-10-15 15:20:29,546 ERROR [org.ovirt.engine.core.bll.RemoveDiskCommand] (pool-4-thread-47) [9be4797] Command org.ovirt.engine.core.bll.RemoveDiskCommand throw exception: java.lang.NullPointerException
        at org.ovirt.engine.core.bll.ImagesHandler.removeLunDisk(ImagesHandler.java:665) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.RemoveDiskCommand$1.runInTransaction(RemoveDiskCommand.java:295) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.RemoveDiskCommand$1.runInTransaction(RemoveDiskCommand.java:292) [engine-bll.jar:]
        at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction(TransactionSupport.java:204) [engine-utils.jar:]
        at org.ovirt.engine.core.bll.RemoveDiskCommand.removeLunDisk(RemoveDiskCommand.java:292) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.RemoveDiskCommand.executeCommand(RemoveDiskCommand.java:287) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.executeWithoutTransaction(CommandBase.java:820) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.executeActionInTransactionScope(CommandBase.java:911) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.runInTransaction(CommandBase.java:1284) [engine-bll.jar:]
        at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInSuppressed(TransactionSupport.java:168) [engine-utils.jar:]
        at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope(TransactionSupport.java:107) [engine-utils.jar:]
        at org.ovirt.engine.core.bll.CommandBase.execute(CommandBase.java:926) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.executeAction(CommandBase.java:280) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.MultipleActionsRunner.executeValidatedCommands(MultipleActionsRunner.java:182) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.MultipleActionsRunner.RunCommands(MultipleActionsRunner.java:162) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.MultipleActionsRunner$1.run(MultipleActionsRunner.java:84) [engine-bll.jar:]
        at org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil$InternalWrapperRunnable.run(ThreadPoolUtil.java:64) [engine-utils.jar:]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_05-icedtea]
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_05-icedtea]
        at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_05-icedtea]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_05-icedtea]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_05-icedtea]
        at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_05-icedtea]

2012-10-15 15:20:29,548 INFO  [org.ovirt.engine.core.bll.RemoveDiskCommand] (pool-4-thread-47) [9be4797] Lock freed to object EngineLock [exclusiveLocks= key: 7a7ebc73-6777-4f4c-83e8-ac3ad2e7291d value: DISK
, sharedLocks= ]


Version-Release number of selected component (if applicable):
rhevm-3.1.0-20.el6ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. Create a directLun disk with non-existant parameters (possible through REST)
2. attempt to remove the disk
3. check logs
  
Actual results:
Unable to remove disk

Expected results:
Disk should be removed even if it does not exist

Additional info:

Comment 1 Gadi Ickowicz 2012-10-15 16:28:37 UTC
This also occurs with valid disks that are created through the GUI - I am unable to remove any directLUN disks created from the "disks" tab.

Comment 3 Liron Aravot 2012-10-17 19:31:33 UTC
solved by the fix for bug 863101, tested D\S. the problem was that the xml of the created lun was missing the <type> tag.

https://bugzilla.redhat.com/show_bug.cgi?id=863101

Comment 4 Jakub Libosvar 2012-11-01 16:06:56 UTC
Verified rhevm-3.1.0-25.el6ev.noarch