zedagent: report the app network interface change capability - #6306
Merged
Conversation
github-actions
Bot
requested review from
OhmSpectator,
andrewd-zededa,
eriknordmark,
europaul,
milan-zededa,
naiming-zededa,
shjala and
zedi-pramodh
August 13, 2026 11:17
christoph-zededa
force-pushed
the
bump_eve-api
branch
from
August 13, 2026 11:28
7afa18a to
ecddd39
Compare
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>
christoph-zededa
force-pushed
the
bump_eve-api
branch
from
August 13, 2026 12:20
ecddd39 to
0afb10b
Compare
milan-zededa
approved these changes
Aug 13, 2026
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
christoph-zededa
marked this pull request as ready for review
August 13, 2026 14:44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Follow-up to #6188 (Allow adapter change with restart), which taught
zedmanager/zedrouterto add and remove an application's network interfaceswithout 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:
bump eve-api— bumpsgithub.com/lf-edge/eve-api/gofromv0.0.0-20260622100545-186e61c68f39tov0.0.0-20260812180240-99d02ddcfcb0in 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 viamake bump-eve-api. The bump spans threeeve-api PRs, which is why three generated files move:
info: addsAPI_CAPABILITY_APP_INSTANCE_NET_INTERFACE_CHANGE(= 22). This is the onewe actually need.
config: addsNetworkInstanceConfig.cluster_wide(field 53).attest: addsATTEST_VERSION_TYPE_EVE_ORIGIN(= 3).The latter two are carried along by the version bump only; no pillar code
consumes them in this PR.
pkg/pillar: report allow adapter change capability— a one-line changein
zedagent: theZInfoDevice.api_capabilityfield reported to thecontroller goes from
API_CAPABILITY_REPORT_TPM_EVENTLOG(21) toAPI_CAPABILITY_APP_INSTANCE_NET_INTERFACE_CHANGE(22).api_capabilityis still a single monotonically increasing enum rather than abitmap, so raising it to 22 implies everything below it, exactly as before.
(The pre-existing
TODOabout moving to a bitmap-like representation is leftuntouched right above the changed line.)
PR dependencies
API_CAPABILITY_APP_INSTANCE_NET_INTERFACE_CHANGE.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.go—TestNICCountChange,TestNICCountChangeOrderedInterfaceevetest/tests/networking/staged_nicchange_test.go—TestStagedNICChangeevetest/tests/apps/restart_test.go—TestAppRestartWhat this PR changes is only what the device reports, so validation is:
Build and boot a device from this branch (e.g.
make live+make run-live,or
make ZARCH=arm64 HV=kvm PLATFORM=… installer-rawfor real hardware) andonboard it to a controller.
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 evetestharness:
evetest eve info --tail 1 | grep api_capabilityProgrammatically the same field is reachable from
EdgeDevice.GetDeviceInfo().ApiCapability(evetest/edgedevice.go), if wewant to assert on it from a test later.
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.go.modfiles and all 8vendor/modules.txtfiles, and the new enum value is present in everyvendored
info.pb.go.go build ./...ofpkg/pillarcannot complete on the dev host(
libzfs.hmissing — an environment gap, unrelated to this change), so thecompile/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
Reasons for the unchecked boxes:
APICapabilityvalues(
grep -r API_CAPABILITY docs/ pkg/pillar/docs/returns nothing) — the enumis documented in eve-api, in capabilities: add capability for adding/removing network interface eve-api#151. Nothing to add here.
check from step 2 above has been run.