diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d9fd55..b3d41e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### v3.9.x - [Unreleased] +### v3.9.7.2 - 2019-08-12 + +#### Fixed + +- redis.conf permissions additional fix + ### v3.9.7.1 - 2019-08-09 #### Changed diff --git a/install b/install index 9c9ec79..45ec639 100755 --- a/install +++ b/install @@ -7,10 +7,10 @@ # Copyright (c) 2019 - WordOps # This script is licensed under M.I.T # ------------------------------------------------------------------------- -# Version 3.9.7.1 - 2019-08-08 +# Version 3.9.7.2 - 2019-08-12 # ------------------------------------------------------------------------- readonly wo_version_old="2.2.3" -readonly wo_version_new="3.9.7.1" +readonly wo_version_new="3.9.7.2" # CONTENTS # --- # 1. VARIABLES AND DECLARATIONS diff --git a/setup.py b/setup.py index b4026f9..80bf23b 100644 --- a/setup.py +++ b/setup.py @@ -56,7 +56,7 @@ if not os.path.isfile('/root/.gitconfig'): shutil.copy2(os.path.expanduser("~")+'/.gitconfig', '/root/.gitconfig') setup(name='wo', - version='3.9.7.1', + version='3.9.7.2', description=long_description, long_description=long_description, classifiers=[], diff --git a/wo/cli/plugins/stack.py b/wo/cli/plugins/stack.py index a0a2bd0..52f8466 100644 --- a/wo/cli/plugins/stack.py +++ b/wo/cli/plugins/stack.py @@ -1000,7 +1000,7 @@ class WOStackController(CementBaseController): comment='MySQL optimization cronjob ' 'added by WordOps') WOGit.add(self, ["/etc/mysql"], msg="Adding MySQL into Git") - WOService.reload_service(self, 'mysql') + WOService.restart_service(self, 'mysql') # create fail2ban configuration files if set(WOVariables.wo_fail2ban).issubset(set(apt_packages)): @@ -1721,7 +1721,7 @@ class WOStackController(CementBaseController): Log.debug(self, "Calling pre_pref") self.pre_pref(apt_packages) if (apt_packages): - meminfo = (os.popen('cat /proc/meminfo ' + meminfo = (os.popen('/bin/cat /proc/meminfo ' '| grep MemTotal').read()).split(":") memsplit = re.split(" kB", meminfo[1]) wo_mem = int(memsplit[0]) @@ -1755,24 +1755,6 @@ class WOStackController(CementBaseController): "maxmemory {0}" .format (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: Log.debug(self, "Setting maxmemory variable to {0} " "in redis.conf" @@ -1782,21 +1764,28 @@ class WOStackController(CementBaseController): "# maxmemory ", "maxmemory {0}" .format - (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") - WOFileUtils.chown(self, '/etc/redis/redis.conf', - 'redis', - 'redis', - recursive=False) - WOService.restart_service(self, 'redis-server') + (int(wo_ram*1024*1024*0.2))) + 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") + WOFileUtils.chown(self, '/etc/redis/redis.conf', + 'redis', + 'redis', + recursive=False) + WOService.restart_service(self, 'redis-server') if 'mariadb-server' in apt_packages: # setting innodb memory usage wo_ram = psutil.virtual_memory().total / (1024 * 1024) diff --git a/wo/core/variables.py b/wo/core/variables.py index f565cff..ddefb2a 100644 --- a/wo/core/variables.py +++ b/wo/core/variables.py @@ -10,7 +10,7 @@ class WOVariables(): """Intialization of core variables""" # WordOps version - wo_version = "3.9.7.1" + wo_version = "3.9.7.2" # WordOps packages versions wo_wp_cli = "2.2.0" wo_adminer = "4.7.2"