Repository navigation
[16.0-stable] pillar: report nested-app runtime status errors - #7118
Merged
Merged
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) Backport note: pkg/pillar/docs/types-architecture.md does not exist on 16.0-stable, so its hunk is dropped. 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>
andrewd-zededa
requested review from
christoph-zededa,
eriknordmark,
milan-zededa and
rouming
as code owners
November 13, 2026 19:58
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 16.0-stable #7118 +/- ##
================================================
+ Coverage 0 33.55% +33.55%
================================================
Files 0 15 +15
Lines 0 2962 +2962
================================================
+ Hits 0 994 +994
- Misses 0 1968 +1968 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
9 tasks
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.
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
-x. One adaptation:pkg/pillar/docs/types-architecture.mddoes not exist on16.0-stable(itcame with #5897, which is not backported), so the first commit's hunk for it is
dropped. The commit message records this. Everything else applied unchanged.
PR dependencies
Both are merged into
16.0-stable:pkg/pillarto the eve-api revision carryingnestedappinstancemetrics.RuntimeStatus.TestSyncRuntimeErrwaits on.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