[16.0-stable] Simplify/remove /persist/status/zedagent/*#5750
Merged
Conversation
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)
0c349e8 to
a64c865
Compare
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
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. |
Contributor
|
Here is the fix for the issue that I have observed: #5775 |
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)
Contributor
Author
I've added that to this PR. |
milan-zededa
approved these changes
Apr 9, 2026
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
Backport of #5584 and #5754 and #5775
How to test and validate this PR
See #5584
Changelog notes
See #5584
Checklist
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.