Skip to content

Commit

Permalink
Merge pull request #56 from matrixorigin/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
aronchanisme authored Jan 7, 2024
2 parents 382d210 + 5528691 commit ecd12e2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 11 deletions.
33 changes: 24 additions & 9 deletions .github/workflows/unit_test_linux_ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1565,12 +1565,16 @@ jobs:
fi
- name: Test_11. Auto clean old backup
# disable auto backup since it may affect below tests
mo_ctl auto_backup disable
- name: Test_11. Clean old backup (Manual)
run: |
echo "----------------------------------"
echo "Clean backup manually"
mo_ctl clean_backup
echo "Show backup path"
ls -lth ${{ env.BACKUP_PATH }}
for dir in `ls ${{ env.BACKUP_PATH }}`; do
Expand All @@ -1579,6 +1583,16 @@ jobs:
ls -lth ${{ env.BACKUP_PATH }}/${dir}/
done
dir_count=`ls ${{ env.BACKUP_PATH }}/${RUN_MONTH}/ | wc -l`
if [[ ${dir_count} -ne 0 ]]; then
echo "dir_count: ${dir_count} is not 0, seems like clean backup has failed"
exit 1
fi
- name: Test_12. Clean old backup (Auto)
run: |
echo "----------------------------------"
echo "Test backup manually"
echo ""
Expand All @@ -1596,21 +1610,22 @@ jobs:
echo "Sleep 600s"
sleep 600
echo "Show backup path"
ls -lth ${{ env.BACKUP_PATH }}/
for dir in `ls ${{ env.BACKUP_PATH }}`; do
echo "Show backup path: ls -lth ${{ env.BACKUP_PATH }}/${RUN_MONTH}/"
ls -lth ${{ env.BACKUP_PATH }}/${RUN_MONTH}/
for dir in `ls ${{ env.BACKUP_PATH }}${RUN_MONTH}/`; do
echo "----------------------------------"
echo "Listing files in ${{ env.BACKUP_PATH }}/${dir}/"
ls -lth ${{ env.BACKUP_PATH }}/${dir}/
ls -lth ${{ env.BACKUP_PATH }}/${RUN_MONTH}/${dir}/
done
dir_count=`ls ${{ env.BACKUP_PATH }} | wc -l`
dir_count=`ls ${{ env.BACKUP_PATH }}/${RUN_MONTH}/ | wc -l`
if [[ ${dir_count} -ne 0 ]]; then
echo "dir_count: ${dir_count} is 0, seems like auto_clean_old_backup has failed"
echo "dir_count: ${dir_count} is not 0, seems like auto_clean_old_backup has failed"
exit 1
fi
echo "check log path ${MO_CTL_TOOL_LOG_PATH}/auto_backup/"
ls -lth ${MO_CTL_TOOL_LOG_PATH}/auto_backup/
Expand Down
3 changes: 1 addition & 2 deletions bin/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@ function replace_mo_confs()
for conf_file_name in ${CONF_FILE_NAME_LIST[*]}; do
add_log "I" "Conf source path MO_CONF_SRC_PATH: ${MO_CONF_SRC_PATH}, file name: ${conf_file_name}"
if [[ ! -f "${MO_CONF_SRC_PATH}/${conf_file_name}" ]]; then
add_log "E" "File does not exist or is not set"
rc=1
add_log "W" "File does not exist or is not set, skipping"
else
add_log "D" "Copy conf file: cp -f ${MO_CONF_SRC_PATH}/${conf_file_name} ${MO_PATH}/matrixone/etc/launch/${conf_file_name}"
if ! cp ${MO_CONF_SRC_PATH}/${conf_file_name} ${MO_PATH}/matrixone/etc/launch/${conf_file_name}; then
Expand Down

0 comments on commit ecd12e2

Please sign in to comment.