From 14d1417737fcdfcf02f1516c8ad3338400be9849 Mon Sep 17 00:00:00 2001 From: kishan Date: Wed, 28 Sep 2011 01:12:00 +0530 Subject: [PATCH] bug 11581: During router start, create iptables NETWORK_STATS chain before adding rules for additional public interfaces into that chain status 11581: resolved fixed reviewed-by: Chiradeep --- .../network/router/VirtualNetworkApplianceManagerImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java index dfd4d617c6b..dcfc82e0e2d 100755 --- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java +++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java @@ -1554,6 +1554,9 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian cmds.addCommand("checkSsh", new CheckSshCommand(profile.getInstanceName(), controlNic.getIp4Address(), 3922, 5, 20)); + // Network usage command to create iptables rules + cmds.addCommand("networkUsage", new NetworkUsageCommand(controlNic.getIp4Address(), router.getHostName(), "create")); + // restart network if restartNetwork = false is not specified in profile parameters boolean restartNetwork = true; if (profile.getParameter(Param.RestartNetwork) != null && (Boolean) profile.getParameter(Param.RestartNetwork) == false) { @@ -1668,8 +1671,6 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian // Resend user data s_logger.debug("Reapplying vm data (userData and metaData) entries as a part of domR " + router + " start..."); createVmDataCommands(router, cmds); - // Network usage command to create iptables rules - cmds.addCommand("networkUsage", new NetworkUsageCommand(controlNic.getIp4Address(), router.getHostName(), "create")); return true; }