Revert "Fix false-negative failure report for mysqldump backup"

The approach merged in I2c10ae7b6b6094af7819594e889385b0ed77fe4b is not
a complete solution, mysqldump will dump warning to stderr too which
should not break the backup process. A better fix would be doing checks
against the stderr logs just like the InnoBackupEx strategy does.

See also: https://bugs.launchpad.net/trove/+bug/1756806

This reverts commit 49fea478ee.

Change-Id: Ia8f938619de48b7c0d2efd6753897335a8ebce41
This commit is contained in:
Zhao Chao 2018-03-19 19:05:44 +08:00 committed by Yang Youseok
parent c75d6705bc
commit 43ce5981ec
3 changed files with 5 additions and 2 deletions

View File

@ -34,7 +34,8 @@ class MySQLDump(base.BackupRunner):
@property
def cmd(self):
user_and_pass = (
' --password=%(password)s -u %(user)s' %
' --password=%(password)s -u %(user)s '
'2>/tmp/mysqldump.log' %
{'password': MySqlApp.get_auth_password(),
'user': ADMIN_USER_NAME})
cmd = ('mysqldump'

View File

@ -213,6 +213,7 @@ class BackupAgentTest(trove_testtools.TestCase):
' --opt'
' --password=123'
' -u os_admin'
' 2>/tmp/mysqldump.log'
' | gzip |'
' openssl enc -aes-256-cbc -salt '
'-pass pass:default_aes_cbc_key')

View File

@ -90,7 +90,8 @@ XTRA_BACKUP_INCR = ('sudo innobackupex --stream=xbstream'
' /var/lib/mysql/data'
' 2>/tmp/innobackupex.log')
SQLDUMP_BACKUP_RAW = ("mysqldump --all-databases %(extra_opts)s "
"--opt --password=password -u os_admin")
"--opt --password=password -u os_admin"
" 2>/tmp/mysqldump.log")
SQLDUMP_BACKUP = SQLDUMP_BACKUP_RAW % {'extra_opts': ''}
SQLDUMP_BACKUP_EXTRA_OPTS = (SQLDUMP_BACKUP_RAW %
{'extra_opts': '--events --routines --triggers'})