Arik Hadas 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 <[email protected]>
---
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/36346
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2e0cff201b1c8c89682fc2c3a4ddbc88b4ec803e
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Shahar Havivi <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to