Bug 1582356 - UI hangs with NPE while trying to migrate VM in Powering Up status
Summary: UI hangs with NPE while trying to migrate VM in Powering Up status
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Infra
Hardware: x86_64
OS: Linux
Target Milestone: ovirt-4.2.4
: ---
Assignee: Andrej Krejcir
QA Contact: Lucie Leistnerova
Depends On:
TreeView+ depends on / blocked
Reported: 2018-05-25 01:04 UTC by Germano Veit Michel
Modified: 2018-06-26 08:43 UTC (History)
6 users (show)

Fixed In Version: ovirt-engine-
Doc Type: No Doc Update
Doc Text:
Clone Of:
Last Closed: 2018-06-26 08:43:04 UTC
oVirt Team: SLA
rule-engine: ovirt-4.2?
gveitmic: planning_ack?
rule-engine: devel_ack+
lsvaty: testing_ack+

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
oVirt gerrit 91610 0 master MERGED core: Use cached statistics when scheduling a VM 2018-05-28 14:44:20 UTC
oVirt gerrit 91691 0 ovirt-engine-4.2 MERGED core: Use cached statistics when scheduling a VM 2018-05-29 07:39:28 UTC

Description Germano Veit Michel 2018-05-25 01:04:01 UTC
Description of problem:

Via Admin Portal, start a VM and shortly after (5-10seconds) try to migrate it.
A NPE is hit in the engine and the UI hangs (cant close dialog, OK/CANCEL buttons are not showing, need to close the browser tab).

Looks like it is due to not being able to find the hosts to populate the dialog.

1. RUN:
2018-05-25 10:23:09,906+10 INFO  [org.ovirt.engine.core.vdsbroker.CreateVDSCommand] (EE-ManagedThreadFactory-engine-Thread-256295) [c7be7ae4-04af-4c07-a838-a13f8fd74951] FINISH, CreateVDSCommand, return: WaitForLaunch, log id: 394193bd

2018-05-25 10:23:09,998+10 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (EE-ManagedThreadFactory-engine-Thread-256295) [c7be7ae4-04af-4c07-a838-a13f8fd74951] EVENT_ID: USER_STARTED_VM(153), VM VM1 was started by admin@internal-authz (Host: ovirt-h2).

2. 8 seconds later click in migrate:

2018-05-25 10:23:17,086+10 ERROR [org.ovirt.engine.core.bll.GetValidHostsForVmsQuery] (default task-32) [fdeb9b90-6f09-40b4-baf0-1fbceca32ccf] Query 'GetValidHostsForVmsQuery' failed: null
2018-05-25 10:23:17,086+10 ERROR [org.ovirt.engine.core.bll.GetValidHostsForVmsQuery] (default task-32) [fdeb9b90-6f09-40b4-baf0-1fbceca32ccf] Exception: java.lang.NullPointerException
        at org.ovirt.engine.core.bll.scheduling.SchedulingManager.subtractRunningVmResources(SchedulingManager.java:851) [bll.jar:]
        at org.ovirt.engine.core.bll.scheduling.SchedulingManager.canSchedule(SchedulingManager.java:545) [bll.jar:]
        at org.ovirt.engine.core.bll.GetValidHostsForVmsQuery.lambda$getValidHosts$0(GetValidHostsForVmsQuery.java:48) [bll.jar:]
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) [rt.jar:1.8.0_161]
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) [rt.jar:1.8.0_161]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) [rt.jar:1.8.0_161]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) [rt.jar:1.8.0_161]
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) [rt.jar:1.8.0_161]
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) [rt.jar:1.8.0_161]
        at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) [rt.jar:1.8.0_161]
        at org.ovirt.engine.core.bll.GetValidHostsForVmsQuery.getValidHosts(GetValidHostsForVmsQuery.java:51) [bll.jar:]
        at org.ovirt.engine.core.bll.GetValidHostsForVmsQuery.executeQueryCommand(GetValidHostsForVmsQuery.java:34) [bll.jar:]
        at org.ovirt.engine.core.bll.QueriesCommandBase.executeCommand(QueriesCommandBase.java:106) [bll.jar:]
        at org.ovirt.engine.core.dal.VdcCommandBase.execute(VdcCommandBase.java:33) [dal.jar:]
        at org.ovirt.engine.core.bll.executor.DefaultBackendQueryExecutor.execute(DefaultBackendQueryExecutor.java:14) [bll.jar:]
        at org.ovirt.engine.core.bll.Backend.runQueryImpl(Backend.java:538) [bll.jar:]

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

How reproducible:

Steps to Reproduce:
1. Run VM
2. Migrate VM (within 5-10s after clicking on run)

Actual results:
UI Hangs, NPE

Expected results:
No NPE, UI working.

Comment 1 Michal Skrivanek 2018-05-25 06:09:14 UTC
seems to be introduced recently in I71569b6e26283da346092e5d4f8a2b17b4183d55 by SLA - reassigning for further investigation

Comment 2 Andrej Krejcir 2018-05-25 08:41:02 UTC
Yes, it was introduced by the patch.

Comment 3 Lucie Leistnerova 2018-06-06 14:47:58 UTC
Both hosts need to have newest vdsm version. Then the migration dialog doesn't get stuck.

verified in ovirt-engine-
on hosts vdsm-4.20.29-1.el7ev.x86_64

Comment 4 Sandro Bonazzola 2018-06-26 08:43:04 UTC
This bugzilla is included in oVirt 4.2.4 release, published on June 26th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.4 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.

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