Adding vm.overcommit_memory kernel parameter
This commit is contained in:
parent
e79473b41e
commit
20410f4168
|
@ -113,6 +113,14 @@ function redisClusterIsOK()
|
|||
}
|
||||
|
||||
CONF="/etc/redis/cluster.conf"
|
||||
INITFLAG="/usr/share/eole/redisinit.flg"
|
||||
|
||||
sysConf=$(grep "vm.overcommit_memory" /etc/sysctl.conf 2>&1 > /dev/null)
|
||||
if [[ ${?} -ne 0 ]]
|
||||
then
|
||||
echo "vm.overcommit_memory=1" >> /etc/sysctl.conf
|
||||
sysctl -p /etc/sysctl.conf
|
||||
fi
|
||||
|
||||
[[ ! -e ${CONF} ]] && exit 0
|
||||
|
||||
|
@ -152,7 +160,7 @@ done < ${CONF}
|
|||
|
||||
# If the cluster is "ok" don't do anything
|
||||
st=$(redisClusterIsOK ${LeaderIP} ${LeaderPort})
|
||||
#[[ ${?} -eq 0 ]] && exit 0
|
||||
[[ ${?} -eq 0 ]] && exit 0
|
||||
|
||||
if [[ ${1} == "forget" ]]
|
||||
then
|
||||
|
@ -160,6 +168,13 @@ then
|
|||
exit ${?}
|
||||
fi
|
||||
|
||||
|
||||
if [[ -e ${INITFLAG} ]]
|
||||
then
|
||||
echo "Init allready done ... nothing to do"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo " * Organise Cluster Meeting."
|
||||
for node in ${NAMES[@]}
|
||||
do
|
||||
|
|
Loading…
Reference in New Issue