Moti Asayag has posted comments on this change.

Change subject: core: Fix potential NPE in ExportVmCommand
......................................................................


Patch Set 3: (1 inline comment)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ExportVmCommand.java
Line 246:                 // TODO remove this when the API changes
Sorry for missing your previous comment about this. 
Since it is being invoked from a single place of code, the VM is retrieved as a 
shallow VM with no collections (without disks or interfaces).

As the previous code looks, this part was never reachable and interfaces 
weren't exported as part of the VM export. It looks like a mistake since the 
OvfManager expects to add the VM interfaces to the template.

See also VmCommand.UpdateVmInSpm()  where the following is executed:
if (vm.getInterfaces() == null || vm.getInterfaces().isEmpty()) {
                
vm.setInterfaces(DbFacade.getInstance().getVmNetworkInterfaceDAO().getAllForVm(vm.getId()));
}

Adding Eli to advise if this scenario also requires having the VM interfaces.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8e8ec579299236b4080017d54c5e0c905e752964
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Laszlo Hornyak <lhorn...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to