Skip to content

zedagent: report size of EFI and IMGx partitions#5976

Merged
eriknordmark merged 4 commits into
lf-edge:masterfrom
eriknordmark:zinfo-storage-partition-fields
May 21, 2026
Merged

zedagent: report size of EFI and IMGx partitions#5976
eriknordmark merged 4 commits into
lf-edge:masterfrom
eriknordmark:zinfo-storage-partition-fields

Conversation

@eriknordmark
Copy link
Copy Markdown
Contributor

@eriknordmark eriknordmark commented May 20, 2026

Description

The info report's storageList now identifies each entry by its GPT
role, so a controller can tell which entry is the EFI partition,
which is IMGA vs IMGB, and how large each is on a given device.
The new partitionLabel, partitionTypeGuid, and partitionUuid
fields on ZInfoStorage are sourced from lsblk PARTLABEL/PARTTYPE/PARTUUID and propagate volumemgr → DiskMetric
→ zedagent. They are empty for whole-disk entries (e.g. sda), for
partitions on non-GPT disks, and for directory entries (IsDir == true).

The first commit bumps eve-api to pull in
lf-edge/eve-api#146,
which added the three new proto fields; the second commit is the
pillar code that populates them.

How to test and validate this PR

On a GPT-partitioned device (any current EVE installer image
qualifies — the EFI/CONFIG/IMGA/IMGB/P3 layout is GPT):

  1. Boot EVE built from this PR and let it report info to the controller.
  2. Inspect the latest device info message (e.g. via
    eden controller edge-node info against an eden setup, or directly
    in adam's stored payload).
  3. Confirm storageList contains entries with partitionLabel
    {EFI System, CONFIG, IMGA, IMGB, P3} for the corresponding
    partitions, with their partitionUuid matching
    lsblk -o NAME,PARTUUID from the running EVE.
  4. Confirm the whole-disk entry (e.g. sda) and any directory entries
    (/persist/log, /persist/checkpoint, etc.) leave the three new
    fields empty.

Changelog notes

ZInfoStorage entries now include GPT partition identity (label, type
GUID, PARTUUID) when applicable, so a controller can identify
partitions by role and read their sizes.

PR Backports

  • 16.0-stable: No — feature addition tied to a new eve-api revision,
    not a stable-branch fix.
  • 14.5-stable: No.
  • 13.4-stable: No.

@eriknordmark eriknordmark marked this pull request as ready for review May 20, 2026 14:20
@eriknordmark eriknordmark force-pushed the zinfo-storage-partition-fields branch 2 times, most recently from 82baa6d to 8eaeb13 Compare May 20, 2026 21:57
@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 21.08%. Comparing base (241bcc1) to head (8eaeb13).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5976      +/-   ##
==========================================
+ Coverage   20.65%   21.08%   +0.43%     
==========================================
  Files         489      499      +10     
  Lines       90373    92105    +1732     
==========================================
+ Hits        18665    19420     +755     
- Misses      70130    70926     +796     
- Partials     1578     1759     +181     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rene
Copy link
Copy Markdown
Contributor

rene commented May 21, 2026

@eriknordmark , you need to resolve the conflicts....

@eriknordmark eriknordmark force-pushed the zinfo-storage-partition-fields branch 2 times, most recently from 2b7bdd7 to f871ed1 Compare May 21, 2026 10:50
eriknordmark and others added 4 commits May 21, 2026 13:02
Pulls in lf-edge/eve-api#146 to add three optional GPT-identity fields
to ZInfoStorage (partitionLabel, partitionTypeGuid, partitionUuid) for
per-partition entries in ZInfoDevice.storageList, and catches up
remaining eve-api changes since the prior bump.

Signed-off-by: eriknordmark <erik@zededa.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The info report's storageList now identifies each entry by its GPT
role, so a controller can tell which entry is the EFI partition,
which is IMGA vs IMGB, and how large each is on a given device. The
new partitionLabel, partitionTypeGuid, and partitionUuid fields on
ZInfoStorage are sourced from lsblk PARTLABEL/PARTTYPE/PARTUUID and
propagate volumemgr -> DiskMetric -> zedagent. They are empty for
whole-disk entries (e.g. sda), for partitions on non-GPT disks, and
for directory entries (IsDir == true).

Signed-off-by: eriknordmark <erik@zededa.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Splits the JSON decode out of FindDisksPartitions into a pure
parseLsblkPartitions helper so the parser can be exercised without
shelling out to lsblk, and covers it with a table-driven test: an
EVE GPT layout, an MBR disk where PARTLABEL/PARTUUID are empty,
the empty-list case, and two malformed-input cases.

Signed-off-by: eriknordmark <erik@zededa.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Advances each eve subproject's pinned pillar pseudo-version to the
current upstream tip and re-vendors pillar accordingly, then refreshes
pkg/debug/Dockerfile's FROM lfedge/eve-recovertpm and
pkg/installer/Dockerfile's FROM lfedge/eve-debug references to match
the resulting content hashes. Companion to the preceding eve-api
bump: make bump-eve-api's vendor step also re-rolls each subproject's
hand-edited pillar copy against its stale pseudo-version pin, so this
follow-up restores live-pillar parity and walks the resulting
Dockerfile-hash cascade.

Signed-off-by: eriknordmark <erik@zededa.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@eriknordmark eriknordmark force-pushed the zinfo-storage-partition-fields branch from f871ed1 to d13c934 Compare May 21, 2026 11:12
@eriknordmark eriknordmark merged commit aa7ce4c into lf-edge:master May 21, 2026
30 of 31 checks passed
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.

2 participants