fix: use force unmount to fix pod stuck terminating issue
This commit is contained in:
Родитель
a18349d828
Коммит
e2743f7ad4
|
@ -131,16 +131,16 @@ unmount() {
|
|||
exit 0
|
||||
fi
|
||||
|
||||
echo "`date` EXEC: umount $MNTPATH, devname: $devname" >>$LOG
|
||||
/bin/umount $MNTPATH >> $LOG 2>&1
|
||||
echo "`date` EXEC: umount -f $MNTPATH, devname: $devname" >>$LOG
|
||||
/bin/umount -f $MNTPATH >> $LOG 2>&1
|
||||
if [ "$?" != "0" ]; then
|
||||
errorLog=`tail -n 1 "${LOG}"`
|
||||
err "{ \"status\": \"Failed\", \"message\": \"Failed to unmount volume at ${MNTPATH}, error log:${errorLog}\" }"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "`date` EXEC: rm -r ${MNTPATH}" >> $LOG
|
||||
rm -r "${MNTPATH}" >> $LOG 2>&1
|
||||
echo "`date` EXEC: rmdir ${MNTPATH}" >> $LOG
|
||||
rmdir "${MNTPATH}" >> $LOG 2>&1
|
||||
|
||||
log '{"status": "Success"}'
|
||||
exit 0
|
||||
|
|
Загрузка…
Ссылка в новой задаче