Bug 855933 - NPE when starting VM with direct lun (at org.ovirt.engine.core.bll.RunVmOnceCommand.validateAndSetQuota(RunVmOnceCommand.java:66)
NPE when starting VM with direct lun (at org.ovirt.engine.core.bll.RunVmOnceC...
Status: CLOSED DUPLICATE of bug 855647
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.1.0
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Doron Fediuck
sla
: TestBlocker
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-10 12:29 EDT by Jakub Libosvar
Modified: 2016-02-10 15:17 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-09-11 02:45:46 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: SLA
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
logs (5.53 KB, application/x-gzip)
2012-09-10 12:29 EDT, Jakub Libosvar
no flags Details

  None (edit)
Description Jakub Libosvar 2012-09-10 12:29:45 EDT
Created attachment 611488 [details]
logs

Description of problem:
When attempting to start VM that has attached direct lun, NPE occurs

2012-09-10 18:21:52,459 ERROR [org.ovirt.engine.core.bll.RunVmOnceCommand] (ajp-/127.0.0.1:8009-4) [1728abf] Error during CanDoActionFailure.: java.lang.NullPointerException
    at org.ovirt.engine.core.bll.RunVmOnceCommand.validateAndSetQuota(RunVmOnceCommand.java:66) [engine-bll.jar:]
    at org.ovirt.engine.core.bll.CommandBase.InternalCanDoAction(CommandBase.java:504) [engine-bll.jar:]
    at org.ovirt.engine.core.bll.CommandBase.ExecuteAction(CommandBase.java:268) [engine-bll.jar:]
    at org.ovirt.engine.core.bll.Backend.runActionImpl(Backend.java:335) [engine-bll.jar:]
    at org.ovirt.engine.core.bll.Backend.RunAction(Backend.java:293) [engine-bll.jar:]
    at sun.reflect.GeneratedMethodAccessor177.invoke(Unknown Source) [:1.7.0_05-icedtea]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_05-icedtea]
    at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_05-icedtea]
    at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72) [jboss-as-ee.jar:7.1.2.Final-redhat-1]
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation.jar:1.1.1.Final-redhat-1]
    at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:374) [jboss-invocation.jar:1.1.1.Final-redhat-1]
    at org.ovirt.engine.core.utils.ThreadLocalSessionCleanerInterceptor.injectWebContextToThreadLocal(ThreadLocalSessionCleanerInterceptor.java:11) [engine-utils.jar:]
    at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source) [:1.7.0_05-icedtea]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_05-icedtea]
    at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_05-icedtea]


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

How reproducible:
Always

Steps to Reproduce:
1. Attach direct lun to VM
2. Start VM
3.
  
Actual results:


Expected results:


Additional info:
Backend and vdsm logs are attached
Blocks direct lun tests
Comment 2 Jakub Libosvar 2012-09-11 02:37:57 EDT
Pasting new ST - one in description could be caused by bug 854977


2012-09-11 08:32:38,111 ERROR [org.ovirt.engine.core.bll.RunVmCommand] (pool-4-thread-50) [7f8f4d6f] Command org.ovirt.engine.core.bll.RunVmCommand throw exception: java.lang.NullPointerException
	at org.ovirt.engine.core.bll.RunVmCommandBase.connectLunDisks(RunVmCommandBase.java:353) [engine-bll.jar:]
	at org.ovirt.engine.core.bll.RunVmCommand.RunVm(RunVmCommand.java:221) [engine-bll.jar:]
	at org.ovirt.engine.core.bll.RunVmCommand.ExecuteVmCommand(RunVmCommand.java:276) [engine-bll.jar:]
	at org.ovirt.engine.core.bll.VmCommand.executeCommand(VmCommand.java:83) [engine-bll.jar:]
	at org.ovirt.engine.core.bll.CommandBase.ExecuteWithoutTransaction(CommandBase.java:819) [engine-bll.jar:]
	at org.ovirt.engine.core.bll.CommandBase.executeActionInTransactionScope(CommandBase.java:910) [engine-bll.jar:]
	at org.ovirt.engine.core.bll.CommandBase.runInTransaction(CommandBase.java:1269) [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:925) [engine-bll.jar:]
	at org.ovirt.engine.core.bll.CommandBase.ExecuteAction(CommandBase.java:275) [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.SortedMultipleActionsRunnerBase.RunCommands(SortedMultipleActionsRunnerBase.java:16) [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]
Comment 3 Doron Fediuck 2012-09-11 02:45:46 EDT
Quota validation caused NPE due to missing storage pool ID.
This influenced several storage flows, and fixed as bug 855647.

*** This bug has been marked as a duplicate of bug 855647 ***
Comment 4 Doron Fediuck 2012-09-11 03:33:24 EDT
(In reply to comment #2)
> Pasting new ST - one in description could be caused by bug 854977
> 
> 
> 2012-09-11 08:32:38,111 ERROR [org.ovirt.engine.core.bll.RunVmCommand]
> (pool-4-thread-50) [7f8f4d6f] Command org.ovirt.engine.core.bll.RunVmCommand
> throw exception: java.lang.NullPointerException
> 	at
> org.ovirt.engine.core.bll.RunVmCommandBase.connectLunDisks(RunVmCommandBase.
> java:353) [engine-bll.jar:]
> 	at org.ovirt.engine.core.bll.RunVmCommand.RunVm(RunVmCommand.java:221)
> [engine-bll.jar:]
> 	at
> org.ovirt.engine.core.bll.RunVmCommand.ExecuteVmCommand(RunVmCommand.java:
> 276) [engine-bll.jar:]
> 	at org.ovirt.engine.core.bll.VmCommand.executeCommand(VmCommand.java:83)
> [engine-bll.jar:]
> 	at
> org.ovirt.engine.core.bll.CommandBase.ExecuteWithoutTransaction(CommandBase.
> java:819) [engine-bll.jar:]
> 	at
> org.ovirt.engine.core.bll.CommandBase.
> executeActionInTransactionScope(CommandBase.java:910) [engine-bll.jar:]
> 	at
> org.ovirt.engine.core.bll.CommandBase.runInTransaction(CommandBase.java:
> 1269) [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:925)
> [engine-bll.jar:]
> 	at
> org.ovirt.engine.core.bll.CommandBase.ExecuteAction(CommandBase.java:275)
> [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.SortedMultipleActionsRunnerBase.
> RunCommands(SortedMultipleActionsRunnerBase.java:16) [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]

Jakub,
I closed the BZ as it was a duplicate of the quota issue before you submitted
you alternate stack trace.

I suggest you open a new clear BZ on the issue, and please make sure it's not
a dup of bug 855936.
Comment 5 Jakub Libosvar 2012-09-11 07:40:35 EDT
(In reply to comment #4)
> I suggest you open a new clear BZ on the issue, and please make sure it's not
> a dup of bug 855936.

Can be both NPEs (ST in comment 3 and in bug 855936) caused by any empty DB columns like here?

[root@jl-rhevm31 ~]# psql engine -U postgres -c "select * from luns;"
 physical_volume_id |              lun_id               | volume_group_id | serial | lun_mapping | vendor_id | product_id | device_size 
--------------------+-----------------------------------+-----------------+--------+-------------+-----------+------------+-------------
                    | 36006048c78acaa6eac8ebc05bf73dee1 |                 |        |             |           |            |           0
                    | 36006048c12952607a6254682d950135a |                 |        |             |           |            |           0
(2 rows)
Comment 6 Doron Fediuck 2012-09-11 07:53:01 EDT
(In reply to comment #5)
> (In reply to comment #4)
> > I suggest you open a new clear BZ on the issue, and please make sure it's not
> > a dup of bug 855936.
> 
> Can be both NPEs (ST in comment 3 and in bug 855936) caused by any empty DB
> columns like here?
> 
I do not know as this is a storage issue and needs further investigation.
This is why I strongly recommend one one clear storage BZ.

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