Skip to content

[16.0-stable] Simplify/remove /persist/status/zedagent/*#5750

Merged
eriknordmark merged 16 commits into
lf-edge:16.0-stablefrom
eriknordmark:erik-16.0-stable
Apr 9, 2026
Merged

[16.0-stable] Simplify/remove /persist/status/zedagent/*#5750
eriknordmark merged 16 commits into
lf-edge:16.0-stablefrom
eriknordmark:erik-16.0-stable

Conversation

@eriknordmark
Copy link
Copy Markdown
Contributor

@eriknordmark eriknordmark commented Apr 6, 2026

Description

Backport of #5584 and #5754 and #5775

How to test and validate this PR

See #5584

Changelog notes

See #5584

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

For backport PRs (remove it if it's not a backport):

  • I've added a reference link to the original PR

  • PR's title follows the template

  • I've checked the boxes above, or I've provided a good reason why I didn't
    check them.

Copy link
Copy Markdown
Contributor

@rene rene left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kicking off tests

This is used as the startup config if we crash and don't have
controller connectivity. It is saved after we have been running
with an updated config for at least 10 minutes.

Signed-off-by: eriknordmark <erik@zededa.com>
(cherry picked from commit f4b3f9e)
And its .bak file. Those are checkpointed protobuf files which
have their chains verified before writing them, but also when they
are read after a reboot. When we load from
/persist/checkpoint/controllercerts we also publish ControllerCerts for
use by others.
This will remove the need to for /persist/certs/server-signing-cert.pem

Signed-off-by: eriknordmark <erik@zededa.com>
(cherry picked from commit d28f531)
Instead it is only kept in memory/pubsub and lookupControllerSigningCert
can be used to fetch it.

Signed-off-by: eriknordmark <erik@zededa.com>
(cherry picked from commit 8b4c427)
The need for Touch went away when we started accepting arbitrarily old
checkpoints.

Signed-off-by: eriknordmark <erik@zededa.com>
(cherry picked from commit 7fd77c7)
And make sure we update the checkpoint when there are real
changes to the controller certs. This requires comparing the
set of Keys aka hashes of the certificates to avoid a falsely
detection changes due to ordering differences in the protobuf
bytes.

Signed-off-by: eriknordmark <erik@zededa.com>
(cherry picked from commit ae9bc23)
They are created from the checkpointed controllercerts and lastconfig
when zedagent starts, and then they are published to other agents.

Signed-off-by: eriknordmark <erik@zededa.com>
(cherry picked from commit 00480f4)
The ConfigItemValueMap will no longer be a persistent publications
hence there will be no need to convert from old to new formats,
nor set default values. The defaults will be applied by zedagent
on startup.

A follow-on commit adds back the handling of /config/GlobalConfig/global.json
in zedagent.

Signed-off-by: eriknordmark <erik@zededa.com>
(cherry picked from commit c2b3a53)
Zedagent initializes it from /persist/checkpoint/lastconfig
on startup so that other agents can get their global config.

Signed-off-by: eriknordmark <erik@zededa.com>
(cherry picked from commit ace2402)
Since some persistent publication are no longer persistent

Signed-off-by: eriknordmark <erik@zededa.com>
(cherry picked from commit 8747315)
And remove some use of file access in favor of pubsub calls.

Signed-off-by: eriknordmark <erik@zededa.com>
(cherry picked from commit 9089e09)
But do this in zedagent similar to how it handles bootstrap config
(the old code was in upgradeconverter).

A follow-up commit removes the use of /persist/ingested and related
sha256 comparisons.

Signed-off-by: eriknordmark <erik@zededa.com>
(cherry picked from commit ffe87b5)
This no longer makes sense since we ingest into memory and not into
files in /persist. Only the DevicePortConfig gets ingested by nim
into a persistent publication and that can handle multiple ingestions
without indigestion.

Signed-off-by: eriknordmark <erik@zededa.com>
(cherry picked from commit 0088d2a)
If we have a /persist/checkpoint/lastconfig we ignore
re-reading those files. They will have been taken into account
in forming /persist/status/nim/DevicePortConfigList/

Signed-off-by: eriknordmark <erik@zededa.com>
(cherry picked from commit a7789a4)
Since the load is no longer conditional on /persist/ingested/

Signed-off-by: eriknordmark <erik@zededa.com>
(cherry picked from commit 7160f49)
Have client wait for a checkpoint even if the device is already onboarded.

Signed-off-by: eriknordmark <erik@zededa.com>
(cherry picked from commit 0d4aaf0)
@github-actions github-actions Bot requested a review from rene April 7, 2026 17:14
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 7, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 20.51%. Comparing base (9f69150) to head (d05d597).
⚠️ Report is 58 commits behind head on 16.0-stable.

Files with missing lines Patch % Lines
pkg/pillar/cmd/vcomlink/vcomlink.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           16.0-stable    #5750      +/-   ##
===============================================
+ Coverage        19.52%   20.51%   +0.98%     
===============================================
  Files               19       18       -1     
  Lines             3021     2247     -774     
===============================================
- Hits               590      461     -129     
+ Misses            2310     1667     -643     
+ Partials           121      119       -2     

☔ 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.

@milan-zededa
Copy link
Copy Markdown
Contributor

Please hold off on backporting these changes -- I'm currently seeing issues with the bootstrap configuration. I’ll report back once I have more information.

@milan-zededa
Copy link
Copy Markdown
Contributor

Here is the fix for the issue that I have observed: #5775
@eriknordmark Please include it in your backports.

@eriknordmark eriknordmark marked this pull request as draft April 8, 2026 20:18
Commit d28f531 renamed VerifySigningCertChain to VerifyLeavesCertChain
and added a check requiring an ECDH exchange certificate to be present.
The bootstrap config verification was updated to call this new function,
but BootstrapConfig.ControllerCerts only contains a signing cert chain
and never includes an ECDH cert, causing bootstrap config loading to
always fail with "failed to acquire ECDH cert".

Make the ECDH requirement optional via a requireECDH parameter.
The bootstrap config path passes false (signing cert only), while
the normal controller cert paths (fetched from /certs endpoint and
used for auth container verification) pass true.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit f0c009f)
@eriknordmark
Copy link
Copy Markdown
Contributor Author

Here is the fix for the issue that I have observed: #5775 @eriknordmark Please include it in your backports.

I've added that to this PR.

@eriknordmark eriknordmark marked this pull request as ready for review April 9, 2026 06:37
@eriknordmark eriknordmark merged commit fceb28b into lf-edge:16.0-stable Apr 9, 2026
40 of 42 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.

3 participants