CLOUDSTACK-5993: Cloud agent fails to start on 32-bit system vms (cpvm and ssvm) created with 4GB RAM offering

Capped the max heap size of the JVM at 2600M for 32-bit system VMs. For 64-bit, existing logic works fine.
This commit is contained in:
Koushik Das 2014-01-31 10:35:19 +05:30
parent 836a9caa72
commit f2f605dfda

View File

@ -61,4 +61,11 @@ then
maxmem=$eightypcnt maxmem=$eightypcnt
fi fi
if [ "$(uname -m | grep '64')" == "" ]; then
let "maxmem32bit=2600"
if [ $maxmem -gt $maxmem32bit ]; then
maxmem=$maxmem32bit
fi
fi
java -Djavax.net.ssl.trustStore=./certs/realhostip.keystore -Dlog.home=$LOGHOME -mx${maxmem}m -cp $CP com.cloud.agent.AgentShell $keyvalues $@ java -Djavax.net.ssl.trustStore=./certs/realhostip.keystore -Dlog.home=$LOGHOME -mx${maxmem}m -cp $CP com.cloud.agent.AgentShell $keyvalues $@