Skip to content

Commit

Permalink
Merge pull request flux-framework#6334 from garlick/issue#6176
Browse files Browse the repository at this point in the history
systemd: improve housekeeping drain message
  • Loading branch information
mergify[bot] authored Oct 1, 2024
2 parents 3c1a82d + 97a8eec commit 1215e49
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions etc/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,10 @@ ExecStart=@X_SYSCONFDIR@/flux/system/housekeeping
ExecStopPost=-rm -f @X_RUNSTATEDIR@/flux-housekeeping@%I.env
ExecStopPost=-sh -c '\
if test "$SERVICE_RESULT" != "success"; then \
if test "$EXIT_CODE" = "killed" -o "$EXIT_CODE" = "dumped"; then \
message="killed by SIG${EXIT_STATUS}"; \
elif test "$EXIT_CODE" = "exited"; then \
message="exited with exit code $EXIT_CODE"; \
else \
message="code=$EXIT_CODE status=$EXIT_STATUS"; \
message="housekeeping@%I ${SERVICE_RESULT:-failure}"; \
if test "${EXIT_CODE}${EXIT_STATUS}"; then \
message="$message: $EXIT_CODE $EXIT_STATUS"; \
fi; \
flux resource drain $(flux getattr rank) "housekeeping $message"; \
flux resource drain $(flux getattr rank) $message; \
fi \
'

0 comments on commit 1215e49

Please sign in to comment.