-
Notifications
You must be signed in to change notification settings - Fork 332
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #965 from dholt/slurm-epi-tmp-fix
Improved cleanup in Slurm epilog
- Loading branch information
Showing
18 changed files
with
20 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions
9
roles/slurm/templates/etc/slurm/epilog.d/42-lastuserjob-cleanup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env bash | ||
set -ex | ||
|
||
if [[ -n "$SLURM_JOB_USER" && "$SLURM_JOB_USER" != "root" ]]; then | ||
logger -s -t slurm-epilog 'Removed residual user files' | ||
for dir in /tmp /dev/shm ; do | ||
find "${dir}" -user "${SLURM_JOB_USER}" -print0 | xargs -0 -r rm -fr ||: | ||
done | ||
fi |
6 changes: 6 additions & 0 deletions
6
roles/slurm/templates/etc/slurm/epilog.d/80-exclusive-cleanup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
set -ex | ||
|
||
# Cleanup caches | ||
sync | ||
echo 3 > /proc/sys/vm/drop_caches |
20 changes: 0 additions & 20 deletions
20
roles/slurm/templates/etc/slurm/epilog.d/80-exclusive-tmpfiles
This file was deleted.
Oops, something went wrong.