1 From 1735d6504b319c2d05ffbd2ae8ff6a4515982aed Mon Sep 17 00:00:00 2001
2 From: Jackie Huang <jackie.huang@windriver.com>
3 Date: Sun, 19 Apr 2020 21:38:59 +0800
4 Subject: [PATCH] puppet-manifest-apply: workaround to ignore known errors
6 puppet-manifest-apply.sh will exit if there is any ERROR message in the
7 puppet log, but the "remount /scratch" error is known to be harmless
8 and the mount point is actually mounted succesfully, so add a workaround
9 to ignore known errors in the log so the puppet manifest can complete.
11 Upstream-Status: Inappropriate [workaround]
13 Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
15 puppet-manifests/src/bin/puppet-manifest-apply.sh | 4 +++-
16 1 file changed, 3 insertions(+), 1 deletion(-)
18 diff --git a/puppet-manifests/src/bin/puppet-manifest-apply.sh b/puppet-manifests/src/bin/puppet-manifest-apply.sh
19 index 18eec2c..3ac6cfc 100755
20 --- a/puppet-manifests/src/bin/puppet-manifest-apply.sh
21 +++ b/puppet-manifests/src/bin/puppet-manifest-apply.sh
22 @@ -89,6 +89,8 @@ function finish {
26 +# Pattern for know errors, will be ignored when checking errors
27 +KNOWN_ERRORS="Error.*remount /scratch"
29 # Set Keystone endpoint type to internal to prevent SSL cert failures during config
30 export OS_ENDPOINT_TYPE=internalURL
31 @@ -105,7 +107,7 @@ if [ $? -ne 0 ]; then
32 echo "See ${LOGFILE} for details"
35 - grep -qE '^(.......)?Error|^....-..-..T..:..:..([.]...)?(.......)?.Error' ${LOGFILE}
36 + grep -E -v "${KNOWN_ERRORS}" ${LOGFILE} | grep -qE '^(.......)?Error|^....-..-..T..:..:..([.]...)?(.......)?.Error'
39 echo "Errors found. See ${LOGFILE} for details"