Change in ovirt-engine[ovirt-engine-3.4]: core: fix possible NPE on migration failure

iheim at redhat.com iheim at redhat.com
Wed Jan 29 12:41:21 UTC 2014


Itamar Heim has submitted this change and it was merged.

Change subject: core: fix possible NPE on migration failure
......................................................................


core: fix possible NPE on migration failure

We recently added a call to decrease pending memory from the destination
VDS when migration ends. This code was added to the
MigrateVmCommand#reportCompleted method and we assume that the
destination VDS is not null when we reach that method, but in some cases
where the migration fails we might reach the reportCompleted method
after the destination VDS is set to null (see MigrateVmCommand#rerun).

This patch solves this issue by adding null-check which ensures that the
destination VDS is valid before calling to decrease its pending memory.

Change-Id: If5c975ba5a0824c80be36cb997b3b040b5191192
Bug-Url: https://bugzilla.redhat.com/1048790
Signed-off-by: Arik Hadas <ahadas at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateVmCommand.java
1 file changed, 5 insertions(+), 5 deletions(-)

Approvals:
  Omer Frenkel: Looks good to me, approved
  Arik Hadas: Verified



-- 
To view, visit http://gerrit.ovirt.org/23812
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If5c975ba5a0824c80be36cb997b3b040b5191192
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim at redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list