From 2ffa0e9c0abad8fa130b59d80c0a67d507805dc8 Mon Sep 17 00:00:00 2001 From: Naredula Janardhana Reddy Date: Wed, 24 Aug 2011 13:40:42 +0530 Subject: [PATCH] Revert "bug 11191: Added global config to disable/enable rp_filter for domR(public interfaces)" This reverts commit d966906374d4a0cb8fa57326a1f7625c871f64fd. --- .../config/etc/init.d/cloud-early-config | 20 +------------------ .../src/com/cloud/configuration/Config.java | 2 -- .../VirtualNetworkApplianceManagerImpl.java | 14 ++----------- setup/db/db/schema-228to229.sql | 1 - setup/db/db/schema-229to2210.sql | 1 - 5 files changed, 3 insertions(+), 35 deletions(-) diff --git a/patches/systemvm/debian/config/etc/init.d/cloud-early-config b/patches/systemvm/debian/config/etc/init.d/cloud-early-config index e9e9fec7c44..d7f607712bb 100755 --- a/patches/systemvm/debian/config/etc/init.d/cloud-early-config +++ b/patches/systemvm/debian/config/etc/init.d/cloud-early-config @@ -183,20 +183,6 @@ disable_rpfilter() { sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 0/" /etc/sysctl.conf } -disable_rpfilter_domR() { - log_it "cloud: disable rp_filter" - log_it "disable rpfilter" - sed -i "s/net.ipv4.conf.default.rp_filter.*$/net.ipv4.conf.default.rp_filter = 0/" /etc/sysctl.conf - if [ "$DISABLE_RP_FILTER" == "true" ] - then - log_it "cloud: disable rp_filter : updating proc" - sed -i "s/net.ipv4.conf.eth2.rp_filter.*$/net.ipv4.conf.eth2.rp_filter = 0/" /etc/sysctl.conf - sed -i "s/net.ipv4.conf.eth3.rp_filter.*$/net.ipv4.conf.eth3.rp_filter = 0/" /etc/sysctl.conf - echo "0" > /proc/sys/net/ipv4/conf/eth2/rp_filter - echo "0" > /proc/sys/net/ipv4/conf/eth3/rp_filter - fi -} - enable_svc() { local svc=$1 local enabled=$2 @@ -390,7 +376,7 @@ setup_router() { enable_svc haproxy 1 enable_svc cloud-passwd-srvr 1 enable_svc cloud 0 - disable_rpfilter_domR + disable_rpfilter enable_fwding 1 chkconfig nfs-common off cp /etc/iptables/iptables-router /etc/iptables/rules @@ -575,7 +561,6 @@ parse_cmd_line() { CMDLINE=$(cat /var/cache/cloud/cmdline) TYPE="unknown" BOOTPROTO="static" -DISABLE_RP_FILTER="false" for i in $CMDLINE do @@ -583,9 +568,6 @@ for i in $CMDLINE KEY=$(echo $i | cut -d= -f1) VALUE=$(echo $i | cut -d= -f2) case $KEY in - disable_rp_filter) - DISABLE_RP_FILTER=$VALUE - ;; eth0ip) ETH0_IP=$VALUE ;; diff --git a/server/src/com/cloud/configuration/Config.java b/server/src/com/cloud/configuration/Config.java index d9b0bd19047..2ce461857b6 100755 --- a/server/src/com/cloud/configuration/Config.java +++ b/server/src/com/cloud/configuration/Config.java @@ -62,8 +62,6 @@ public enum Config { NetworkLBHaproxyStatsUri("Network", ManagementServer.class, String.class, "network.loadbalancer.haproxy.stats.uri","/admin?stats","Load Balancer(haproxy) uri.",null), NetworkLBHaproxyStatsAuth("Network", ManagementServer.class, String.class, "network.loadbalancer.haproxy.stats.auth","admin1:AdMiN123","Load Balancer(haproxy) authetication string in the format username:password",null), NetworkLBHaproxyStatsPort("Network", ManagementServer.class, String.class, "network.loadbalancer.haproxy.stats.port","8081","Load Balancer(haproxy) stats port number.",null), - NetworkRouterRpFilter("Network", ManagementServer.class, Integer.class, "network.disable.rpfilter", "true", "disable rp_filter on Domain Router VM public interfaces.", null), - GuestVlanBits("Network", ManagementServer.class, Integer.class, "guest.vlan.bits", "12", "The number of bits to reserve for the VLAN identifier in the guest subnet.", null), //MulticastThrottlingRate("Network", ManagementServer.class, Integer.class, "multicast.throttling.rate", "10", "Default multicast rate in megabits per second allowed.", null), NetworkThrottlingRate("Network", ManagementServer.class, Integer.class, "network.throttling.rate", "200", "Default data transfer rate in megabits per second allowed in network.", null), diff --git a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java index f6208894947..cc0ae955ccf 100755 --- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java +++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java @@ -313,8 +313,6 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian private ServiceOfferingVO _offering; private String trafficSentinelHostname; private String _dnsBasicZoneUpdates = "all"; - - private boolean _disable_rp_filter = false; ScheduledExecutorService _executor; ScheduledExecutorService _checkExecutor; @@ -586,11 +584,6 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian _instance = "DEFAULT"; } - String rpValue = configs.get("network.disable.rpfilter"); - if (rpValue != null && rpValue.equalsIgnoreCase("true")) { - _disable_rp_filter = true; - } - _dnsBasicZoneUpdates = String.valueOf(_configDao.getValue(Config.DnsBasicZoneUpdates.key())); s_logger.info("Router configurations: " + "ramsize=" + _routerRamSize); @@ -1215,7 +1208,7 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian String type = null; String dhcpRange = null; - String rpFilter = " "; + DataCenter dc = dest.getDataCenter(); DataCenterVO dcVO = _dcDao.findById(dc.getId()); _dcDao.loadDetails(dcVO); @@ -1231,13 +1224,10 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian type = "dhcpsrvr"; } else { type = "router"; - if (_disable_rp_filter) { - rpFilter=" disable_rp_filter=true"; - } } StringBuilder buf = profile.getBootArgsBuilder(); - buf.append(" template=domP type=" + type+rpFilter); + buf.append(" template=domP type=" + type); buf.append(" name=").append(profile.getHostName()); boolean isRedundant = _configDao.getValue("network.redundantrouter").equals("true"); diff --git a/setup/db/db/schema-228to229.sql b/setup/db/db/schema-228to229.sql index ec4953d51f3..248bf751825 100644 --- a/setup/db/db/schema-228to229.sql +++ b/setup/db/db/schema-228to229.sql @@ -53,7 +53,6 @@ INSERT IGNORE INTO configuration VALUES ('Network', 'DEFAULT', 'management-serve INSERT IGNORE INTO configuration VALUES ('Network', 'DEFAULT', 'management-server', 'network.loadbalancer.haproxy.stats.uri','/admin?stats','Load Balancer(haproxy) uri.'); INSERT IGNORE INTO configuration VALUES ('Network', 'DEFAULT', 'management-server', 'network.loadbalancer.haproxy.stats.auth','admin1:AdMiN123','Load Balancer(haproxy) authetication string in the format username:password'); INSERT IGNORE INTO configuration VALUES ('Network', 'DEFAULT', 'management-server', 'network.loadbalancer.haproxy.stats.port','8081','Load Balancer(haproxy) stats port number.'); -INSERT IGNORE INTO configuration VALUES ('Network', 'DEFAULT', 'management-server', 'network.disable.rpfilter','true','disable rp_filter on Domain Router VM public interfaces.'); INSERT IGNORE INTO configuration VALUES ('Advanced', 'DEFAULT', 'NetworkManager', 'use.external.dns', 'false', 'Bypass the cloudstack DHCP/DNS server vm name service, use zone external dns1 and dns2'); INSERT IGNORE INTO configuration VALUES ('Advanced', 'DEFAULT', 'management-server', 'network.loadbalancer.basiczone.elb.enabled', 'false', 'Whether the load balancing service is enabled for basic zones'); INSERT IGNORE INTO configuration VALUES ('Advanced', 'DEFAULT', 'management-server', 'network.loadbalancer.basiczone.elb.gc.interval.minutes', '120', 'Garbage collection interval to destroy unused ELB vms in minutes. Minimum of 5'); diff --git a/setup/db/db/schema-229to2210.sql b/setup/db/db/schema-229to2210.sql index 2c44bbb3299..dab13dbff8f 100644 --- a/setup/db/db/schema-229to2210.sql +++ b/setup/db/db/schema-229to2210.sql @@ -35,7 +35,6 @@ INSERT IGNORE INTO configuration VALUES ('Network', 'DEFAULT', 'management-serve INSERT IGNORE INTO configuration VALUES ('Network', 'DEFAULT', 'management-server', 'network.loadbalancer.haproxy.stats.uri','/admin?stats','Load Balancer(haproxy) uri.'); INSERT IGNORE INTO configuration VALUES ('Network', 'DEFAULT', 'management-server', 'network.loadbalancer.haproxy.stats.auth','admin1:AdMiN123','Load Balancer(haproxy) authetication string in the format username:password'); INSERT IGNORE INTO configuration VALUES ('Network', 'DEFAULT', 'management-server', 'network.loadbalancer.haproxy.stats.port','8081','Load Balancer(haproxy) stats port number.'); -INSERT IGNORE INTO configuration VALUES ('Network', 'DEFAULT', 'management-server', 'network.disable.rpfilter','true','disable rp_filter on Domain Router VM public interfaces.'); INSERT IGNORE INTO configuration VALUES ('Advanced', 'DEFAULT', 'NetworkManager', 'use.external.dns', 'false', 'Bypass the cloudstack DHCP/DNS server vm name service, use zone external dns1 and dns2'); INSERT IGNORE INTO configuration VALUES ('Advanced', 'DEFAULT', 'management-server', 'network.loadbalancer.basiczone.elb.enabled', 'false', 'Whether the load balancing service is enabled for basic zones'); INSERT IGNORE INTO configuration VALUES ('Advanced', 'DEFAULT', 'management-server', 'network.loadbalancer.basiczone.elb.gc.interval.minutes', '120', 'Garbage collection interval to destroy unused ELB vms in minutes. Minimum of 5');