readable-root allowlist excludes the k3s datastore, blocking control-plane diagnosis #23

Open
opened 2026-08-15 16:53:30 +00:00 by coilyco-ops · 0 comments
Owner

Summary

stat_path cannot reach the k3s datastore, so a live investigation into k3s control-plane CPU and disk write amplification could not be completed through this MCP.

Evidence

stat_path("/var/lib/rancher/k3s/server/db/state.db")
-> Error: path '/var/lib/rancher/k3s/server/db/state.db' is outside the readable-root allowlist

stat_path("/var/lib/rancher/k3s/server/db/state.db-wal")
-> Error: path '/var/lib/rancher/k3s/server/db/state.db-wal' is outside the readable-root allowlist

Context

On 2026-08-15 the k3s-server process on kai-server was measured holding about 4.6 of 28 cores across repeated samples, while the node's NVMe took a sustained write burst at roughly 45 MB/s and about 84% device utilization. Kine/sqlite write amplification is the standard explanation for that shape, and testing it needs the datastore file size and its WAL growth rate. Neither is reachable.

Everything else needed for the investigation was available through this server and worked well. This is the one gap that forced the conclusion to stay at inference.

Ask

Add the k3s datastore directory to the readable-root allowlist, read-only and metadata-only. stat_path returns size, mode, mtime, and type, so exposing the directory grants file size and growth rate without exposing any datastore contents.

Suggested root: /var/lib/rancher/k3s/server/db

If exposing the whole directory is too broad, an explicit allowlist of state.db, state.db-wal, and state.db-shm would be enough.

Acceptance

stat_path returns metadata for the k3s datastore files, and read_text_head remains unable to read them.

## Summary `stat_path` cannot reach the k3s datastore, so a live investigation into k3s control-plane CPU and disk write amplification could not be completed through this MCP. ## Evidence ``` stat_path("/var/lib/rancher/k3s/server/db/state.db") -> Error: path '/var/lib/rancher/k3s/server/db/state.db' is outside the readable-root allowlist stat_path("/var/lib/rancher/k3s/server/db/state.db-wal") -> Error: path '/var/lib/rancher/k3s/server/db/state.db-wal' is outside the readable-root allowlist ``` ## Context On 2026-08-15 the `k3s-server` process on kai-server was measured holding about 4.6 of 28 cores across repeated samples, while the node's NVMe took a sustained write burst at roughly 45 MB/s and about 84% device utilization. Kine/sqlite write amplification is the standard explanation for that shape, and testing it needs the datastore file size and its WAL growth rate. Neither is reachable. Everything else needed for the investigation was available through this server and worked well. This is the one gap that forced the conclusion to stay at inference. ## Ask Add the k3s datastore directory to the readable-root allowlist, read-only and metadata-only. `stat_path` returns size, mode, mtime, and type, so exposing the directory grants file size and growth rate without exposing any datastore contents. Suggested root: `/var/lib/rancher/k3s/server/db` If exposing the whole directory is too broad, an explicit allowlist of `state.db`, `state.db-wal`, and `state.db-shm` would be enough. ## Acceptance `stat_path` returns metadata for the k3s datastore files, and `read_text_head` remains unable to read them.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coilyco-flight-deck/node-stats-mcp#23
No description provided.