1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-23 22:50:09 +03:00

feature #2464: retry file deletion in common tm files

This commit is contained in:
Javi Fontan 2013-11-19 18:49:34 +01:00
parent e5114aac33
commit cb06ac782e

View File

@ -43,6 +43,15 @@ DST_PATH=`arg_path $DST`
DST_HOST=`arg_host $DST`
log "Deleting $DST_PATH"
ssh_exec_and_log $DST_HOST "rm -rf $DST_PATH" "Error deleting $DST_PATH"
exit 0
delete_file="ssh $DST_HOST \"rm -rf $DST_PATH\""
retry 10 "$delete_file"
EXEC_RC=$?
if [ $EXEC_RC -ne 0 ]; then
log_error "Command \"$delete_file\" failed: $EXEC_RC"
error_message "Error deleting $DST_PATH"
exit $EXEC_RC
fi