From Liron Aravot <laravot(a)redhat.com>:
Liron Aravot has submitted this change and it was merged.
Change subject: core: TransferImage - callback end methods NPE
......................................................................
core: TransferImage - callback end methods NPE
When the TransferImageCommand is being executed for pre existing disk
it'll attempt to load the disk from the db on the OnSucceeded/OnFailed
methods using the image id provided in the command parameters while for a
created disk by the command the data will be taken from the AddDisk parameters.
When uploading to a pre existing disk, the id provided by the user
is passed the in the parameters image id (field which should represent a volume)
instead of in the image group id field (which should represnt the disk id).
When attempting to load the image in the end method using getDiskImage()
no data will be returned as the disk id is used as the volume id and
NPE will be thrown.
In other parts of the command the disk is loaded manually, therefore
this exception is thrown only on the end methods.
Looking forward, we should pass the id provided by the user in the
parameters image group id and complete the image id from the db - this
patch fixes the problem by altering the log in order to reduce the risk
in backporting this change to the stable branches.
Change-Id: Ice26f4d19723042097a81ea4b685a7aa31faf976
Bug-url:
https://bugzilla.redhat.com/1400299
Signed-off-by: Liron Aravot <laravot(a)redhat.com>
---
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/TransferImageCommand.java
1 file changed, 4 insertions(+), 4 deletions(-)
Approvals:
Daniel Erez: Looks good to me, approved
Jenkins CI: Passed CI tests
Liron Aravot: Verified
--
To view, visit
https://gerrit.ovirt.org/69473
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ice26f4d19723042097a81ea4b685a7aa31faf976
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Aravot <laravot(a)redhat.com>
Gerrit-Reviewer: Daniel Erez <derez(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <laravot(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>