Change in ovirt-engine[master]: core: prevent NPE when vm disappears from the host

Code Review gerrit at ovirt.org
Tue May 16 18:48:19 UTC 2017


>From Arik Hadas <ahadas at redhat.com>:

Arik Hadas has submitted this change and it was merged.

Change subject: core: prevent NPE when vm disappears from the host
......................................................................


core: prevent NPE when vm disappears from the host

It is possible that from the monitoring point-of-view a VM disappears
from the host. For instance, when powering-off a VM it suddenly stops
being reported by the host (power-off calls 'destroy' so the VM is
dropped from the list of running VMs on the host). In that case, the
code that prepares the VMs for devices monitoring may lead to NPE.
This patch prevents it by adding a null-check (obviously, the devices
of such VMs should not be monitored at that point).

Change-Id: I541bc763c99187556a5d4d76cb46df7045f8bab8
Signed-off-by: Arik Hadas <ahadas at redhat.com>
---
M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/monitoring/PollVmStatsRefresher.java
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Piotr Kliczewski: Looks good to me, but someone else must approve
  Jenkins CI: Passed CI tests
  Shmuel Leib Melamud: Looks good to me, but someone else must approve
  Arik Hadas: Verified; Looks good to me, approved



-- 
To view, visit https://gerrit.ovirt.org/76878
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I541bc763c99187556a5d4d76cb46df7045f8bab8
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Sharon Gratch <sgratch at redhat.com>
Gerrit-Reviewer: Shmuel Leib Melamud <smelamud at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>


More information about the Engine-commits mailing list