diff --git a/packstack/modules/ospluginutils.py b/packstack/modules/ospluginutils.py index 4ee5dd165..2c9067169 100644 --- a/packstack/modules/ospluginutils.py +++ b/packstack/modules/ospluginutils.py @@ -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'), diff --git a/tests/test_ospluginutils.py b/tests/test_ospluginutils.py index 9b455710a..9021aca25 100644 --- a/tests/test_ospluginutils.py +++ b/tests/test_ospluginutils.py @@ -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)