From 5258f37b939d6200e79b338cbe9418cd63971771 Mon Sep 17 00:00:00 2001 From: Kishan Kavala Date: Tue, 18 Sep 2012 14:21:30 +0530 Subject: [PATCH] bug CS-14218: Fixed nic hot plug failure when untagged network is created on tagged vlan status CS-14218: resolved fixed reviewed-by: Abhi --- .../resource/computing/LibvirtComputingResource.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/agent/src/com/cloud/agent/resource/computing/LibvirtComputingResource.java b/agent/src/com/cloud/agent/resource/computing/LibvirtComputingResource.java index 1789c6bb61b..5da066c3f75 100644 --- a/agent/src/com/cloud/agent/resource/computing/LibvirtComputingResource.java +++ b/agent/src/com/cloud/agent/resource/computing/LibvirtComputingResource.java @@ -1172,12 +1172,12 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv if (nic.getBrName().equalsIgnoreCase(_linkLocalBridgeName)) { vlanAllocatedToVM.put("LinkLocal", nicPos); } else { - String vlanId = getVlanIdFromBridge(nic.getBrName()); - if (vlanId != null) { - vlanAllocatedToVM.put(vlanId, nicPos); + if (nic.getBrName().equalsIgnoreCase(_publicBridgeName) || nic.getBrName().equalsIgnoreCase(_privBridgeName) || nic.getBrName().equalsIgnoreCase(_guestBridgeName)) { + vlanAllocatedToVM.put(Vlan.UNTAGGED, nicPos); } else { - vlanAllocatedToVM.put(Vlan.UNTAGGED, nicPos); - } + String vlanId = getVlanIdFromBridge(nic.getBrName()); + vlanAllocatedToVM.put(vlanId, nicPos); + } } nicPos++; }