From 02a8ee911d4cdbdc6ab8349cf7f84ef518326387 Mon Sep 17 00:00:00 2001 From: kishan Date: Thu, 16 Aug 2012 17:37:54 +0530 Subject: [PATCH 1/3] bug CS-15878: created network usage rules after ipassoc during reboot status CS-15878: resolved fixed --- .../systemvm/debian/config/opt/cloud/bin/vpc_netusage.sh | 2 +- .../router/VpcVirtualNetworkApplianceManagerImpl.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/patches/systemvm/debian/config/opt/cloud/bin/vpc_netusage.sh b/patches/systemvm/debian/config/opt/cloud/bin/vpc_netusage.sh index 71deec0ea07..579b0bdfa72 100755 --- a/patches/systemvm/debian/config/opt/cloud/bin/vpc_netusage.sh +++ b/patches/systemvm/debian/config/opt/cloud/bin/vpc_netusage.sh @@ -58,7 +58,7 @@ remove_usage_rules () { } get_usage () { - iptables -L NETWORK_STATS_$ethDev -n -v -x | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null + iptables -L NETWORK_STATS_$ethDev -n -v -x 2> /dev/null | awk '$1 ~ /^[0-9]+$/ { printf "%s:", $2}'; > /dev/null if [ -f /root/removedVifs ] then var=`cat /root/removedVifs` diff --git a/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java b/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java index e91868f4c2d..3839157a35a 100644 --- a/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java +++ b/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java @@ -848,9 +848,6 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian createVpcAssociatePublicIPCommands(router, sourceNat, cmds, vlanMacAddress); } - //Add network usage commands - cmds.addCommands(usageCmds); - //add VPC router to guest networks for (Pair nicNtwk : guestNics) { Nic guestNic = nicNtwk.first(); @@ -926,7 +923,10 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian finalizeUserDataAndDhcpOnStart(cmds, router, provider, guestNic.getNetworkId()); } - + + //Add network usage commands + cmds.addCommands(usageCmds); + return true; } From 3a0905b2807ece3d96515ca5742911ba8f6489c8 Mon Sep 17 00:00:00 2001 From: Abhinandan Prateek Date: Thu, 16 Aug 2012 18:04:39 +0530 Subject: [PATCH 2/3] bug cs-15946: added vpc.max.networks for a integer validation --- server/src/com/cloud/configuration/ConfigurationManagerImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java index 61bcdc30596..02592e6e02a 100755 --- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java +++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java @@ -270,6 +270,7 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura configValuesForValidation.add("storage.cleanup.interval"); configValuesForValidation.add("wait"); configValuesForValidation.add("xen.heartbeat.interval"); + configValuesForValidation.add("vpc.max.networks"); } @Override From b9f5d292341d5ee5453f17c82d0bb795bc2be7ac Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Thu, 16 Aug 2012 19:23:57 +0530 Subject: [PATCH 3/3] CS-15942: Failed to apply Port Forwarding rule to Redundant router Previously failed due to error in iptables command to use a list of IPs. Fixed by using only its first assigned IP and subnet for guest IP network. Reviewed-by: Jayapal Uradi and Abhinandan Prateek. Signed-off-by: Rohit Yadav Signed-off-by: Abhinandan Prateek --- patches/systemvm/debian/config/root/firewall.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/systemvm/debian/config/root/firewall.sh b/patches/systemvm/debian/config/root/firewall.sh index ea4065a8d60..cd8e8ccd88d 100755 --- a/patches/systemvm/debian/config/root/firewall.sh +++ b/patches/systemvm/debian/config/root/firewall.sh @@ -48,7 +48,7 @@ ip_to_dev() { } doHairpinNat () { - local vrGuestIPNetwork=$(sudo ip addr show dev eth0 | grep inet | grep eth0 | awk '{print $2}' ) + local vrGuestIPNetwork=$(sudo ip addr show dev eth0 | grep inet | grep eth0 | awk '{print $2}' | head -1) local vrGuestIP=$(echo $vrGuestIPNetwork | awk -F'/' '{print $1}') local publicIp=$1