-
Notifications
You must be signed in to change notification settings - Fork 49
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 #5894 from garlick/issue#5892
suppress epilog on jobs canceled during shutdown (try no. 2)
- Loading branch information
Showing
4 changed files
with
81 additions
and
1 deletion.
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
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
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
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,29 @@ | ||
#!/bin/sh | ||
|
||
# ensure epilog doesn't run on jobs canceled at shutdown | ||
|
||
cat <<-EOF >t5892.toml | ||
[job-manager] | ||
plugins = [ | ||
{ load = "perilog.so" }, | ||
] | ||
[job-manager.epilog] | ||
command = [ "touch", "t5892-epilog-flag" ] | ||
EOF | ||
|
||
flux start -o,--config-path=t5892.toml \ | ||
flux submit sleep inf | ||
|
||
rc=0 | ||
if test -f t5892-epilog-flag; then | ||
echo The epilog did run, contrary to expectations.>&2 | ||
rc=1 | ||
else | ||
echo The epilog did not run, as expected. >&2 | ||
fi | ||
|
||
rm -f t5892-epilog-flag | ||
rm -f t5892.toml | ||
|
||
exit $rc |