Repository navigation
Description
Split from #3654.
Problem: #3654 removes the models that no tier of a node serves, but nothing confirms that the free space stays. A model pull fills the store again, and the kubelet deletes images at 85% and evicts pods under DiskPressure. Why deferred: The check waits on an outside event. The prune must run on the live node, and the node must send 7 days of samples before the answer exists. Acceptance criteria: - node_filesystem_avail_bytes{mountpoint=/, instance=``} stays above 25% for 7 days after the prune. - LocalPathNodeDiskHigh does not fire for the node in those 7 days. - ollama list in a tier pod on the node shows each model that k8s/README.md says the node keeps. - A comment on #3654 holds the query and the result.
Proposed design
Problem statement
The prune of #3654 removes the models that no tier of a node serves. Nothing confirms that the freed space stays. A later model pull fills the root filesystem again, and the kubelet deletes images at 85% used and evicts pods under DiskPressure. This item records the 7-day free-space query in k8s/README.md, so the next prune has a method to repeat. The 7-day measurement itself waits on the live node, and a new issue holds it.
Acceptance criteria
Requirement: The free-space query is in the runbook
k8s/README.md SHALL state the PromQL query that reports the free space of one node's root filesystem over the 7 days after a prune, with the 0.25 bound that makes the check pass.
Scenario: The recorded query
- WHEN A test reads the section of
k8s/README.mdthat describes the check. - THEN It finds
node_filesystem_avail_bytes,node_filesystem_size_bytes,mountpoint="/", aninstancematcher, a[7d]range and0.25.
Requirement: A test holds the recorded query
The test SHALL name each part of the recorded query, so that a removal fails it.
Scenario: A part of the query is missing
- WHEN The section no longer holds one of the parts that the test names.
- THEN The test fails and names the part that it did not find.
Existing Tool Considered
No alternatives check has run. Prometheus, scraped by the k8s-monitoring chart with node-exporter, covers the measurement. It serves node_filesystem_avail_bytes and node_filesystem_size_bytes for the root filesystem of each node, and it keeps 30 days of samples. It lacks two things: it cannot shorten the 7-day wait, and it cannot list the models of a tier pod. ollama list answers the second. The remaining change builds no code, so it has no written cost. It adds one section to k8s/README.md and one test.
Key questions
- Which series report the free space of a node's root filesystem?:
node_filesystem_avail_bytesandnode_filesystem_size_bytes, withmountpoint="/". node-exporter serves both series. ThehostMetricsblock of the k8s-monitoring chart keeps every series that node-exporter serves, with no allow list.LocalPathNodeDiskHighreads the same two series. [sources: k8s/monitoring/prometheus-values.yaml:301, k8s/README.md:458] - Does Prometheus keep the 7 days of samples that the query reads?: Yes.
server.retentionis 30d, so the samples of the 7 days after the prune stay.server.retentionSizeis 16GB, which sits above 30 days of samples. [sources: k8s/monitoring/prometheus-values.yaml, k8s/README.md] - Which expression states that the root filesystem stays above 25% free?: Divide
node_filesystem_avail_bytesbynode_filesystem_size_bytes, withmountpoint="/", theinstanceof the node and a[7d]range. The check passes while the ratio stays above 0.25, so the failing query selects samples at or below 0.25. (best practice) [sources: k8s/monitoring/prometheus-values.yaml:301, k8s/README.md:458]- Chosen: Ratio of available bytes to size bytes. node-exporter serves both series for each filesystem, and the ratio states the percentage of the criterion.
- Rejected:
node_filesystem_avail_bytesalone. The series is a byte count, so no threshold states 25%. - Rejected:
node_filesystem_free_bytesalone. Free bytes are a byte count too, and they leave out the space that only root may use.
- Does
LocalPathNodeDiskHighprove the 25% bound?: No. The rule fires at 85% used, 10 points above the 75% bound, and only after 15 minutes. It guards the image deletion of the kubelet. The ratio query states the bound. [sources: k8s/monitoring/prometheus-values.yaml:301, k8s/README.md:481, tests/prometheus/test_k8s_monitoring_alerting.py] - How does the query name the node?: By the
instancelabel of the node-exporter series. The section gives one query for each node that mounts the model directory/var/lib/ollama. Each of these nodes has its own root filesystem and its own model store. (best practice) [sources: k8s/monitoring/prometheus-values.yaml:301, k8s/README.md:387]- Chosen: One query for each node, matched by
instance. Each node has its own root filesystem and model store, so one result says nothing about another node. - Rejected: One query with no
instancematcher. The result then mixes every node, and a full node hides behind the others. - Rejected: The control-plane node alone. The control-plane node holds the store of the slow tier, and each GPU node holds its own store.
- Chosen: One query for each node, matched by
- Where does the query live, and where does the result go?: The query goes into
k8s/README.md, beside the alert and the tier notes, because that file is the runbook for the cluster. The result goes into a comment on fix(k8s): free the root disk of the control-plane node #3654, becauseCONTRIBUTING.mdputs test results and the history of the issue in a comment. (best practice) [sources: k8s/README.md:387, CONTRIBUTING.md, AGENTS.md]- Chosen: The query in
k8s/README.md, and the result in a comment on fix(k8s): free the root disk of the control-plane node #3654.k8s/README.mdis the runbook for the cluster, andCONTRIBUTING.mdputs test results and the history of the issue in a comment. - Rejected: Both in a comment on fix(k8s): free the root disk of the control-plane node #3654. The next prune then has no method to repeat, and
k8s/README.mdis the documented place for cluster steps. - Rejected: Both in
k8s/README.md. The README describes every cluster, so a measurement of one node dates it.
- Chosen: The query in
- Does the 7-day measurement belong in this item?: No. The measurement waits on the live prune of fix(k8s): free the root disk of the control-plane node #3654 and on 7 days of samples, and no pull request delivers that wait. This item records the query, and a test holds it. A new issue holds the 7-day measurement and the comment on fix(k8s): free the root disk of the control-plane node #3654. (best practice) [sources: k8s/README.md:387]
- Chosen: Record the query now, and defer the 7-day measurement. A pull request delivers the runbook section and its test, and the measurement needs a live node and 7 days of samples.
- Rejected: Keep the whole item and mark it blocked. A blocked item delivers nothing during the wait, and the runbook gains no method to repeat.
- Rejected: Defer the whole item. The runbook section and its test are a document change that a pull request delivers now.
- Which test holds the recorded query?:
tests/prometheus/test_k8s_monitoring_alerting.py. That module already readsk8s/README.mdwith_readme_section, so it holds a section of the runbook against a rule. [sources: tests/prometheus/test_k8s_monitoring_alerting.py]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Alternatives check of 2026-11-07: not-applicable.
Class: test, no search.
Tool: none found.
Activity
devops-cli-service commentedon Nov 5, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
testprefix of the title gives the type.(k8s)scope of the title gives the scope.It verifies a shipped fix but blocks no other work.It confirms the prune is durable and prevents a silent regression.The work is to run queries, wait 7 days, and post a comment.Both target the control-plane root disk; dan-petty/devops-cli#3654 delivers the prune, the candidate confirms the result holds for 7 days.[-]test(k8s): confirm the control-plane root disk stays under 75% for 7 days[/-][+]test(k8s): confirm root disk stays under 75% for 7 days[/+]dan-petty commentedon Nov 6, 2026
The job shortened the title of this item. The summary had 62 characters, and the limit is 60. The type and the scope stay.
test(k8s): confirm the control-plane root disk stays under 75% for 7 daystest(k8s): confirm root disk stays under 75% for 7 daysdevops-cli-service commentedon Nov 6, 2026
Refine cannot set this item to Ready at 235a807 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.
devops-cli-service commentedon Nov 7, 2026
Status set to Ready at a2711a1 (see proposed design in issue body).
Moved to new items: dan-petty/homelab#334.
devops-cli-service commentedon Nov 7, 2026
Alternatives check: not-applicable
Class: test. The check makes no search and no model call for an item of this class.
Tool: none found
Checked on 2026-11-07. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 9, 2026
Staged: branch
test/3660-confirm-root-disk-stays-under-75, draft pull request #4232. The pull request plans the item and closes no issue.The task groups, with the tokens of the inputs of each step, for a budget of 64000 tokens:
The runs of the planner and the review made 57 model request(s), and used 4047522 input tokens and 113043 output tokens. The tool calls, in order:
search_code({"text":"node_filesystem_avail_bytes"})search_code({"text":"_readme_section"})search_code({"text":"LocalPathNodeDiskHigh"})read_issue({"number":3654})read_file({"path":"tests/prometheus/test_k8s_monitoring_alerting.py","start_line":1260,"end_line":1430})read_file({"path":"k8s/README.md","start_line":370,"end_line":510})read_file({"path":"k8s/README.md","start_line":432,"end_line":500})search_code({"text":"retention"})read_file({"path":"k8s/README.md","start_line":315,"end_line":350})read_file({"path":"k8s/monitoring/prometheus-values.yaml","start_line":255,"end_line":330})read_file({"path":"k8s/README.md","start_line":489,"end_line":560})search_code({"text":"Prune unused models"})list_files({"directory":"openspec/changes/archive/2026-11-07-3654-free-the-root-disk-of-the"})read_file({"path":"openspec/changes/archive/2026-11-07-3654-free-the-root-disk-of-the/tasks.md"})read_file({"path":"k8s/README.md","start_line":170,"end_line":200})read_file({"path":"k8s/README.md","start_line":549,"end_line":620})search_code({"text":"K8S_README"})list_files({"directory":"openspec/changes/archive/2026-11-02-2572-the-cloudflare-tunnel-section-of-k8s"})list_files({"directory":"openspec/changes/archive/2026-10-29-1648-k8s-readme-homelab"})find_issues({"terms":"node_filesystem_avail_bytes"})find_issues({"terms":"ollama prune"})read_file({"path":"tests/prometheus/test_k8s_monitoring_alerting.py","start_line":1,"end_line":80})read_file({"path":"tests/prometheus/test_k8s_monitoring_alerting.py","start_line":1200,"end_line":1260})read_issue({"number":4001})read_issue({"number":3659})read_file({"path":"tests/prometheus/test_k8s_monitoring_alerting.py","start_line":520,"end_line":600})search_code({"text":"uv run devops ci test"})search_code({"text":"retentionSize"})read_file({"path":"k8s/monitoring/prometheus-values.yaml","start_line":1,"end_line":60})search_code({"text":"private address"})list_files({"directory":"tests/invariants"})read_file({"path":"tests/prometheus/test_k8s_monitoring_alerting.py","start_line":1250,"end_line":1340})search_code({"text":"_readme_section"})search_code({"text":"LocalPathNodeDiskHigh"})read_issue({"number":3654})read_file({"path":"k8s/README.md","start_line":440,"end_line":570})read_file({"path":"k8s/monitoring/prometheus-values.yaml","start_line":1,"end_line":20})read_issue({"number":4001})list_files({"directory":"tests/invariants"})read_file({"end_line":620,"path":"k8s/README.md","start_line":500})read_file({"end_line":200,"path":"k8s/README.md","start_line":170})read_file({"end_line":320,"path":"k8s/monitoring/prometheus-values.yaml","start_line":290})find_issues({"terms":"node_filesystem_avail_bytes"})read_file({"end_line":40,"path":"tests/invariants/test_committed_addresses.py","start_line":1})search_code({"text":"uv run devops ci test"})read_file({"path":"tests/prometheus/test_k8s_monitoring_alerting.py","start_line":1250,"end_line":1420})read_file({"path":"k8s/monitoring/prometheus-values.yaml","start_line":280,"end_line":330})read_file({"path":"k8s/README.md","start_line":160,"end_line":210})read_file({"path":"k8s/README.md","start_line":370,"end_line":560})read_file({"path":"k8s/README.md","start_line":430,"end_line":580})search_code({"text":"### Receiver"})read_file({"end_line":545,"path":"k8s/README.md","start_line":490})read_file({"end_line":1250,"path":"tests/prometheus/test_k8s_monitoring_alerting.py","start_line":1180})search_code({"text":"node_filesystem_avail_bytes"})search_code({"text":"_readme_section"})search_code({"text":"uv run devops ci test"})read_issue({"number":4001})list_files({"directory":"openspec/specs"})read_file({"path":"k8s/monitoring/prometheus-values.yaml","start_line":1,"end_line":20})read_spec({"capability":"ollama-model-prune"})read_spec({"capability":"local-path-volume-placement"})search_code({"text":"K8S_README"})search_code({"text":"k8s/README.md"})read_file({"end_line":575,"path":"k8s/README.md","start_line":545})read_file({"end_line":120,"path":"tests/k8s/test_k8s_ollama_models.py","start_line":1})read_spec({"capability":"roadmap-plan-check"})read_spec({"capability":"roadmap-refine"})search_code({"text":"0.25"})read_file({"path":"tests/invariants/test_committed_addresses.py","start_line":1,"end_line":30})read_file({"path":"AGENTS.md","start_line":1,"end_line":130})read_file({"path":"openspec/config.yaml"})read_spec({"capability":"roadmap-plan-check","requirement":"The plan reader reports a criterion that the model refuses"})read_spec({"capability":"roadmap-plan-check","requirement":"Plan-check measures each task group"})search_code({"text":"pending-person"})search_code({"text":"Pending a person"})read_spec({"capability":"roadmap-stage"})read_spec({"capability":"roadmap-stage","requirement":"Criteria mapping in the stage reply"})read_spec({"capability":"roadmap-stage","requirement":"An unmapped criterion is refused"})read_issue({"number":3654})find_issues({"terms":"node_filesystem_avail_bytes"})read_file({"end_line":345,"path":"tests/server/routes/test_k8s_roadmap_service.py","start_line":310})search_code({"text":"LocalPathNodeDiskHigh"})read_spec({"capability":"roadmap-stage","requirement":"A finding has one of the nine defect types"})read_spec({"capability":"roadmap-stage","requirement":"An evidence-backed finding returns the plan at most twice"})references({"name":"3660"})search_code({"text":"4001"})read_file({"path":"openspec/changes/archive/2026-11-07-3654-free-the-root-disk-of-the/tasks.md","start_line":1,"end_line":45})read_file({"path":"openspec/changes/archive/2026-11-07-3654-free-the-root-disk-of-the/proposal.md","start_line":45,"end_line":75})search_code({"text":"hostMetrics"})search_code({"text":"node_filesystem_size_bytes"})read_file({"end_line":140,"path":"k8s/monitoring/k8s-monitoring-values.yaml","start_line":80})read_file({"end_line":380,"path":"k8s/monitoring/prometheus-values.yaml","start_line":355})search_code({"text":"comment"})read_file({"path":"CONTRIBUTING.md","start_line":1,"end_line":100})search_code({"text":"history of the issue"})search_code({"text":"test results"})search_code({"text":"ollama list"})search_code({"text":"kubectl -n llm exec"})read_spec({"capability":"roadmap-stage","requirement":"A verify command has the project form"})read_spec({"capability":"roadmap-stage","requirement":"The reader judges every verification command"})read_spec({"capability":"roadmap-stage","requirement":"The plan reader keeps the document work of a group"})read_spec({"capability":"roadmap-stage","requirement":"A task group has a kind"})search_code({"text":"free_space"})search_code({"text":"Free space of the root disk"})read_spec({"capability":"roadmap-stage","requirement":"A plan text is no placeholder"})read_spec({"capability":"roadmap-stage","requirement":"A verify command holds no backtick"})search_code({"text":"def test_command"})search_code({"text":"ci test"})search_code({"text":"[7d]"})search_code({"text":"min_over_time"})search_code({"text":"heading"})search_code({"text":"## Alerting"})read_spec({"capability":"roadmap-stage","requirement":"A claim about every member of a set"})read_spec({"capability":"roadmap-stage","requirement":"The stage prompt asks for the hit count of a negative search"})read_spec({"capability":"roadmap-stage","requirement":"Feasibility quotes a probe line"})read_spec({"capability":"roadmap-stage","requirement":"The probe names the files of a cited bare name"})read_spec({"capability":"roadmap-stage","requirement":"A task group renders without stray punctuation"})read_spec({"capability":"roadmap-stage","requirement":"A text of a group stays on one line"})Tool calls: find_issues=4 (empty=0), list_files=6 (empty=0), read_file=39 (empty=0), read_issue=7 (empty=0), read_spec=23 (empty=0), references=1 (empty=0), search_code=38 (empty=2)
The stage job read the open pull requests and their files in 1 GraphQL request(s).
docs(openspec): plan #3660 Record the root disk free-space query
wip: 1 of 2 tasks of group 1, Record the free-space query in the runb…
test(k8s): Record the free-space query in the runbook and hold it wit…
docs(openspec): archive the change (#3660)
devops-cli-service commentedon Nov 9, 2026
Pull request #4232 is ready for review. The checks passed.
Spend: 25 model requests, 1198559 input tokens, 7939 output tokens.
devops-cli-service commentedon Nov 9, 2026
The runner Job devops-cli-runner-20261109-141006-ad0c ended: succeeded.
Image digest: sha256:0ac3d37efcdffdebfd9323095ae0f968f5951f88464d567878edc1ad61b0187d
The last lines of its log: