Add initial meta-stx to support StarlingX build
[pti/rtp.git] / meta-stx / recipes-support / puppet / files / stx-puppet / 0010-puppet-manifest-apply-workaround-to-ignore-known-err.patch
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
5
6 Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
7 ---
8  puppet-manifests/src/bin/puppet-manifest-apply.sh | 4 +++-
9  1 file changed, 3 insertions(+), 1 deletion(-)
10
11 diff --git a/puppet-manifests/src/bin/puppet-manifest-apply.sh b/puppet-manifests/src/bin/puppet-manifest-apply.sh
12 index 18eec2c..3ac6cfc 100755
13 --- a/puppet-manifests/src/bin/puppet-manifest-apply.sh
14 +++ b/puppet-manifests/src/bin/puppet-manifest-apply.sh
15 @@ -89,6 +89,8 @@ function finish {
16  }
17  trap finish EXIT
18  
19 +# Pattern for know errors, will be ignored when checking errors
20 +KNOWN_ERRORS="Error.*remount /scratch"
21  
22  # Set Keystone endpoint type to internal to prevent SSL cert failures during config
23  export OS_ENDPOINT_TYPE=internalURL
24 @@ -105,7 +107,7 @@ if [ $? -ne 0 ]; then
25      echo "See ${LOGFILE} for details"
26      exit 1
27  else
28 -    grep -qE '^(.......)?Error|^....-..-..T..:..:..([.]...)?(.......)?.Error' ${LOGFILE}
29 +    grep -E -v "${KNOWN_ERRORS}" ${LOGFILE} | grep -qE '^(.......)?Error|^....-..-..T..:..:..([.]...)?(.......)?.Error'
30      if [ $? -eq 0 ]; then
31          echo "[ERROR]"
32          echo "Errors found. See ${LOGFILE} for details"
33 -- 
34 2.7.4
35