Moti Asayag has posted comments on this change.

Change subject: engine: Enable detaching network from host when a VM has an 
unplugged VNIC profile of that network
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.ovirt.org/#/c/29878/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/VmInterfaceManager.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/VmInterfaceManager.java:

Line 157:         List<String> vmNames = new ArrayList<String>();
Line 158:         for (VM vm : runningVms) {
Line 159:             List<VmNetworkInterface> vmInterfaces = 
getVmNetworkInterfaceDao().getAllForVm(vm.getId());
Line 160:             for (VmNetworkInterface vmNic : vmInterfaces) {
Line 161:                 if (vmNic.isPlugged() &&
there is the same logic in 
 UpdateNetworkValidator.networkNotUsedByRunningVms(), but there we also 
consider the vmNic.isLinked(), i think the same logic should be applied here.

The hotplug means the nic is not connected to the vm anymore.
The link property in its unlinked state, means the nic is plugged, but there is 
no tap device which connects the vnic to a bridge which makes the bridge 
removal safe
Line 162:                     vmNic.getNetworkName() != null &&
Line 163:                     networks.contains(vmNic.getNetworkName())) {
Line 164:                     vmNames.add(vm.getName());
Line 165:                     break;


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I10db794df55b25925423166d33549b92856e9dd0
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yevgeny Zaspitsky <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Lior Vernia <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Yevgeny Zaspitsky <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to