Change in ovirt-engine[master]: core: Fix bug in discard checks

Code Review gerrit at ovirt.org
Thu Jan 5 10:11:23 UTC 2017


>From Tal Nisan <tnisan at redhat.com>:

Tal Nisan has submitted this change and it was merged.

Change subject: core: Fix bug in discard checks
......................................................................


core: Fix bug in discard checks

When passing a list of VM disks to validate if their discard value is
legal a map of a disk to its DiskVmElement is created.
The map is created by fetching all of the VM's DiskVmElements and
iterating on them, however, in some cases not all the VM's disk are sent
for the check (one example is deactivated disks) and the map is created
with a null key (since the corresponding disk does not exist in the list
of disks to check) thus causing an NPE later in the flow.
This was fixed by creating a map entry only if there is a disk in the list
corresponding to the DiskVmElement fetched

Change-Id: I5379f3ced6aeeed27e9ab572ff141c0711bd4454
Bug-Url: https://bugzilla.redhat.com/1409995
Signed-off-by: Tal Nisan <tnisan at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/DiskHandler.java
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Tal Nisan: Verified; Looks good to me, approved
  Jenkins CI: Passed CI tests
  Idan Shaby: Looks good to me, but someone else must approve



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5379f3ced6aeeed27e9ab572ff141c0711bd4454
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Ala Hino <ahino at redhat.com>
Gerrit-Reviewer: Benny Zlotnik <bzlotnik at redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Idan Shaby <ishaby at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>


More information about the Engine-commits mailing list