Additional logs for Mariadb restore strategy

This patch adds additional debug log messages when executing
mysqld_safe script phase responsible for root password reset.

Change-Id: I1f2b6dbf28dfddb7d0c57c26873c2cba8e8ff130
Co-Authored-By: Kasper Hasior <k.hasior@samsung.com>
This commit is contained in:
Jacek Kaniuk 2019-03-15 10:54:25 +01:00 committed by Kasper Hasior
parent 75784f94b1
commit aa7149287d
1 changed files with 6 additions and 4 deletions

View File

@ -85,10 +85,12 @@ class MySQLRestoreMixin(object):
run_as_root=True, root_helper="sudo")
utils.execute("chown", "mysql:mysql", run_dir, err_log_file.name,
init_file.name, run_as_root=True, root_helper="sudo")
child = pexpect.spawn(
"sudo mysqld_safe --init-file=%s --log-error=%s" %
(init_file.name, err_log_file.name))
command_mysql_safe = ("sudo mysqld_safe"
" --init-file=%s"
" --log-error=%s" %
(init_file.name, err_log_file.name))
LOG.debug("Spawning: %s" % command_mysql_safe)
child = pexpect.spawn(command_mysql_safe)
try:
index = child.expect(['Starting mysqld daemon'])
if index == 0: