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

This commit is contained in:
Zuul 2018-03-07 09:08:32 +00:00 committed by Gerrit Code Review
commit ad496c0798
3 changed files with 2 additions and 5 deletions

View File

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

View File

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

View File

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