Repository navigation
feat(status): report running and linked sysext versions and warn about pending activations - #460
Conversation
…sfers together, add the operation lock Phase 1 of plan 0001 (ADR-0016).
…activations Phase 3 of plan 0001 (ADR-0016).
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
frostyard-machines
left a comment
There was a problem hiding this comment.
Murbella (snosi owner): host and image review of the last commit (feat(status): …), comment only. I do not approve.
Verdict: no blocking finding. RUNNING comes only from the hierarchy metadata, and LINKED from the link, so PENDING REBOOT means exactly "the next boot changes this sysext". Read errors stay per row. No write path changes. The refresh warning covers the 3 commands ADR-0016 names.
Non-blocking:
- Deactivations are not listed.
activationPendingneeds a non-empty link, so a sysext that is merged but has no link (for example afterfeatures disablewithout--now) does not appear. A refresh unmerges it under its running workload (docker, incus, k3s). That is the same risk as an activation. List "merged, not linked" too, or say in the docs that the list shows activations only. - SDK and GUI callers. The warning goes to the reporter. A GUI that calls
EnableFeaturewith--nowsemantics shows nothing unless it readsPendingActivations. Say indocs/specs/sdk-api.mdthat a caller must show this list before it refreshes. - snosi follow-up (mine, not for this PR).
snosi-update-statusand the motd can showpending_rebootfromupdex features check --jsonnext to the staged image state. I will do that in Phase 7.
Needs a real host (plan "Done when"): a host with a pending revision shows RUNNING ≠ LINKED, and RUNNING = the new revision after a reboot. Only a real systemd-sysext writes the origin file that this reads. Host test plan: see my comment on #462.
Review follow-up (Murbella): a sysext that is merged but not linked is unmerged by the refresh; list it, and tell SDK callers to show the list.
…ature-wide hold and rollback across an image update
|
Concern: the refresh warning misses other host sysexts when using -C / ClientConfig.Definitions. In I reproduced this against commit Please include normal host definitions when collecting refresh warnings, unioned with custom definitions as needed and deduplicated by link name. Keep the actual update scope limited to the custom directory. Add regression coverage for this case. Separately, this head includes #458 and still inherits the rollback defect reported there. |
…re failures Review follow-up (bsherman, blocking): a regular file at the link path is hard-linked to a backup before any link moves and renamed back when a later transfer fails; other non-symlink entries are refused up front; restore failures are joined into the returned error.
Review follow-up (bsherman): with ClientConfig.Definitions set, the refresh warning also reads the host's normal definitions.
… into feat/running-linked-status # Conflicts: # .coverage-baseline # updex/features.go
|
Fixed in 7553429 (Lucilla). #458's fix is merged in 7643010.
|
Review follow-up (bsherman): when the transfer whose link failed cannot be restored, its result and the returned error carry the restore failure and say that the link may point at the new version.
… into feat/running-linked-status
…tatus # Conflicts: # .coverage-baseline # docs/specs/sdk-api.md # sysext/manager_test.go # updex/features.go
Summary
Stacked on #458 (Phase 1). This branch contains #458's commit plus one commit,
feat(status): …. Review only the commits after #458's:feat(status): …and the review follow-up2846e71(deactivations in the refresh warning, and a rule for SDK callers to showPendingActivations). Merge #458 first, then rebase this PR. It targetsmain, because the Tests workflow runs only for PRs intomain.Phase 3 of plan 0001, which implements ADR-0016, "Status and logs" (the
features check/listcolumns and the refresh warning). I stacked it because Phase 5 builds its "why not linked" output on these columns, and theUpdateFeatureschanges overlap with #458.features checkandfeatures listreport the version that is merged now (running_version, from the.systemd-sysexthierarchy metadata, ADR-0015) and the version that the link names (linked_version, the version the next boot merges).CheckResultgainsrunning_version,linked_versionandpending_reboot.current_versionis unchanged.FeatureInfogainstransfer_status(omitzero).checkcolumns areFEATURE COMPONENT CURRENT RUNNING LINKED NEWEST UPDATE.listaddsRUNNING LINKED.PENDING REBOOT: …when LINKED differs from RUNNING.unknownis not counted as pending, because it cannot be compared.sysext.MergedVersionInreads only the hierarchy metadata. It ignores a legacyCurrentSymlinkand/run/extensions, because those mean "about to merge", not "merged now".list. It never breaks the listing.features updatewithout--no-refresh,features enable --nowandfeatures disable --nowlist the other linked-but-not-merged sysexts that the refresh activates too. The list goes to a reporter warning before the refresh, and toPendingActivationsin the result.update, they are all enabled features' transfers, so the list is mostly disabled features with a pending link.disable --nowreads the state before the unmerge.Checks
make fmtmake ci:==> CI gate passedlocally on the stacked branch. Coverage is 87.9%, and.coverage-baselineis bumped.updex/status_test.go: 7 link and merge states through bothFeaturesandCheckFeatures; several transfers; a disabled feature; an unreadable merged state; a manifest failure that keeps the status; the refresh warning forupdate,enable --nowanddisable --now, including nothing pending, an own link,--no-refresh, a dry run and a component-scoped run.cmd/updex/features_status_test.go: text columns and footer, and the JSON shape.tests/e2e: the JSON shape with the real binary. It covers keys only, because the binary cannot be pointed at temp hierarchies.Risk classification
Rationale:
sysext/**, but only with a new read-only helper. No write path changes.readLimitedFile).Docs housekeeping
README.md,docs/design/overview.mdanddocs/specs/sdk-api.mdupdatedVerification
node scripts/check-docs.mjsgreenNot verified on a real host. Plan 0001's "Done when" for this phase, a host with a pending revision that shows
RUNNING≠LINKED, needs one.