From Tal Nisan <tnisan(a)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(a)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(a)redhat.com>
Gerrit-Reviewer: Ala Hino <ahino(a)redhat.com>
Gerrit-Reviewer: Benny Zlotnik <bzlotnik(a)redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland(a)redhat.com>
Gerrit-Reviewer: Idan Shaby <ishaby(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>