Use existing CNF_INCLUDE_DIR to create mysql-flavor directory

Just replaced a hardcoded value with already defined variable.
Also removed the trailing slash from the path to pass the tests.

Change-Id: I5e68475c3bc659c2b92e831a1db4474908681d89
This commit is contained in:
Tomasz Nowak
2017-02-23 14:08:32 +01:00
committed by Dariusz Król
parent e9cc6ca372
commit 09aa831010

View File

@@ -75,7 +75,7 @@ MYSQL_CONFIG = {operating_system.REDHAT: "/etc/my.cnf",
MYSQL_BIN_CANDIDATES = ["/usr/sbin/mysqld", "/usr/libexec/mysqld"]
MYSQL_OWNER = 'mysql'
CNF_EXT = 'cnf'
CNF_INCLUDE_DIR = '/etc/mysql/conf.d/'
CNF_INCLUDE_DIR = '/etc/mysql/conf.d'
CNF_MASTER = 'master-replication'
CNF_SLAVE = 'slave-replication'
@@ -764,9 +764,8 @@ class BaseMySqlApp(object):
pass
def _create_mysql_confd_dir(self):
conf_dir = "/etc/mysql/conf.d"
LOG.debug("Creating %s.", conf_dir)
operating_system.create_directory(conf_dir, as_root=True)
LOG.debug("Creating %s.", CNF_INCLUDE_DIR)
operating_system.create_directory(CNF_INCLUDE_DIR, as_root=True)
def _enable_mysql_on_boot(self):
LOG.debug("Enabling MySQL on boot.")