Repository navigation
fix(network): measure node data sizes from inside the k3d node - #922
Merged
Merged
Conversation
obol network status showed "Data exec unknown · cons unknown": local-path PVC directories belong to each client's uid (often 10001 or root, mode 2770), so the CLI's walk as the user counted nothing. When the host walk can't read a node's execution-*/consensus-* dirs, obol now runs one read-only `du -sk -- /data/<ns>/<pvc>...` inside the k3d node container (paths as separate argv, no shell; 20s bound; follows Ctrl-C). k3d backend only; anything still unreadable stays "unknown". Sizes are allocated KiB from du, cached for a minute as before.
… on disk One-shot network status took ~5 s warm / ~18 s cold after the node du landed (rc0: 0.25 s). - data sizes are cached in <StateDir>/network/sizes.json (0600, atomic, keyed by namespace and data dir); a size under 5 min old skips du - on a TTY the first frame draws at once and fills in as probes finish (pending parts show a spinner, e.g. "Data measuring... · 1.2 TiB free"); a stale size is shown marked "(2h ago, refreshing...)" and the run waits at most 3 s for the refresh, then a detached `obol network status --refresh-sizes` updates the cache (one at a time, lock file; up to 15 min so large nodes get measured) - output taller than the terminal falls back to printing once; Ctrl-C restores the cursor - JSON, pipes, NO_COLOR and dumb terminals: unchanged (wait, print once, same exit codes); JSON storage gains measured_at and stale - --watch fills its first tick progressively and re-measures in the background without blanking values
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
obol network status showed "Data exec unknown · cons unknown": local-path PVC directories belong to each client's uid (often 10001 or root, mode 2770), so the CLI's walk as the user counted nothing.
When the host walk can't read a node's execution-/consensus- dirs, obol now runs one read-only
du -sk -- /data/<ns>/<pvc>...inside the k3d node container (paths as separate argv, no shell; 20s bound; follows Ctrl-C). k3d backend only; anything still unreadable stays "unknown". Sizes are allocated KiB from du, cached for a minute as before.