Skip to content

OWLS-94812 - Fix for auxiliary image error after the main container crashes and restarts. #2664

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 15, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions operator/src/main/resources/scripts/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -722,9 +722,11 @@ function checkAuxiliaryImage() {
rm -f ${AUXILIARY_IMAGE_PATH}/testaccess.tmp || return 1

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