Repository navigation
[17.0-stable] pillar: report nested-app runtime status errors - #7167
andrewd-zededa wants to merge 2 commits into
Conversation
zedrouter now fetches the runtime's status (e.g. cloud-init failures) from GET /api/v1/runtime/status and publishes it as a new AppRuntimeStatus topic, keyed by app instance UUID, unpublishing it once the runtime is no longer polled. zedmanager copies it into a new AppInstanceStatus.RuntimeErr field, kept apart from the lifecycle error so neither replaces the other. zedagent reports RuntimeErr as an additional AppErr entry with its own severity, LPS reports it when there is no lifecycle error, and diag prints it. The runtime's errors are guest-controlled, and publishing an oversized pubsub message is fatal, so the conversion keeps at most 4 entries of 160 bytes each, highest severity first, and notes how many were omitted. ErrorTime is the latest timestamp the runtime reported. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 15b08bb) Signed-off-by: Andrew Durbin <andrewd@zededa.com>
Cover runtimeStatusToErrorDescription's entry and length limits, severity ordering and normalization, deterministic output, and timestamp selection, check that a hostile runtime cannot push the published AppRuntimeStatus near the pubsub message limit, and check that fetchHTTPData reports a 404 as an httpStatusError. Check that zedmanager copies AppRuntimeStatus into RuntimeErr without touching the lifecycle error, that TruncateErrors also bounds RuntimeErr, and that zedagent reports both errors in AppErr without empty entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit e93e312) Signed-off-by: Andrew Durbin <andrewd@zededa.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 17.0-stable #7167 +/- ##
===============================================
+ Coverage 23.53% 24.17% +0.64%
===============================================
Files 517 527 +10
Lines 95838 97563 +1725
===============================================
+ Hits 22556 23590 +1034
- Misses 71370 72102 +732
+ Partials 1912 1871 -41 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Claude finished @rene's task in 2m 20s —— View job Review: PR #7167 — backport of #6890 to
|
|
Evetest: Claude chose to skip 18 test/suite name(s) as unrelated to or redundant for this PR. Which ones and why: run summary. Comment |
Description
Backport of #6890
Report errors from a nested-app runtime (for example, a failure applying
cloud-init config) as app errors, next to the existing lifecycle error.
GET /api/v1/runtime/statusalongside theexisting nested-app metrics, and publishes the result as a new
AppRuntimeStatustopic keyed by the app instance UUID. The topic isunpublished once the runtime is no longer polled (halt, re-address or
delete). A runtime without this endpoint answers 404, which is logged at
trace level only.
AppInstanceStatus.RuntimeErrfield, keptapart from the lifecycle error so neither replaces the other.
RuntimeErras an additionalAppErrentry with its ownseverity. LPS reports it when there is no lifecycle error, and diag prints
it.
The runtime's errors are guest-controlled, and publishing an oversized pubsub
message is fatal, so the conversion keeps at most 4 entries of 160 bytes each,
highest severity first, and notes how many were omitted.
Both commits are cherry-picked with
-xand applied unchanged.PR dependencies
17.0-stable): re-pinspkg/pillarto the eve-apirevision carrying
nestedappinstancemetrics.RuntimeStatus.The MemoryDriver change notifications that
TestSyncRuntimeErrwaits on(#5348) predate this branch, so unlike the
16.0-stablebackport (#7118) noother backport is needed.
How to test and validate this PR
Unit tests (automated):
Changelog notes
Errors reported by a nested-app runtime, such as cloud-init failures, are now
shown as app errors.
PR Backports
This is the backport
Checklist
For backport PRs (remove it if it's not a backport):
And the last but not least:
check them.
Please, check the boxes above after submitting the PR in interactive mode.
🤖 Generated with Claude Code