Change in ovirt-engine[ovirt-engine-3.5]: core: fix NPE on addition of external vm

oourfali at redhat.com oourfali at redhat.com
Tue Dec 23 13:17:21 UTC 2014


Oved Ourfali has submitted this change and it was merged.

Change subject: core: fix NPE on addition of external vm
......................................................................


core: fix NPE on addition of external vm

We add externally managed VMs using AddVmFromScratch command. This
command is called by the monitoring thread so no user is set as the
'current user' when it is executed. Thus we got NPE when trying to set
the its disk permissions. However, this kind of VMs are diskless VMs so
we are not supposed to set disk permissions for it.

Thus, changing AddVmCommand#addDiskPermissions in a way that the disk
owners will not be retrieved for diskless VMs prevents the NPE.

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

Approvals:
  Shahar Havivi: Looks good to me, approved
  Arik Hadas: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2e0cff201b1c8c89682fc2c3a4ddbc88b4ec803e
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5
Gerrit-Owner: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali at redhat.com>
Gerrit-Reviewer: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list