Skip to content

docs(nodeagent): add architecture document#5913

Open
eriknordmark wants to merge 1 commit into
lf-edge:masterfrom
eriknordmark:nodeagent-architecture-doc
Open

docs(nodeagent): add architecture document#5913
eriknordmark wants to merge 1 commit into
lf-edge:masterfrom
eriknordmark:nodeagent-architecture-doc

Conversation

@eriknordmark
Copy link
Copy Markdown
Contributor

Description

Adds pkg/pillar/docs/nodeagent.md — a new architecture document
describing the nodeagent microservice. The document mirrors the
structure of the existing pkg/pillar/docs/nim.md:

  • Overview of nodeagent's responsibilities (A/B baseos upgrade,
    reboot/shutdown/poweroff, health-timer-driven reset, reboot-reason
    reconstruction, maintenance-mode aggregation).
  • Key Input/Output — every pubsub topic that nodeagent
    publishes/consumes plus the on-disk state under /persist/,
    /run/global/, etc.
  • Components — explained per source file (nodeagent.go,
    handletimers.go, handlebaseos.go/handlezboot.go,
    handlenodedrain.go, plus the maintenance-mode helpers), since
    unlike NIM the agent is not split across packages.
  • Control flow — four walkthroughs covering boot/onboarding,
    the periodic timer tick, controller-driven device operations and
    the full baseos upgrade lifecycle.
  • Debugging — pubsub paths, persistent files of interest,
    useful log greps, and how to force each transition during dev.

No production code changes; documentation only.

PR dependencies

None.

How to test and validate this PR

This is a documentation-only change. Validation is by review of the
content against the source under pkg/pillar/cmd/nodeagent/ and the
related types (types.NodeAgentStatus, types.ZbootConfig,
types.ZbootStatus, kubeapi.NodeDrainStatus).

No automated test is required.

Changelog notes

No user-facing changes.

PR Backports

  • 16.0-stable: No, documentation-only addition.
  • 14.5-stable: No, documentation-only addition.
  • 13.4-stable: No, documentation-only addition.

Checklist

  • I've provided a proper description
  • I've added the proper documentation
  • I've tested my PR on amd64 device — N/A, docs only
  • I've tested my PR on arm64 device — N/A, docs only
  • I've written the test verification instructions
  • I've set the proper labels to this PR

Adds pkg/pillar/docs/nodeagent.md describing the responsibilities,
pubsub inputs and outputs, internal logical components, control flow
through the four main paths (boot/onboarding, periodic timer tick,
controller-driven device operation, baseos upgrade) and a debugging
section. Structured to mirror the existing nim.md so the pillar docs
remain consistent across microservices.

Signed-off-by: eriknordmark <erik@zededa.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@eriknordmark eriknordmark force-pushed the nodeagent-architecture-doc branch from 463045b to 79dfb33 Compare May 20, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant