fix(dogfood/coder): suppress du stderr in docker usage metadata (#23200)

Transient 'No such file or directory' errors from disappearing
overlay2 layers during container operations pollute the displayed
metadata value. Redirect stderr to /dev/null.
This commit is contained in:
Mathias Fredriksson
2026-03-18 10:54:13 +02:00
committed by GitHub
parent 817fb4e67a
commit 563c00fb2c
+1 -1
View File
@@ -533,7 +533,7 @@ resource "coder_agent" "dev" {
display_name = "/var/lib/docker Usage"
key = "var_lib_docker_usage"
order = 3
script = "sudo du -sh /var/lib/docker | awk '{print $1}'"
script = "sudo du -sh /var/lib/docker 2>/dev/null | awk '{print $1}'"
interval = 3600 # 1h to avoid thrashing disk
timeout = 60 # Longer than this is likely problematic
}