mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
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:
committed by
GitHub
parent
817fb4e67a
commit
563c00fb2c
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user