Merge "Ignore errors prefetching database_grant"

This commit is contained in:
Jenkins
2013-02-08 12:22:33 +00:00
committed by Gerrit Code Review
2 changed files with 14 additions and 0 deletions

View File

@@ -89,6 +89,9 @@ def gethostlist(CONF):
_error_exceptions = [
# puppet preloads a provider using the mysql command before it is installed
re.compile('Command mysql is missing'),
# puppet preloads a database_grant provider which fails if /root/.my.cnf
# this is ok because it will be retried later if needed
re.compile('Could not prefetch database_grant provider.*?\\.my\\.cnf'),
# swift puppet module tries to install swift-plugin-s3, there is no such
# pakage on RHEL, fixed in the upstream puppet module
re.compile('yum.*?install swift-plugin-s3'),

View File

@@ -45,3 +45,14 @@ class OSPluginUtilsTestCase(TestCase):
fp.close()
self.assertRaises(PackStackError, validate_puppet_logfile, filename)
def test_validate_puppet_logfile_okerror(self):
filename = os.path.join(self.tempdir, "puppet.log")
fp = open(filename, "w")
fp.write("err: Could not prefetch database_grant provider 'mysql': "
"Execution of '/usr/bin/mysql --defaults-file=/root/.my.cnf "
"mysql -Be describe user' returned 1: Could not open required"
" defaults file: /root/.my.cnf")
fp.close()
validate_puppet_logfile(filename)