Merge "Ignore errors prefetching database_grant"
This commit is contained in:
@@ -89,6 +89,9 @@ def gethostlist(CONF):
|
|||||||
_error_exceptions = [
|
_error_exceptions = [
|
||||||
# puppet preloads a provider using the mysql command before it is installed
|
# puppet preloads a provider using the mysql command before it is installed
|
||||||
re.compile('Command mysql is missing'),
|
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
|
# swift puppet module tries to install swift-plugin-s3, there is no such
|
||||||
# pakage on RHEL, fixed in the upstream puppet module
|
# pakage on RHEL, fixed in the upstream puppet module
|
||||||
re.compile('yum.*?install swift-plugin-s3'),
|
re.compile('yum.*?install swift-plugin-s3'),
|
||||||
|
|||||||
@@ -45,3 +45,14 @@ class OSPluginUtilsTestCase(TestCase):
|
|||||||
fp.close()
|
fp.close()
|
||||||
|
|
||||||
self.assertRaises(PackStackError, validate_puppet_logfile, filename)
|
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user