Bug 1046697

Summary: NPE when running VM from pool in userportal
Product: Red Hat Enterprise Virtualization Manager Reporter: Maor <mlipchuk>
Component: ovirt-engine-userportalAssignee: Arik <ahadas>
Status: CLOSED DUPLICATE QA Contact: Pavel Stehlik <pstehlik>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.3.0CC: acathrow, ecohen, iheim, ofrenkel, Rhev-m-bugs, yeylon
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-01 15:19:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
The engine log with the error none

Description Maor 2013-12-26 16:01:45 UTC
Created attachment 841964 [details]
The engine log with the error

Description of problem:
Trying to run a VM from pool on nott04, and get the following message:
"Error while executing action Run VM from VM Pool (User Portal): Internal Engine
error"

engine log indicates that we get an NPE in ExecutionHandler (see [1]):


[1]
2013-12-26 17:53:58,830 INFO  [org.ovirt.engine.core.bll.RunVmCommand] (ajp-/127.0.0.1:8702-14) [43c298a9
] Lock freed to object EngineLock [exclusiveLocks= key: 3d7521ba-695d-4d74-bfe9-f738fcf58a7d value: VM
, sharedLocks= ]
2013-12-26 17:53:58,852 ERROR [org.ovirt.engine.core.bll.job.ExecutionHandler] (ajp-/127.0.0.1:8702-14) [43c298a9] java.lang.NullPointerException
2013-12-26 17:53:58,853 INFO  [org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand] (ajp-/127.0.0.1:8702-14) [43c298a9] Command [id=6a65c3c5-edce-4713-9d02-425b00df55d4]: Compensating NEW_ENTITY_ID of org.ovirt.engine.core.common.businessentities.permissions; snapshot: 306037aa-369c-4838-b69a-4f881b0cc60d.
2013-12-26 17:53:58,874 ERROR [org.ovirt.engine.core.bll.AddPermissionCommand] (ajp-/127.0.0.1:8702-14) [43c298a9] Transaction rolled-back for command: org.ovirt.engine.core.bll.AddPermissionCommand.
2013-12-26 17:53:58,874 ERROR [org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand] (ajp-/127.0.0.1:8702-14) [43c298a9] Transaction rolled-back for command: org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand.
2013-12-26 17:53:58,896 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (ajp-/127.0.0.1:8702-14) [43c298a9] Correlation ID: 23d425e8, Job ID: 68e622f9-9e02-4be1-b897-551f356651d9, Call Stack: null, Custom Event ID: -1, Message: Failed to attach User mlipchuk.lab.tlv.redhat.com to VM from VM Pool Fedora (User: mlipchuk).
2013-12-26 17:53:58,919 INFO  [org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand] (ajp-/127.0.0.1:8702-14) [43c298a9] Lock freed to object EngineLock [exclusiveLocks= key: 3f234454-501c-11e2-bb7a-001a4a2312ec value: USER_VM_POOL
, sharedLocks= ]


Version-Release number of selected component (if applicable):
3.3.0.-0.40.rc.el6ev

How reproducible:
100%

Steps to Reproduce:
1. Get a VM from pool
2. Try to run it
3.

Actual results:
Get an error message "Error while executing action Run VM from VM Pool (User Portal): Internal Engine
error"

Expected results:
VM should run or fail on a CDA valid message

Additional info:

Comment 1 Maor 2013-12-26 16:44:35 UTC
The exception occurs in the ExecutionHandler#endStep in job.markJobEnded(false)
that comes from RunVmCommand.
the job from the context there is null

Comment 2 Arik 2014-01-01 15:19:29 UTC

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