| Files | Last commit | Last update |
|---|---|---|
A gVisor actor whose sandbox dies gets a final usage record with its CPU up to the crash (#3174) When a gVisor sandbox dies on its own (#2695), the ateworker tears the actor down and writes its final usage record. That record repeated the last periodic sample, because the code assumed "the sandbox, and its cgroup, are gone". The cgroup and its counters stay until the teardown's `runsc delete` removes them (#2258 relies on the same thing), so the CPU used since the last sample, up to one `--usage-sample-interval`, was missing. Found on ate-dev: after killing a running actor's sandbox, its final record was dated at the initial reading, 37s before the kill, with the initial reading's CPU. - **CPU at death, no memory.** The crash path now reads the cgroup before the teardown (`readDeadFinal`). Its CPU counter and memory peak are still right, but its memory went with the processes, so memory usage and working set are left out: no one measured them at the death. `WorkloadStatsSample` gets a new `memory_unmeasured` field, so a sample can say "CPU measured, memory not" without changing the existing fields; the worker sets it for any reading of a sandbox with no process left, and `UsageAttrs` leaves the two keys out when it is set. That also covers `GetActiveWorkloadStats`, which can serve the stored sample before the teardown. This follows kubelet, whose memory series for a dead container just ends. Checkpoint and Terminate read while the sandbox runs, so their records keep every measurement. - **One order for every teardown.** `endActivation` reads, tears down, then writes the final record. TerminateWorkload and the crash path both use it, so the order is pinned in one place. - **Tests.** `TestWatchSandboxCrashWritesFinal` drives the watcher through a sandbox that exits, with a fake teardown that removes the cgroup as `runsc delete` does, and checks the emitted final record: CPU and peak at death, no memory usage or working set, and the crash reported. `TestEndActivationLiveFinalKeepsMemory` checks that a terminate's final record keeps all four, and `TestUsageAttrsUnsetMemory` the key omission. With the crash path reverted to skip the read, the watcher test fails with `final cpu.time = "1.234567", want 2`; without the clearing, the crash tests fail on memory. - **Docs.** The events registry, the `final` brief, and the guide no longer say a crashed activation has no final record. A sandbox that dies on its own gets one on both runtimes (since #2695); a lost worker still does not. The registry also says the two memory keys are absent on a gVisor crash's final record. The micro-VM path is unchanged: once the VM is down, there is no guest to read, so its newest sample stands in. - [x] Tests pass - [x] Appropriate changes to documentation are included in the PR --------- Signed-off-by: Tim Bai <timbai@google.com> | 4 days ago | |
Update Copyright for CNCF. All Code was donated, accept only "The Agent Substrate Authors" going forward (#3644) <!-- The PR title becomes the release note. Write it for users. --> Why is this needed? (Or link the issue. Open one first for features, API, install or CI changes.) This project was donated to the CNCF sandbox, for some time now we've accepted either Google LLC or The Agent Substrate Authors. Consolidate on the latter, and stop accepting new files with the former. <!-- e.g. "AI-assisted, I reviewed and tested it." No AI co-author trailers. --> AI use: .... technically to help vet the bash command, but this is a mechanical change. The bash fu is included in the commit message. <!-- Breaking change? Describe what users must do on upgrade and ask for the `breaking-change` label. --> - [x] Tests pass - [x] Docs updated --------- Signed-off-by: Benjamin Elder <bentheelder@google.com> | 22 days ago | |
Update Copyright for CNCF. All Code was donated, accept only "The Agent Substrate Authors" going forward (#3644) <!-- The PR title becomes the release note. Write it for users. --> Why is this needed? (Or link the issue. Open one first for features, API, install or CI changes.) This project was donated to the CNCF sandbox, for some time now we've accepted either Google LLC or The Agent Substrate Authors. Consolidate on the latter, and stop accepting new files with the former. <!-- e.g. "AI-assisted, I reviewed and tested it." No AI co-author trailers. --> AI use: .... technically to help vet the bash command, but this is a mechanical change. The bash fu is included in the commit message. <!-- Breaking change? Describe what users must do on upgrade and ask for the `breaking-change` label. --> - [x] Tests pass - [x] Docs updated --------- Signed-off-by: Benjamin Elder <bentheelder@google.com> | 22 days ago | |
Update Copyright for CNCF. All Code was donated, accept only "The Agent Substrate Authors" going forward (#3644) <!-- The PR title becomes the release note. Write it for users. --> Why is this needed? (Or link the issue. Open one first for features, API, install or CI changes.) This project was donated to the CNCF sandbox, for some time now we've accepted either Google LLC or The Agent Substrate Authors. Consolidate on the latter, and stop accepting new files with the former. <!-- e.g. "AI-assisted, I reviewed and tested it." No AI co-author trailers. --> AI use: .... technically to help vet the bash command, but this is a mechanical change. The bash fu is included in the commit message. <!-- Breaking change? Describe what users must do on upgrade and ask for the `breaking-change` label. --> - [x] Tests pass - [x] Docs updated --------- Signed-off-by: Benjamin Elder <bentheelder@google.com> | 22 days ago | |
Update Copyright for CNCF. All Code was donated, accept only "The Agent Substrate Authors" going forward (#3644) <!-- The PR title becomes the release note. Write it for users. --> Why is this needed? (Or link the issue. Open one first for features, API, install or CI changes.) This project was donated to the CNCF sandbox, for some time now we've accepted either Google LLC or The Agent Substrate Authors. Consolidate on the latter, and stop accepting new files with the former. <!-- e.g. "AI-assisted, I reviewed and tested it." No AI co-author trailers. --> AI use: .... technically to help vet the bash command, but this is a mechanical change. The bash fu is included in the commit message. <!-- Breaking change? Describe what users must do on upgrade and ask for the `breaking-change` label. --> - [x] Tests pass - [x] Docs updated --------- Signed-off-by: Benjamin Elder <bentheelder@google.com> | 22 days ago | |
A gVisor actor whose sandbox dies gets a final usage record with its CPU up to the crash (#3174) When a gVisor sandbox dies on its own (#2695), the ateworker tears the actor down and writes its final usage record. That record repeated the last periodic sample, because the code assumed "the sandbox, and its cgroup, are gone". The cgroup and its counters stay until the teardown's `runsc delete` removes them (#2258 relies on the same thing), so the CPU used since the last sample, up to one `--usage-sample-interval`, was missing. Found on ate-dev: after killing a running actor's sandbox, its final record was dated at the initial reading, 37s before the kill, with the initial reading's CPU. - **CPU at death, no memory.** The crash path now reads the cgroup before the teardown (`readDeadFinal`). Its CPU counter and memory peak are still right, but its memory went with the processes, so memory usage and working set are left out: no one measured them at the death. `WorkloadStatsSample` gets a new `memory_unmeasured` field, so a sample can say "CPU measured, memory not" without changing the existing fields; the worker sets it for any reading of a sandbox with no process left, and `UsageAttrs` leaves the two keys out when it is set. That also covers `GetActiveWorkloadStats`, which can serve the stored sample before the teardown. This follows kubelet, whose memory series for a dead container just ends. Checkpoint and Terminate read while the sandbox runs, so their records keep every measurement. - **One order for every teardown.** `endActivation` reads, tears down, then writes the final record. TerminateWorkload and the crash path both use it, so the order is pinned in one place. - **Tests.** `TestWatchSandboxCrashWritesFinal` drives the watcher through a sandbox that exits, with a fake teardown that removes the cgroup as `runsc delete` does, and checks the emitted final record: CPU and peak at death, no memory usage or working set, and the crash reported. `TestEndActivationLiveFinalKeepsMemory` checks that a terminate's final record keeps all four, and `TestUsageAttrsUnsetMemory` the key omission. With the crash path reverted to skip the read, the watcher test fails with `final cpu.time = "1.234567", want 2`; without the clearing, the crash tests fail on memory. - **Docs.** The events registry, the `final` brief, and the guide no longer say a crashed activation has no final record. A sandbox that dies on its own gets one on both runtimes (since #2695); a lost worker still does not. The registry also says the two memory keys are absent on a gVisor crash's final record. The micro-VM path is unchanged: once the VM is down, there is no guest to read, so its newest sample stands in. - [x] Tests pass - [x] Appropriate changes to documentation are included in the PR --------- Signed-off-by: Tim Bai <timbai@google.com> | 4 days ago | |
A gVisor actor whose sandbox dies gets a final usage record with its CPU up to the crash (#3174) When a gVisor sandbox dies on its own (#2695), the ateworker tears the actor down and writes its final usage record. That record repeated the last periodic sample, because the code assumed "the sandbox, and its cgroup, are gone". The cgroup and its counters stay until the teardown's `runsc delete` removes them (#2258 relies on the same thing), so the CPU used since the last sample, up to one `--usage-sample-interval`, was missing. Found on ate-dev: after killing a running actor's sandbox, its final record was dated at the initial reading, 37s before the kill, with the initial reading's CPU. - **CPU at death, no memory.** The crash path now reads the cgroup before the teardown (`readDeadFinal`). Its CPU counter and memory peak are still right, but its memory went with the processes, so memory usage and working set are left out: no one measured them at the death. `WorkloadStatsSample` gets a new `memory_unmeasured` field, so a sample can say "CPU measured, memory not" without changing the existing fields; the worker sets it for any reading of a sandbox with no process left, and `UsageAttrs` leaves the two keys out when it is set. That also covers `GetActiveWorkloadStats`, which can serve the stored sample before the teardown. This follows kubelet, whose memory series for a dead container just ends. Checkpoint and Terminate read while the sandbox runs, so their records keep every measurement. - **One order for every teardown.** `endActivation` reads, tears down, then writes the final record. TerminateWorkload and the crash path both use it, so the order is pinned in one place. - **Tests.** `TestWatchSandboxCrashWritesFinal` drives the watcher through a sandbox that exits, with a fake teardown that removes the cgroup as `runsc delete` does, and checks the emitted final record: CPU and peak at death, no memory usage or working set, and the crash reported. `TestEndActivationLiveFinalKeepsMemory` checks that a terminate's final record keeps all four, and `TestUsageAttrsUnsetMemory` the key omission. With the crash path reverted to skip the read, the watcher test fails with `final cpu.time = "1.234567", want 2`; without the clearing, the crash tests fail on memory. - **Docs.** The events registry, the `final` brief, and the guide no longer say a crashed activation has no final record. A sandbox that dies on its own gets one on both runtimes (since #2695); a lost worker still does not. The registry also says the two memory keys are absent on a gVisor crash's final record. The micro-VM path is unchanged: once the VM is down, there is no guest to read, so its newest sample stands in. - [x] Tests pass - [x] Appropriate changes to documentation are included in the PR --------- Signed-off-by: Tim Bai <timbai@google.com> | 4 days ago |
| Files | Last commit | Last update |
|---|---|---|
| 4 days ago | ||
| 22 days ago | ||
| 22 days ago | ||
| 22 days ago | ||
| 22 days ago | ||
| 4 days ago | ||
| 4 days ago |