diff --git a/core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java b/core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java index 8ec03fa67b9..ec4068f44b1 100644 --- a/core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java +++ b/core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java @@ -625,15 +625,15 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe /** * This method just creates a XenServer network following the tunnel network naming convention */ - private synchronized Network findOrCreateTunnelNetwork(Connection conn, long networkId) { + private synchronized Network findOrCreateTunnelNetwork(Connection conn, long key) { try { - String nwName = "OVSTunnel" + networkId; + String nwName = "OVSTunnel" + key; Network nw = null; Network.Record rec = new Network.Record(); Set networks = Network.getByNameLabel(conn, nwName); if (networks.size() == 0) { - rec.nameDescription = "tunnel network id# " + networkId; + rec.nameDescription = "tunnel network id# " + key; rec.nameLabel = nwName; //Initialize the ovs-host-setup to avoid error when doing get-param in plugin Map otherConfig = new HashMap(); @@ -641,7 +641,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe rec.otherConfig = otherConfig; nw = Network.create(conn, rec); // Plug dom0 vif only when creating network - enableXenServerNetwork(conn, nw, nwName, "tunnel network for account " + networkId); + enableXenServerNetwork(conn, nw, nwName, "tunnel network for account " + key); s_logger.debug("### Xen Server network for tunnels created:" + nwName); } else { nw = networks.iterator().next(); @@ -659,8 +659,8 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe */ private synchronized Network configureTunnelNetwork(Connection conn, long networkId, long hostId, int key) { try { - Network nw = findOrCreateTunnelNetwork(conn, networkId); - String nwName = "OVSTunnel" + key; + Network nw = findOrCreateTunnelNetwork(conn, key); + String nwName = "OVSTunnel" + key; //Invoke plugin to setup the bridge which will be used by this network String bridge = nw.getBridge(conn); Map nwOtherConfig = nw.getOtherConfig(conn); diff --git a/server/src/com/cloud/network/ovs/OvsTunnelManagerImpl.java b/server/src/com/cloud/network/ovs/OvsTunnelManagerImpl.java index 43af4e53933..b8a8ff6ab1e 100644 --- a/server/src/com/cloud/network/ovs/OvsTunnelManagerImpl.java +++ b/server/src/com/cloud/network/ovs/OvsTunnelManagerImpl.java @@ -138,10 +138,6 @@ public class OvsTunnelManagerImpl implements OvsTunnelManager { private String handleFetchInterfaceAnswer(Answer[] answers, Long hostId){ OvsFetchInterfaceAnswer ans = (OvsFetchInterfaceAnswer) answers[0]; - String s = String.format( - "(ip:%1$s, netmask:%2$s, mac:%3$s, label:%4$s, host:%5$d)", - ans.getIp(), ans.getNetmask(), ans.getMac(), ans.getLabel(), hostId); - s_logger.debug("### About to add DB entry for:" + s); OvsTunnelInterfaceVO ti = createInterfaceRecord(ans.getIp(), ans.getNetmask(), ans.getMac(), hostId, ans.getLabel()); s_logger.debug("### Interface added to DB - id:" + ti.getId()); @@ -317,7 +313,7 @@ public class OvsTunnelManagerImpl implements OvsTunnelManager { handleCreateTunnelAnswer(answers); noHost = false; } - // If not tunnels have been configured, perform the bridge setup anyway + // If no tunnels have been configured, perform the bridge setup anyway // This will ensure VIF rules will be triggered if (noHost) { Commands cmds = new Commands(