From 53c5069dae5a2a395eb5d807458919ef0dce9f88 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Mon, 11 May 2015 18:39:59 +0530 Subject: [PATCH 1/3] Updated MySQLTuner to fix issue MariaDB conflict --- ee/cli/plugins/stack.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ee/cli/plugins/stack.py b/ee/cli/plugins/stack.py index 5d242489..0e59f405 100644 --- a/ee/cli/plugins/stack.py +++ b/ee/cli/plugins/stack.py @@ -719,6 +719,9 @@ class EEStackController(CementBaseController): except CommandExecutionError as e: Log.error(self, "Unable to update MySQL file") + # Set MySQLTuner permission + EEFileUtils.chmod(self, "/usr/bin/mysqltunner", 0o775) + EEGit.add(self, ["/etc/mysql"], msg="Adding MySQL into Git") EEService.reload_service(self, 'mysql') @@ -1486,6 +1489,13 @@ class EEStackController(CementBaseController): Log.debug(self, "Setting apt_packages variable for MySQL") if not EEShellExec.cmd_exec(self, "mysqladmin ping"): apt_packages = apt_packages + EEVariables.ee_mysql + packages = packages + [["https://raw." + "githubusercontent.com/" + "major/MySQLTuner-perl" + "/master/mysqltuner.pl", + "/usr/bin/mysqltuner", + "MySQLTuner"]] + else: Log.debug(self, "MySQL connection is already alive") Log.info(self, "MySQL connection is already alive") @@ -1671,6 +1681,7 @@ class EEStackController(CementBaseController): if self.app.pargs.mysql: Log.debug(self, "Removing apt_packages variable of MySQL") apt_packages = apt_packages + EEVariables.ee_mysql + packages = packages + ['/usr/bin/mysqltuner'] if self.app.pargs.postfix: Log.debug(self, "Removing apt_packages variable of Postfix") apt_packages = apt_packages + EEVariables.ee_postfix @@ -1784,6 +1795,7 @@ class EEStackController(CementBaseController): if self.app.pargs.mysql: Log.debug(self, "Purge apt_packages variable MySQL") apt_packages = apt_packages + EEVariables.ee_mysql + packages = packages + ['/usr/bin/mysqltuner'] if self.app.pargs.postfix: Log.debug(self, "Purge apt_packages variable PostFix") apt_packages = apt_packages + EEVariables.ee_postfix From 2739d229e9213cfbd6db12dea2689e377ec66709 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Mon, 11 May 2015 18:40:51 +0530 Subject: [PATCH 2/3] Removed MySQLtuner from global variable --- ee/core/variables.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ee/core/variables.py b/ee/core/variables.py index 7c4cb57f..4461a910 100644 --- a/ee/core/variables.py +++ b/ee/core/variables.py @@ -107,7 +107,7 @@ class EEVariables(): ee_mysql_repo = ("deb http://mirror.aarnet.edu.au/pub/MariaDB/repo/" "10.0/debian {codename} main" .format(codename=ee_platform_codename)) - ee_mysql = ["mariadb-server", "mysqltuner", "percona-toolkit"] + ee_mysql = ["mariadb-server", "percona-toolkit"] # Postfix repo and packages ee_postfix_repo = "" From d40dcb7a666e56e294c2b0493e5ff7a14d39e84a Mon Sep 17 00:00:00 2001 From: gau1991 Date: Mon, 11 May 2015 18:56:18 +0530 Subject: [PATCH 3/3] Fixed Typos --- ee/cli/plugins/stack.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ee/cli/plugins/stack.py b/ee/cli/plugins/stack.py index 0e59f405..c13d0b7d 100644 --- a/ee/cli/plugins/stack.py +++ b/ee/cli/plugins/stack.py @@ -720,7 +720,7 @@ class EEStackController(CementBaseController): Log.error(self, "Unable to update MySQL file") # Set MySQLTuner permission - EEFileUtils.chmod(self, "/usr/bin/mysqltunner", 0o775) + EEFileUtils.chmod(self, "/usr/bin/mysqltuner", 0o775) EEGit.add(self, ["/etc/mysql"], msg="Adding MySQL into Git") EEService.reload_service(self, 'mysql')