Skip to content

zedagent: report the app network interface change capability - #6306

Merged
milan-zededa merged 2 commits into
lf-edge:masterfrom
christoph-zededa:bump_eve-api
Aug 14, 2026
Merged

zedagent: report the app network interface change capability#6306
milan-zededa merged 2 commits into
lf-edge:masterfrom
christoph-zededa:bump_eve-api

Conversation

@christoph-zededa

Copy link
Copy Markdown
Contributor

Description

Follow-up to #6188 (Allow adapter change with restart), which taught
zedmanager/zedrouter to add and remove an application's network interfaces
without purging the app — a restart is enough, so the app's volumes survive the
change. Until now the device had no way to tell the controller that it supports
this, so a controller could not know whether it may offer the cheap
restart-based change or must fall back to a purge.

Two commits:

  1. bump eve-api — bumps github.com/lf-edge/eve-api/go from
    v0.0.0-20260622100545-186e61c68f39 to v0.0.0-20260812180240-99d02ddcfcb0
    in every Go module of the repository (pkg/pillar, pkg/edgeview,
    pkg/newlog, pkg/installer, pkg/recovertpm, pkg/vtpm/swtpm-vtpm,
    pkg/wwan/mmagent, pkg/kube/kube-init, evetest, evetest/sdn/vm,
    evetest/testapps/lps), done via make bump-eve-api. The bump spans three
    eve-api PRs, which is why three generated files move:

    The latter two are carried along by the version bump only; no pillar code
    consumes them in this PR.

  2. pkg/pillar: report allow adapter change capability — a one-line change
    in zedagent: the ZInfoDevice.api_capability field reported to the
    controller goes from API_CAPABILITY_REPORT_TPM_EVENTLOG (21) to
    API_CAPABILITY_APP_INSTANCE_NET_INTERFACE_CHANGE (22).

api_capability is still a single monotonically increasing enum rather than a
bitmap, so raising it to 22 implies everything below it, exactly as before.
(The pre-existing TODO about moving to a bitmap-like representation is left
untouched right above the changed line.)

PR dependencies

Both are already in, so this PR has no open dependencies.

How to test and validate this PR

The advertised behaviour is already covered by the automated tests that landed
with #6188 and needs no re-verification here:

  • evetest/tests/networking/nicchange_test.goTestNICCountChange,
    TestNICCountChangeOrderedInterface
  • evetest/tests/networking/staged_nicchange_test.goTestStagedNICChange
  • evetest/tests/apps/restart_test.goTestAppRestart

What this PR changes is only what the device reports, so validation is:

  1. Build and boot a device from this branch (e.g. make live + make run-live,
    or make ZARCH=arm64 HV=kvm PLATFORM=… installer-raw for real hardware) and
    onboard it to a controller.

  2. Look at the device info message the device sends up and confirm
    api_capability: API_CAPABILITY_APP_INSTANCE_NET_INTERFACE_CHANGE (22)
    instead of API_CAPABILITY_REPORT_TPM_EVENTLOG (21). With the evetest
    harness:

    evetest eve info --tail 1 | grep api_capability

    Programmatically the same field is reachable from
    EdgeDevice.GetDeviceInfo().ApiCapability (evetest/edgedevice.go), if we
    want to assert on it from a test later.

  3. Against a controller that gates the no-purge adapter change on this
    capability: change the set of network adapters of a running app instance and
    confirm the controller performs it as an app restart rather than a
    purge (the app's volumes must survive).

Regression risk is limited to the capability number itself: a controller that
only understands capabilities up to 21 sees a higher number, which is the normal
forward-compatible reading of this field.

What was verified locally

  • gofmt -l pkg/pillar/cmd/zedagent/reportinfo.go — clean.
  • The eve-api version is identical in all 11 go.mod files and all 8
    vendor/modules.txt files, and the new enum value is present in every
    vendored info.pb.go.
  • A native go build ./... of pkg/pillar cannot complete on the dev host
    (libzfs.h missing — an environment gap, unrelated to this change), so the
    compile/test verification is left to CI.

Changelog notes

EVE now reports to the controller that it supports adding and removing an
application's network interfaces without purging the application — the
application is restarted instead and its volumes are preserved. Controllers
that understand this capability can offer the faster restart-based change
instead of a full purge.

PR Backports

Checklist

  • I've provided a proper description
  • I've added the proper documentation
  • I've tested my PR on amd64 device
  • I've tested my PR on arm64 device
  • I've written the test verification instructions
  • I've set the proper labels to this PR

Reasons for the unchecked boxes:

  • Documentation: no in-tree document enumerates the APICapability values
    (grep -r API_CAPABILITY docs/ pkg/pillar/docs/ returns nothing) — the enum
    is documented in eve-api, in capabilities: add capability for adding/removing network interface eve-api#151. Nothing to add here.
  • amd64/arm64 device testing: pending; this PR is a draft until the on-device
    check from step 2 above has been run.
  • Labels: to be set on the PR.

all over the repository

to include the newest capability to report to the controller

Signed-off-by: Christoph Ostarek <christoph@zededa.com>
report to the controller that EVE now supports change
the virtual adapters of an edge app without purge (but restart)

Signed-off-by: Christoph Ostarek <christoph@zededa.com>
@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 24.66%. Comparing base (0a4bdce) to head (0afb10b).
⚠️ Report is 14 commits behind head on master.

Files with missing lines Patch % Lines
pkg/pillar/cmd/zedagent/reportinfo.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6306      +/-   ##
==========================================
+ Coverage   24.28%   24.66%   +0.37%     
==========================================
  Files         512      522      +10     
  Lines       93831    95569    +1738     
==========================================
+ Hits        22786    23571     +785     
- Misses      69244    70002     +758     
- Partials     1801     1996     +195     

☔ View full report in Codecov by Harness.
📢 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.

@christoph-zededa
christoph-zededa marked this pull request as ready for review August 13, 2026 14:44
@milan-zededa
milan-zededa merged commit 52bbeae into lf-edge:master Aug 14, 2026
53 of 54 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