From: Jackie Huang Date: Tue, 3 Nov 2020 08:13:10 +0000 (+0800) Subject: stx-puppet: workaround to ignore known errors X-Git-Tag: f-release~112 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;ds=sidebyside;h=refs%2Fchanges%2F56%2F8156%2F1;hp=3551d057affe4e0de16b2041c409a083111d622b;p=pti%2Frtp.git stx-puppet: workaround to ignore known errors Add a workaround in puppet-manifest-apply to ignore known errors in puppet log so the puppet manifest can complete. The "remount /scratch" error is known to be harmless so add it to be ignored. Issue-ID: INF-215 Signed-off-by: Jackie Huang Change-Id: I916511a8dfdb0a4a26bceeb4fd3e50d91fea7747 --- diff --git a/meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/stx-puppet/0010-puppet-manifest-apply-workaround-to-ignore-known-err.patch b/meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/stx-puppet/0010-puppet-manifest-apply-workaround-to-ignore-known-err.patch new file mode 100644 index 0000000..a351c8a --- /dev/null +++ b/meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/stx-puppet/0010-puppet-manifest-apply-workaround-to-ignore-known-err.patch @@ -0,0 +1,42 @@ +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 + +puppet-manifest-apply.sh will exit if there is any ERROR message in the +puppet log, but the "remount /scratch" error is known to be harmless +and the mount point is actually mounted succesfully, so add a workaround +to ignore known errors in the log so the puppet manifest can complete. + +Upstream-Status: Inappropriate [workaround] + +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 + diff --git a/meta-starlingx/meta-stx-cloud/recipes-support/puppet/stx-puppet_git.bb b/meta-starlingx/meta-stx-cloud/recipes-support/puppet/stx-puppet_git.bb index 3f76a46..e00a952 100644 --- a/meta-starlingx/meta-stx-cloud/recipes-support/puppet/stx-puppet_git.bb +++ b/meta-starlingx/meta-stx-cloud/recipes-support/puppet/stx-puppet_git.bb @@ -37,6 +37,7 @@ SRC_URI = " \ file://${BPN}/0007-puppet-manifests-etcd-override-typo-and-journalctl.patch \ file://${BPN}/0008-puppet-manifests-keystone-include-platform-client.patch \ file://${BPN}/0009-puppet-manifests-lvm-remove-lvmetad.patch \ + file://${BPN}/0010-puppet-manifest-apply-workaround-to-ignore-known-err.patch \ file://${BPN}/get-boot-device-from-cmdline.patch \ file://${BPN}/poky-specific-apply-network-config-script.patch \ file://${BPN}/apply_network_config_poky.sh \