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.
(cherry picked from commit 1ae02009b5)

Signed-off-by: Animesh Chaturvedi <animesh@apache.org>
This commit is contained in:
Koushik Das 2014-01-31 10:35:19 +05:30 committed by Animesh Chaturvedi
parent 9961a8e710
commit 4809d91c51
1 changed files with 7 additions and 0 deletions

View File

@ -61,4 +61,11 @@ then
maxmem=$eightypcnt
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 $@