Skip to content

Commit 2618b9e

Browse files
Merge pull request #2675 from oracle/backport_pr2664_to_3.3
Backport fix for the auxiliary image error in OWLS-94812 to 3.3 release
2 parents 9bbd609 + d088d82 commit 2618b9e

File tree

1 file changed

+6
-5
lines changed
  • operator/src/main/resources/scripts

1 file changed

+6
-5
lines changed

operator/src/main/resources/scripts/utils.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -722,9 +722,11 @@ function checkAuxiliaryImage() {
722722
rm -f ${AUXILIARY_IMAGE_PATH}/testaccess.tmp || return 1
723723

724724
# The container .out files embed their container name, the names will sort in the same order in which the containers ran
725-
out_files=$(set -o pipefail ; ls -1 $AUXILIARY_IMAGE_PATH/auxiliaryImageLogs/*.out 2>&1 | sort --version-sort) \
726-
|| (trace SEVERE "Auxiliary Image: Assertion failure. No files found in '$AUXILIARY_IMAGE_PATH/auxiliaryImageLogs/*.out" \
727-
&& return 1)
725+
out_files=$(ls -1 $AUXILIARY_IMAGE_PATH/auxiliaryImageLogs/*.out 2>/dev/null | sort --version-sort)
726+
if [ -z "${out_files}" ]; then
727+
trace SEVERE "Auxiliary Image: Assertion failure. No files found in '$AUXILIARY_IMAGE_PATH/auxiliaryImageLogs/*.out'"
728+
return 1
729+
fi
728730
severe_found=false
729731
for out_file in $out_files; do
730732
if [ "$(grep -c SEVERE $out_file)" != "0" ]; then
@@ -742,8 +744,7 @@ function checkAuxiliaryImage() {
742744
trace "Auxiliary Image: End of '${out_file}' contents"
743745
done
744746
[ "${severe_found}" = "true" ] && return 1
745-
rm -fr $AUXILIARY_IMAGE_PATH/auxiliaryImageLogs
746-
[ -z "$(ls -A $AUXILIARY_IMAGE_PATH)" ] \
747+
[ -z "$(ls -A $AUXILIARY_IMAGE_PATH 2>/dev/null | grep -v auxiliaryImageLogs)" ] \
747748
&& trace SEVERE "Auxiliary Image: No files found in '$AUXILIARY_IMAGE_PATH'. " \
748749
"Do your auxiliary images have files in their '$AUXILIARY_IMAGE_PATH' directories? " \
749750
"This path is configurable using the domain resource 'spec.auxiliaryImageVolumes.mountPath' attribute." \

0 commit comments

Comments
 (0)