Skip to content

Commit

Permalink
Merge pull request #369 from holland-backup/innodb_recovery.debug
Browse files Browse the repository at this point in the history
Innodb recovery.debug
  • Loading branch information
soulen3 authored Feb 13, 2024
2 parents 502dc66 + 698ff24 commit 2e1d260
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions holland/core/command/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ class Command(object):
description = " "

def __init__(self):
if self.name in SUBPARSER.choices:
self.optparser = SUBPARSER.choices[self.name]
return
self.optparser = SUBPARSER.add_parser(
self.name,
help=f"{self.name} {self.description}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def mariabackup_version():
raise BackupError("Failed to run %s: [%d] %s" % cmdline, exc.errno, exc.strerror)

for line in process.stdout:
LOG.info("%s", line.rstrip())
LOG.info("# %s", line.rstrip().decode("UTF-8"))
process.wait()
if process.returncode != 0:
raise BackupError("%s returned failure status [%d]" % (cmdline, process.returncode))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ def __call__(self, event, snapshot_fsm, snapshot):
LOG.info("%s has stopped", mysqld_exe)

if mysqld.returncode != 0:
LOG.error("Configuration file was:")
LOG.error("#######################")
for line in open(os.path.join(mycnf_path), "r"):
LOG.error("%s", line.rstrip())
LOG.error("#######################")
datadir = self.mysqld_config["datadir"]
for line in open(os.path.join(datadir, "innodb_recovery.log"), "r"):
LOG.error("%s", line.rstrip())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def xtrabackup_version():
line = line.rstrip().decode("UTF-8")
if "version" in line:
xtrabackup_version = re.search(r"version\s*([\d.]+)", line).group(1)
LOG.info("%s", line)
LOG.info("# %s", line)

process.wait()
if process.returncode != 0:
Expand Down

0 comments on commit 2e1d260

Please sign in to comment.