Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

[kube-runtime] fix runtime bug #3776

Merged
merged 1 commit into from
Oct 29, 2019
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
4 changes: 2 additions & 2 deletions src/kube-runtime/src/init
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ PAI_LOG_DIR=${PAI_WORK_DIR}/logs/${FC_POD_UID}

# Move previous logs to another folder. Notice: exclude for init.log, new log will append to previous log file
LOG_FILES=$(find $PAI_LOG_DIR -maxdepth 1 -type f ! -name "init.log")
if [[ ! -z $LOG_FILES ]]; then
if [[ ! -z "$LOG_FILES" ]]; then
echo "[WARN] $PAI_LOG_DIR not empty, contains previous results"
PRE_LOG_DIR=$PAI_LOG_DIR/prelog_$RANDOM
while [[ -d $PRE_LOG_DIR ]]
Expand All @@ -100,7 +100,7 @@ if [[ ! -z $LOG_FILES ]]; then
fi

# Clean ${PAI_WORK_DIR} since it may contain last execution content. (rarely happen, but seen in real world)
find ${PAI_WORK_DIR} -maxdepth 1 -type f -exec rm {} \;
find ${PAI_WORK_DIR} -maxdepth 1 -mindepth 1 ! -name "logs" -exec rm -rf {} \;


# Move all runtime sources to PAI_WORK_DIR
Expand Down