From 8e4391bff310bd3583cf81fe0260e8349d05f82f Mon Sep 17 00:00:00 2001 From: Murali Reddy Date: Fri, 25 Apr 2014 14:36:31 +0530 Subject: [PATCH] CLOUDSTACK-6505: XenServer bridge for the OVS tunnel network gets reset on the hosts in the xenserver cluster this fix ensures that brige is created only once so that openflow rules configured on the bridge are not lost. --- .../hypervisor/xen/resource/CitrixResourceBase.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java index 808570de493..6ba7fae6c17 100644 --- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java +++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java @@ -936,14 +936,13 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe synchronized (_tmpDom0Vif) { _tmpDom0Vif.add(dom0vif); } + try { + dom0vif.plug(conn); + } catch (Exception e) { + // though an exception is thrown here, VIF actually gets plugged-in to dom0, so just ignore the exception + } + dom0vif.unplug(conn); } - // At this stage we surely have a VIF - try { - dom0vif.plug(conn); - } catch (Exception e) { - // though an exception is thrown here, VIF actually gets plugged-in to dom0, so just ignore the exception - } - dom0vif.unplug(conn); } private synchronized Network setupvSwitchNetwork(Connection conn) {