Repository navigation
[16.0-stable] evetpm, newlogd and unit-test fixes - #6995
Merged
eriknordmark merged 8 commits intoNov 2, 2026
Merged
eriknordmark merged 8 commits into
eriknordmark merged 8 commits into
Conversation
When the vault key is fetched, a TPM error while checking for the sealed disk key was read as "no key present", so EVE generated and sealed a fresh key over the existing one. Data encrypted with the old key, such as a reused etcd zvol after a kvm-to-k vault migration redo, then could not be opened by any key. The check now distinguishes an undefined NV index from a TPM error, retries the error twice with a log line per attempt, and fails the fetch rather than generating a key if it persists. An index that is defined but never written still counts as absent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: eriknordmark <erik@zededa.com> (cherry picked from commit e3969c3)
Fetching the vault key must not take a TPM error for an absent key, or it seals a fresh key over the one the vault is encrypted with. The tests put a proxy between EVE and the TPM simulator that fails the disk-key presence check while every other command, sealing included, keeps working. A transient failure must yield the sealed key, and a persistent one an error with the sealed key left in place. Against the earlier presence check, the transient case replaces the key. The proxy answers TPM_RC_NV_UNAVAILABLE rather than TPM_RC_RETRY because go-tpm retries TPM_RC_RETRY itself and never returns it to the caller. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: eriknordmark <erik@zededa.com> (cherry picked from commit aaaaab0)
Vector creates its input sockets only once its topology is up, about 20 s into an EVE-k boot, while the services and pillar log their startup. newlogd queued 1000 entries per socket and silently dropped the rest, so the first 1000 log entries of a boot were followed by a gap: 866 entries on one EVE-k boot, including everything nodeagent logged before it published its status. For the first 60 s after it starts writing to vector, newlogd now waits for room in the queue instead of dropping. That stops it reading from memlogd, whose ring buffer holds the backlog meanwhile. Once the window ends a full queue drops as before, so a vector that never comes up or stalls later cannot hold up logging for longer than that. Signed-off-by: eriknordmark <erik@zededa.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 0353a11)
The dropped-message counter of the vector socket writer is incremented by the logging goroutine when the buffer is full, by the writer goroutine when a socket write fails, and read when deciding whether to report drops, with no synchronization. Make it an atomic.Int64 so the race detector stays quiet and the count stays exact. Signed-off-by: eriknordmark <erik@zededa.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 0b6761e)
TestSingleEthInterface and TestSingleEthInterfaceWithIPv6 failed intermittently on loaded CI runners, with DNS servers still reported after the interface lost its addresses. One simulated interface update publishes address, DNS and route events, and the first of them wakes the test. The reconciler's watcher picks randomly between a queued event and the pause request from Reconcile, so Reconcile could run before the DNS change was processed and skip the DNS state. Wait until the watcher has received every published event before reconciling. The mock network monitor reports the number of events still queued for its subscribers for this purpose. Signed-off-by: eriknordmark <erik@zededa.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 5c2a208)
TestManageStatFileSizeTargetSizesAvgThreshold asserted that rewriting a 6.8 MB stat file takes under 5 s. Under -race on a loaded CI runner it sometimes does not, failing the test although the trimmed file is correct. The test checks the result, which is what it is for; log the duration and drop the bound. Signed-off-by: eriknordmark <erik@zededa.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 30428f1)
Probe latency is measured in real time around the mock's simulated RTT, so a slow scheduler only inflates it, and the fixed headroom the tests allowed was exceeded on loaded CI runners. A probe that outlasts UserProbeTimeout fails instead of reporting latency, so use that as the upper bound. Signed-off-by: eriknordmark <erik@zededa.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 50fd414)
The send and verify tests reached google.com and postman-echo.com, so a slow resolver or a CI runner without Internet access failed them; a 5 s DNS timeout did so on CI. Serve them from an httptest TLS server bound to the port's IPv4 address instead. The URL is an IP literal, so these tests no longer exercise DNS resolution. Signed-off-by: eriknordmark <erik@zededa.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit b81f434)
5 of 9 tasks
github-actions
Bot
requested review from
christoph-zededa,
deitch,
europaul,
milan-zededa,
naiming-zededa,
rouming,
rucoder and
shjala
October 30, 2026 19:09
This was referenced Oct 30, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 16.0-stable #6995 +/- ##
===============================================
+ Coverage 31.67% 33.07% +1.39%
===============================================
Files 10 25 +15
Lines 1026 3988 +2962
===============================================
+ Hits 325 1319 +994
- Misses 701 2669 +1968 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
eriknordmark
requested review from
rene
and removed request for
christoph-zededa,
deitch,
europaul,
naiming-zededa,
rucoder and
shjala
October 30, 2026 20:36
eriknordmark
marked this pull request as ready for review
October 30, 2026 20:36
eriknordmark
requested review from
christoph-zededa and
rucoder
as code owners
October 30, 2026 20:36
eriknordmark
requested review from
deitch,
naiming-zededa and
shjala
as code owners
October 30, 2026 20:36
This was referenced Oct 30, 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 #6691, #6839, #6953 to
16.0-stable, combined into one PR to saveCI runs. Every commit is cherry-picked with
-xfrom master, in master mergeorder:
at boot no longer makes EVE replace the vault's disk key with a new one.
first seconds of boot are no longer lost while the log pipeline starts.
Adaptations:
change on master, so the hunks are applied by hand. The added and removed
lines are master's, except that
tpm.gogains theerrorsimport, andCompareLegacyandSealedKey, which takes no logger on this branch, reads aTPM error as no sealed key without logging it, as before. The test helper
sealTestDiskKeydoes not callextendFirmwareAnchorPCRs, which comes withevetpm: refuse to seal the vault key against all-zero firmware PCRs (defense in depth) #6162 and is not on this branch.
fake clock" need Go 1.25's
testing/synctest; "dpcmanager: stabilize thefallback-to-manual test" and "dpcmanager: wait for the right DPC in PNAC
tests" fix tests that do not exist on this branch.
#6841 and #6760 are EVE-k changes and go to
17.0-stableonly.PR dependencies
None.
How to test and validate this PR
gofmt,go build ./...(with and without-tags k),go vetandgo testof every touched pillar package, and ofpkg/newlog/cmd, pass onthis branch.
tests/tpm/prep-and-run.sh).TestDiskKeyPresentFailsOnTPMErrorfails on this branch whendiskKeyPresenttreats a TPM error as an absent key again.
Changelog notes
new one.
pipeline starts up.
PR Backports
Checklist
device testing is on the source PRs.
For backport PRs:
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.
🤖 Generated with Claude Code