BuildKite: Make disk usage monitoring message more helpful.

PiperOrigin-RevId: 557305229
This commit is contained in:
Etienne Perot
2023-08-15 17:47:10 -07:00
committed by gVisor bot
parent 181360c23e
commit fbf87399d3
+5 -2
View File
@@ -2,9 +2,12 @@ set -euo pipefail
if POSIXLY_CORRECT=true df --local --output=pcent,ipcent,target | grep -vE '/snap/' | grep -qE '9[4-9]%|100%'; then
echo "Disk usage has reached critical level, node is bad." >&2
echo "Automated monitoring should recycle this node soon." >&2
echo "If this made your build pipeline fail, sorry!" >&2
echo "Try your luck again." >&2
sudo df -h --local | sed -r 's/^/[df] /' >&2
sleep 3
sudo poweroff
sleep 10
killall buildkite-agent
exit 1
fi