when VR is rebooted, CloudStack will reapply all ips/rules to VR,

this patch will reduce time the VR reboot takes
 - remove 1 s sleep in vmware
 - reduce the time arping takes
This commit is contained in:
Anthony Xu 2013-05-29 13:45:07 -07:00
parent 9905f656a5
commit 6a7cc2021e
2 changed files with 4 additions and 6 deletions

View File

@ -227,7 +227,8 @@ add_first_ip() {
if [ $if_keep_state -ne 1 -o $old_state -ne 0 ]
then
sudo ip link set $ethDev up
sudo arping -c 3 -I $ethDev -A -U -s $ipNoMask $ipNoMask;
sudo arping -c 1 -I $ethDev -A -U -s $ipNoMask $ipNoMask;
sudo arping -c 1 -I $ethDev -A -U -s $ipNoMask $ipNoMask;
fi
add_routing $1
@ -273,7 +274,8 @@ add_an_ip () {
if [ $if_keep_state -ne 1 -o $old_state -ne 0 ]
then
sudo ip link set $ethDev up
sudo arping -c 3 -I $ethDev -A -U -s $ipNoMask $ipNoMask;
sudo arping -c 1 -I $ethDev -A -U -s $ipNoMask $ipNoMask;
sudo arping -c 1 -I $ethDev -A -U -s $ipNoMask $ipNoMask;
fi
add_routing $1
return $?

View File

@ -146,10 +146,6 @@ public class SshHelper {
}
sess = conn.openSession();
// There is a bug in Trilead library, wait a second before
// starting a shell and executing commands, from http://spci.st.ewi.tudelft.nl/chiron/xref/nl/tudelft/swerl/util/SSHConnection.html
Thread.sleep(1000);
sess.execCommand(command);
InputStream stdout = sess.getStdout();