Skip to content

docs(baseosmgr): add architecture document#5921

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

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

Conversation

@eriknordmark
Copy link
Copy Markdown
Contributor

Description

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

  • Overview of baseosmgr's responsibilities (the A/B partition state
    machine, the install worker that does the dd, mirroring grubenv into
    the published ZbootStatus, surfacing the previous boot's
    RebootReason onto a failed BaseOsStatus, the kubevirt drain gate,
    the force-fallback knob, and the retry-update counter).
  • Key Input/Output — every pubsub topic that baseosmgr publishes
    or consumes (BaseOsConfig, BaseOsStatus, ZbootConfig/ZbootStatus,
    BaseOSMgrStatus, NodeAgentStatus, ZedAgentStatus, ContentTreeStatus,
    NodeDrainStatus/NodeDrainRequest, ConfigItemValueMap), the
    on-disk state under /persist/status/ and /persist/checkpoint/,
    and the GRUB-env writes via pkg/pillar/zboot.
  • Components — explained per source file (baseosmgr.go,
    handlebaseos.go, forcefallback.go, handledownload.go,
    handlevolumemgr.go, worker.go, handlenodedrain.go).
  • Control flow — five walkthroughs covering boot/onboarding,
    controller-driven new BaseOsConfig, content-tree progress, the
    test-complete commit, and the reboot-after-failed-update path,
    plus the two side channels (force-fallback, retry-update).
  • Debugging — pubsub paths, persistent files of interest, useful
    log greps, and how to force each transition during dev (including
    the existing eden tests).

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/baseosmgr/ and the
related types (types.BaseOsConfig, types.BaseOsStatus,
types.ZbootConfig, types.ZbootStatus, types.BaseOSMgrStatus,
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/baseosmgr.md describing the responsibilities,
pubsub inputs and outputs, internal logical components, control flow
through the five main paths (boot, BaseOsConfig install, content-tree
progress, test-complete commit, reboot-after-failed-update) plus the
force-fallback and retry-update side channels, and a debugging section.
Structured to mirror the existing nim.md and nodeagent.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 baseosmgr-architecture-doc branch from e0d1938 to e5b260d Compare May 20, 2026 14:10
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