Ensure lb vm enables only those services that are necessary. ensure default route

This commit is contained in:
Chiradeep Vittal 2011-08-05 12:16:55 -07:00
parent 736b6cf98e
commit ac8b833fb0
3 changed files with 23 additions and 1 deletions

View File

@ -426,7 +426,7 @@ setup_console_proxy() {
setup_elbvm() {
log_it "Setting up Elastic Load Balancer system vm"
local hyp=$1
setup_common eth0 eth1 eth2
setup_common eth0 eth1
sed -i /gateway/d /etc/hosts
public_ip=$ETH2_IP
[ "$ETH2_IP" == "0.0.0.0" ] || [ "$ETH2_IP" == "" ] && public_ip=$ETH0_IP
@ -447,6 +447,7 @@ setup_elbvm() {
enable_svc cloud-passwd-srvr 0
enable_svc cloud 0
chkconfig nfs-common off
chkconfig portmap off
}
setup_default() {

View File

@ -90,6 +90,16 @@ dhcpsrvr_svcs() {
echo "cloud nfs-common haproxy portmap" > /var/cache/cloud/disabled_svcs
}
elbvm_svcs() {
chkconfig cloud off
chkconfig haproxy on ;
chkconfig ssh on
chkconfig nfs-common off
chkconfig portmap off
echo "ssh haproxy" > /var/cache/cloud/enabled_svcs
echo "cloud cloud-passwd-srvr dnsmasq apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs
}
enable_pcihotplug() {
sed -i -e "/acpiphp/d" /etc/modules
sed -i -e "/pci_hotplug/d" /etc/modules
@ -188,4 +198,14 @@ then
fi
fi
if [ "$TYPE" == "elbvm" ]
then
elbvm_svcs
if [ $? -gt 0 ]
then
printf "Failed to execute elbvm svcs\n" >$logfile
exit 9
fi
fi
exit $?

View File

@ -474,6 +474,7 @@ public class ElasticLoadBalancerManagerImpl implements
List<Pair<NetworkVO, NicProfile>> networks = new ArrayList<Pair<NetworkVO, NicProfile>>(2);
NicProfile guestNic = new NicProfile();
guestNic.setDefaultNic(true);
networks.add(new Pair<NetworkVO, NicProfile>((NetworkVO) guestNetwork, guestNic));
networks.add(new Pair<NetworkVO, NicProfile>(controlConfig, null));