X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=meta-stx%2Frecipes-support%2Fpuppet%2Ffiles%2Fstx-puppet%2F0010-puppet-manifest-apply-workaround-to-ignore-known-err.patch;fp=meta-stx%2Frecipes-support%2Fpuppet%2Ffiles%2Fstx-puppet%2F0010-puppet-manifest-apply-workaround-to-ignore-known-err.patch;h=53f75ced8de3148cc1c897af4786712e1513645e;hb=57fdea704bd62af847872c40508f00aa1d7cac60;hp=0000000000000000000000000000000000000000;hpb=f23f21bccfb750b9e30141fd9676515215ffbc4e;p=pti%2Frtp.git diff --git a/meta-stx/recipes-support/puppet/files/stx-puppet/0010-puppet-manifest-apply-workaround-to-ignore-known-err.patch b/meta-stx/recipes-support/puppet/files/stx-puppet/0010-puppet-manifest-apply-workaround-to-ignore-known-err.patch new file mode 100644 index 0000000..53f75ce --- /dev/null +++ b/meta-stx/recipes-support/puppet/files/stx-puppet/0010-puppet-manifest-apply-workaround-to-ignore-known-err.patch @@ -0,0 +1,35 @@ +From 1735d6504b319c2d05ffbd2ae8ff6a4515982aed Mon Sep 17 00:00:00 2001 +From: Jackie Huang +Date: Sun, 19 Apr 2020 21:38:59 +0800 +Subject: [PATCH] puppet-manifest-apply: workaround to ignore known errors + +Signed-off-by: Jackie Huang +--- + puppet-manifests/src/bin/puppet-manifest-apply.sh | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/puppet-manifests/src/bin/puppet-manifest-apply.sh b/puppet-manifests/src/bin/puppet-manifest-apply.sh +index 18eec2c..3ac6cfc 100755 +--- a/puppet-manifests/src/bin/puppet-manifest-apply.sh ++++ b/puppet-manifests/src/bin/puppet-manifest-apply.sh +@@ -89,6 +89,8 @@ function finish { + } + trap finish EXIT + ++# Pattern for know errors, will be ignored when checking errors ++KNOWN_ERRORS="Error.*remount /scratch" + + # Set Keystone endpoint type to internal to prevent SSL cert failures during config + export OS_ENDPOINT_TYPE=internalURL +@@ -105,7 +107,7 @@ if [ $? -ne 0 ]; then + echo "See ${LOGFILE} for details" + exit 1 + else +- grep -qE '^(.......)?Error|^....-..-..T..:..:..([.]...)?(.......)?.Error' ${LOGFILE} ++ grep -E -v "${KNOWN_ERRORS}" ${LOGFILE} | grep -qE '^(.......)?Error|^....-..-..T..:..:..([.]...)?(.......)?.Error' + if [ $? -eq 0 ]; then + echo "[ERROR]" + echo "Errors found. See ${LOGFILE} for details" +-- +2.7.4 +