From 945aea9c552c07070d5f48b6cdff4177ded73811 Mon Sep 17 00:00:00 2001 From: Anthony Xu Date: Fri, 7 Sep 2012 17:29:49 -0700 Subject: [PATCH] CS-15542, return success when vif is not there on deipassoc --- .../cloud/hypervisor/vmware/resource/VmwareResource.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java index da7f901cf39..cf4f335ba82 100755 --- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java +++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java @@ -1326,7 +1326,12 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa int ethDeviceNum = this.findRouterEthDeviceIndex(domrName, routerIp, ip.getVifMacAddress()); if (ethDeviceNum < 0) { - throw new InternalErrorException("Failed to find DomR VIF to associate/disassociate IP with."); + if (ip.isAdd()) { + throw new InternalErrorException("Failed to find DomR VIF to associate/disassociate IP with."); + } else { + s_logger.debug("VIF to deassociate IP with does not exist, return success"); + return; + } } String args = "";