Skip to content

Commit bfc310e

Browse files
committed
Merge pull request #684 from zorrobyte/zorrobyte-patch-1
Fix Redis config volatile-lru -> allkeys-lru
2 parents 86b4999 + e768478 commit bfc310e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ee/cli/plugins/stack.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2401,24 +2401,24 @@ def install(self, packages=[], apt_packages=[], disp_msg=True):
24012401
if 'redis-server' in apt_packages:
24022402
# set redis.conf parameter
24032403
# set maxmemory 10% for ram below 512MB and 20% for others
2404-
# set maxmemory-policy volatile-lru
2404+
# set maxmemory-policy allkeys-lru
24052405
if os.path.isfile("/etc/redis/redis.conf"):
24062406
if EEVariables.ee_ram < 512:
24072407
Log.debug(self, "Setting maxmemory variable to {0} in redis.conf"
24082408
.format(int(EEVariables.ee_ram*1024*1024*0.1)))
24092409
EEShellExec.cmd_exec(self, "sed -i 's/# maxmemory <bytes>/maxmemory {0}/' /etc/redis/redis.conf"
24102410
.format(int(EEVariables.ee_ram*1024*1024*0.1)))
2411-
Log.debug(self, "Setting maxmemory-policy variable to volatile-lru in redis.conf")
2412-
EEShellExec.cmd_exec(self, "sed -i 's/# maxmemory-policy.*/maxmemory-policy volatile-lru/' "
2411+
Log.debug(self, "Setting maxmemory-policy variable to allkeys-lru in redis.conf")
2412+
EEShellExec.cmd_exec(self, "sed -i 's/# maxmemory-policy.*/maxmemory-policy allkeys-lru/' "
24132413
"/etc/redis/redis.conf")
24142414
EEService.restart_service(self, 'redis-server')
24152415
else:
24162416
Log.debug(self, "Setting maxmemory variable to {0} in redis.conf"
24172417
.format(int(EEVariables.ee_ram*1024*1024*0.2)))
24182418
EEShellExec.cmd_exec(self, "sed -i 's/# maxmemory <bytes>/maxmemory {0}/' /etc/redis/redis.conf"
24192419
.format(int(EEVariables.ee_ram*1024*1024*0.2)))
2420-
Log.debug(self, "Setting maxmemory-policy variable to volatile-lru in redis.conf")
2421-
EEShellExec.cmd_exec(self, "sed -i 's/# maxmemory-policy.*/maxmemory-policy volatile-lru/' "
2420+
Log.debug(self, "Setting maxmemory-policy variable to allkeys-lru in redis.conf")
2421+
EEShellExec.cmd_exec(self, "sed -i 's/# maxmemory-policy.*/maxmemory-policy allkeys-lru/' "
24222422
"/etc/redis/redis.conf")
24232423
EEService.restart_service(self, 'redis-server')
24242424
if disp_msg:

0 commit comments

Comments
 (0)