Apply redis fix from master branch
This commit is contained in:
@@ -1188,24 +1188,7 @@ def post_pref(self, apt_packages, packages):
|
|||||||
"maxmemory {0}"
|
"maxmemory {0}"
|
||||||
.format
|
.format
|
||||||
(int(wo_ram*1024*1024*0.1)))
|
(int(wo_ram*1024*1024*0.1)))
|
||||||
Log.debug(
|
|
||||||
self, "Setting maxmemory-policy variable to "
|
|
||||||
"allkeys-lru in redis.conf")
|
|
||||||
WOFileUtils.searchreplace(self,
|
|
||||||
"/etc/redis/redis.conf",
|
|
||||||
"# maxmemory-policy "
|
|
||||||
"noeviction",
|
|
||||||
"maxmemory-policy "
|
|
||||||
"allkeys-lru")
|
|
||||||
Log.debug(
|
|
||||||
self, "Setting tcp-backlog variable to "
|
|
||||||
"in redis.conf")
|
|
||||||
WOFileUtils.searchreplace(self,
|
|
||||||
"/etc/redis/redis.conf",
|
|
||||||
"tcp-backlog 511",
|
|
||||||
"tcp-backlog 32768")
|
|
||||||
|
|
||||||
WOService.restart_service(self, 'redis-server')
|
|
||||||
else:
|
else:
|
||||||
Log.debug(self, "Setting maxmemory variable to {0} "
|
Log.debug(self, "Setting maxmemory variable to {0} "
|
||||||
"in redis.conf"
|
"in redis.conf"
|
||||||
@@ -1215,19 +1198,27 @@ def post_pref(self, apt_packages, packages):
|
|||||||
"# maxmemory <bytes>",
|
"# maxmemory <bytes>",
|
||||||
"maxmemory {0}"
|
"maxmemory {0}"
|
||||||
.format
|
.format
|
||||||
(int(wo_ram*1024*1024*0.1)))
|
(int(wo_ram*1024*1024*0.2)))
|
||||||
Log.debug(
|
|
||||||
self, "Setting maxmemory-policy variable "
|
Log.debug(
|
||||||
"to allkeys-lru in redis.conf")
|
self, "Setting maxmemory-policy variable to "
|
||||||
WOFileUtils.searchreplace(self,
|
"allkeys-lru in redis.conf")
|
||||||
"/etc/redis/redis.conf",
|
WOFileUtils.searchreplace(self,
|
||||||
"# maxmemory-policy "
|
"/etc/redis/redis.conf",
|
||||||
"noeviction",
|
"# maxmemory-policy "
|
||||||
"maxmemory-policy "
|
"noeviction",
|
||||||
"allkeys-lru")
|
"maxmemory-policy "
|
||||||
WOFileUtils.chown(self, '/etc/redis/redis.conf',
|
"allkeys-lru")
|
||||||
'redis', 'redis', recursive=False)
|
Log.debug(
|
||||||
WOService.restart_service(self, 'redis-server')
|
self, "Setting tcp-backlog variable to "
|
||||||
|
"in redis.conf")
|
||||||
|
WOFileUtils.searchreplace(self,
|
||||||
|
"/etc/redis/redis.conf",
|
||||||
|
"tcp-backlog 511",
|
||||||
|
"tcp-backlog 32768")
|
||||||
|
WOFileUtils.chown(self, '/etc/redis/redis.conf',
|
||||||
|
'redis', 'redis', recursive=False)
|
||||||
|
WOService.restart_service(self, 'redis-server')
|
||||||
|
|
||||||
if (packages):
|
if (packages):
|
||||||
if any('/usr/local/bin/wp' == x[1] for x in packages):
|
if any('/usr/local/bin/wp' == x[1] for x in packages):
|
||||||
|
|||||||
Reference in New Issue
Block a user