Skip to content

Syncup PRs from master to 17.0.0-rc4 - #6156

Merged
eriknordmark merged 13 commits into
lf-edge:17.0from
rene:17.0-rc4
Jul 14, 2026
Merged

Syncup PRs from master to 17.0.0-rc4#6156
eriknordmark merged 13 commits into
lf-edge:17.0from
rene:17.0-rc4

Conversation

@rene

@rene rene commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Description

Cherry-picked commits from master to go into 17.0.0-rc4:

Commit PR Title
4458fc2 #6000 eve-k: add config-property 'storage.longhorn.node-drain-policy'
e6d3368 #6109 build-tools: fix dockerized Go builder to match eve-alpine
f271f45 #6119 pkg/udev: Install kmod userspace utilities
70ebd65 #6119 pkg/wwan: Install kmod userspace utilities
7c8636d #6125 github/workflows: Setup git permissions inside Yetus container
3be229e #6123 Kernel update - [arm64-generic]
8255c51 #6105 fix(pillar): fix false maintenance mode on EVE-k via fstrim and CSI accounting
07dda49 #6141 pkg/xen-tools: sanitize iGPU DBUF_CTL POWER_STATE to fix scanout corruption
512c6a0 #6118 pkg/u-boot: Add support to NVMe for Raspberry Pi 5
1e8863d #6118 README.md: Update Raspberry Pi 5 information
40da735 #6131 pillar/vendor: make klauspost/compress a direct dependency
9c544ca #6131 pillar: capture qemu and guest crash dumps to the vault
3034c1c #6131 Update all package hashes

Changelog notes

None.

PR Backports

None.

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
  • I've checked the boxes above, or I've provided a good reason why I didn't
    check them.

@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 28.57143% with 615 lines in your changes missing coverage. Please review.
✅ Project coverage is 20.99%. Comparing base (0a034d0) to head (4227ce1).

Files with missing lines Patch % Lines
pkg/pillar/cmd/domainmgr/crash.go 1.98% 148 Missing ⚠️
pkg/pillar/hypervisor/qmp_crash.go 2.50% 78 Missing ⚠️
pkg/pillar/cmd/vaultmgr/vaultmgr.go 0.00% 73 Missing ⚠️
pkg/pillar/hypervisor/kvm.go 7.81% 59 Missing ⚠️
pkg/pillar/cmd/zfsmanager/handlepooltrim.go 0.00% 42 Missing ⚠️
pkg/pillar/cmd/domainmgr/domainmgr.go 0.00% 32 Missing and 1 partial ⚠️
pkg/pillar/qemudump/corepattern.go 37.73% 28 Missing and 5 partials ⚠️
pkg/pillar/qemudump/manager.go 69.60% 18 Missing and 13 partials ⚠️
pkg/pillar/kubeapi/longhornconfig.go 0.00% 26 Missing ⚠️
pkg/pillar/vault/handler_zfs.go 0.00% 19 Missing ⚠️
... and 12 more
Additional details and impacted files
@@            Coverage Diff             @@
##             17.0    #6156      +/-   ##
==========================================
+ Coverage   20.46%   20.99%   +0.52%     
==========================================
  Files         490      511      +21     
  Lines       91797    94342    +2545     
==========================================
+ Hits        18788    19808    +1020     
- Misses      71443    72764    +1321     
- Partials     1566     1770     +204     

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

@rene
rene marked this pull request as draft July 10, 2026 15:14
@rene
rene marked this pull request as ready for review July 13, 2026 10:09
andrewd-zededa and others added 6 commits July 13, 2026 12:19
Adds a new EVE-k config property exposing Longhorn's cluster-wide
node-drain-policy setting. Defaults to Longhorn's recommended value:
'block-for-eviction-if-contains-last-replica', which blocks a drain
until another node holds a replica of any volume on the draining node.

Valid values (enforced by a validator):
  - block-for-eviction
  - block-for-eviction-if-contains-last-replica
  - allow-if-replica-is-stopped
  - always-allow

Adds kubeapi/longhornconfig.go with SetLonghornNodeDrainPolicy(), which
is a no-op when Longhorn is not yet available. zedkube applies the policy
on startup via kubeCfgTimer and on any global config change.

See: https://longhorn.io/docs/1.9.1/maintenance/maintenance/#node-drain-policy-recommendations

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Andrew Durbin <andrewd@zededa.com>
(cherry picked from commit 4458fc2)
The eve-build-<user> image (build-tools/src/scripts/Dockerfile) backs every
DOCKER_GO target: make shell, make test, make pillar-vet/fmt/build. It had
drifted from the real EVE build environment and could no longer build pillar:

- Go was pinned to 1.24.1, but pillar and other go.mod files now require
  go 1.25.0 (toolchain go1.25.11). With GOTOOLCHAIN=local every DOCKER_GO
  target failed with 'go.mod requires go >= 1.25.0'. Bump GOVER to 1.25.11.
- The FROM used the floating golang:${GOVER}-alpine tag, which now resolves
  to a newer Alpine than eve-alpine. Pin alpine3.22 to track eve-alpine's
  Alpine/libc.
- OpenZFS was built from 2.3.3 while the shipping dom0-ztools package is on
  2.3.6. Align the builder with 2.3.6.
- go-libzfs includes the OpenZFS libspl headers, which still reference the
  glibc LFS64 symbols fstat64/stat64. musl dropped those, so cgo compilation
  failed. Set CGO_CFLAGS to remap them to the plain 64-bit fstat/stat, the
  same fix pkg/pillar/Dockerfile already uses.

With these, make pillar-vet HV=kvm builds and vets pillar cleanly again.

Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com>
(cherry picked from commit e6d3368)
Several packages, such as dom0-ztools and wwan rely on init scripts to
load modules. However, kmod tool is not installed in the main rootfs, so
a limited version from busybox is used (without compression support)
when a onboot service is executed. This commit installs the kmod
userspace utilities from udev container, which is installed in the main
rootfs in images/rootfs.yml.in file.

Signed-off-by: Renê de Souza Pinto <rene@renesp.com.br>
(cherry picked from commit f271f45)
The mm-init.sh calls modprobe to load some modules during startup of the
wwan container. However, kmod tools is not installed, so a limited version
from busybox is used (without compression support). This commit adds the
kmod tools to wwan container.

Signed-off-by: Renê de Souza Pinto <rene@renesp.com.br>
(cherry picked from commit 70ebd65)
With the introduction of evetest, we now have submodules in our source
tree. This makes codespell plugin trying to initialize submodules and
let to the following error:

Initializing git submodules...
fatal: detected dubious ownership in repository at '/workspace/src/evetest/grpcapi/eve-api'
To add an exception for this directory, call:

	git config --global --add safe.directory /workspace/src/evetest/grpcapi/eve-api
fatal: Unable to find current revision in submodule path 'evetest/grpcapi/eve-api'

In this case /workspace is the mount point inside the container running
Yetus, mounted from the current source directory (from a different user
ID). This commit fixes this issue by adding the safe.directory git
option to all directories within the container through a config file
prepared in advance and mount inside the container at /etc/gitconfig. It
also initializes submodules after checkout upstream/master because
codespell plugin is initializing them as well.

Signed-off-by: Renê de Souza Pinto <rene@renesp.com.br>
(cherry picked from commit 7c8636d)
This commit changes:
eve-kernel-arm64-v6.1.155-generic
    9fa67514972d: arm64: configs: Enable NVMe drivers

Signed-off-by: Renê de Souza Pinto <rene@renesp.com.br>
(cherry picked from commit 3be229e)
@rene
rene force-pushed the 17.0-rc4 branch 2 times, most recently from 2a7bce9 to cfe3b3a Compare July 13, 2026 10:32

@eriknordmark eriknordmark left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks like some of the VaultUnlockMethod changes made it in as part of the fstrim commit, but not all. It makes sense to remove those and amend the fstrim commit with the removal.
The things to remove are attached

remove-partial-vaultunlockmethod.patch

andrewd-zededa and others added 4 commits July 14, 2026 10:42
…ccounting

On EVE-k (kubevirt/Longhorn) nodes two independent bugs combine to push
RemainingSpace to zero and trigger false maintenance mode even when the
ZFS pool has significant free space.

PRIMARY FIX — ghost blocks inflate usedByDom0:
/persist/vault is an ext4 filesystem on a ZFS zvol. Blocks freed by
Longhorn replica churn are never returned to ZFS, inflating logicalused
and shrinking allowedDeviceDiskSize. Following Linux distro consensus
(all major distros use periodic fstrim.timer, not mount -o discard),
EVE reclaims ghost blocks via scheduled fstrim. The etcd-storage zvol
shares the same mechanism but is mounted inside the kube container, not
the pillar container, and is outside the reach of this fix.

Add TrimVault(timeout) to the vault Handler interface. ZFSHandler.TrimVault
runs fstrim on /persist/vault (EVE-k only). Ext4Handler and
UnsupportedHandler stub it as no-ops.

vaultmgr: startPostVaultReconcile runs TrimVault at boot, gating
ConversionComplete and k3s startup, bounded by timer.vault.trim.max.secs
(default 30 min). startVaultTrimSchedule runs fstrim on a cron schedule
(default Sat/Sun 02:00) without gating startup. Note that setting
timer.vault.trim.max.secs to 0 (unlimited) lets a slow first-boot trim
delay vault-ready reporting and block k3s startup for as long as the trim
takes; keep it non-zero to bound this. Trim state is published in
VaultStatus.TrimStatus (VaultTrimStatus) for live inspection and
collect-info post-mortem.

zfsmanager: runPoolTrimSchedule (handlepooltrim.go) runs zpool trim at
boot then on a cron schedule (default Sat/Sun 03:00, EVE-k only), using
explicit trim invocations that are observable in logs and operator-tunable
from the controller without a node reboot. TrimStatus (PoolTrimStatus) is
published in ZFSPoolStatus immediately on each invocation.

Concurrency: the most-recent trim status and the cached schedule config in
both agents are shared between the main/publisher goroutines and the trim
goroutines, so they are guarded by a per-agent mutex (trimMu) via
setter/getter accessors. Without this the trim goroutines race the status
publishers under go test -race.

Runtime reconfigurability: the cron spec (and vault trim timeout) are
cached under trimMu on every global config update and re-read on each
ticker tick, so the controller can retune or disable (empty spec) either
schedule without a reboot. vaultmgr's main select loop now processes
subGlobalConfig for this (it previously dropped config updates after
startup). A trimScheduleStarted guard ensures at most one vault trim ticker
goroutine even if the unlock path runs more than once.

New globalconfig keys: timer.vault.trim.max.secs, timer.vault.trim.cron,
timer.zfs.pool.trim.cron. A pure 5-field cron evaluator is added to
types/global.go — CronMatch plus CronShouldFire (single-minute
deduplication for use inside a time.NewTicker(time.Minute) loop) with no
external dependency. cronFieldMatch/cronAtomMatch are field-range aware so
"*/n" steps start at the field minimum (1 for day-of-month and month),
matching standard cron rather than starting at 0.

SECONDARY FIX — volumeHandlerCSI.UsageFromStatus accounting skew:
The CSI handler unconditionally returned MaxVolSize for all volume states.
Mirror commonVolumeHandler: return CurrentSize for ReadOnly volumes, nil
config, and volumes with no app references. Corrects accounting for
ReadOnly and orphaned volumes; aligns EVE-k with EVE-kvm behavior. Has
no effect on the maintenance trigger for this node (all volumes are
active writable).

Tests: all four UsageFromStatus branches in both commonhandler and
csihandler; table-driven tests for CronMatch/CronShouldFire/cronFieldMatch/
cronAtomMatch covering wildcards, comma lists, ranges, steps, "*/n"
field-minimum behavior on base-1 fields, Sunday 0/7 duality, dedup, and
invalid input; TestFstrimBinaryExists to catch a missing binary in the
build; evetest TestVaultZvolTrimReclaimsBlocks writes 256 MiB of
incompressible data, deletes it to create ghost blocks, runs fstrim, and
asserts logicalused drops on a live EVE-k ZFS device (the real fstrim path
is a no-op in the pillar test container, which has no ZFS).

Also: SC1091 shellcheck disable added to cluster-init.sh header;
docs/ZFS.md gains a Storage maintenance section covering pool TRIM, vault
fstrim schedules, pubsub status fields, and agent log reference.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Andrew Durbin <andrewd@zededa.com>

(cherry picked from commit 8255c51)
…uption

On some hosts the firmware POST modeset leaves the display data buffer
(DBUF) powered, so a passed-through Intel iGPU's DBUF_CTL registers read
back POWER_STATE (bit30) = 1 while POWER_REQUEST (bit31) = 0 -- a
legitimate but inconsistent leftover: the device is not display-reset on
assignment, and POWER_STATE is a read-only status latch fed by the display
power well, independent of the POWER_REQUEST input.

A guest display driver that samples POWER_STATE to decide which DBUF
slices are already enabled sees the stale "powered" bit and never issues
POWER_REQUEST. DBUF then powers down, the plane FIFO underruns, and
scanout is corrupted (vertical stripes) until a full modeset (e.g. a
display sleep/wake) re-requests power. Native i915 avoids this by
force-driving POWER_REQUEST at load regardless of the readout; the
Windows driver trusts the readout.

Add a BAR0 quirk that traps the DBUF_CTL slice registers (S1..S4, only as
many as the generation exposes) and clears POWER_STATE on read whenever
POWER_REQUEST is not set, presenting a consistent register (POWER_STATE
follows POWER_REQUEST) -- the same approach Intel's GVT device model uses
(gen9_dbuf_ctl_mmio_write). The guest then issues the request and the real
power well brings DBUF up.

Also add tools/qemu/ helpers used to diagnose and verify this -- they read
the live iGPU MMIO via QMP pmemsave and diff a corrupted vs recovered
state -- and document the quirk and the workflow in
docs/INTEL-IGPU-PASSTHROUGH.md.

Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com>
(cherry picked from commit 07dda49)
This commit adds two patches required to fully enable the PCIe controller
on Raspberry Pi 5 for u-boot, allowing to boot EVE from NVMe devices.

Signed-off-by: Renê de Souza Pinto <rene@renesp.com.br>
(cherry picked from commit 512c6a0)
Add instructions on how to install EVE-OS on an NVMe on Raspberry Pi 5
devices.

Signed-off-by: Renê de Souza Pinto <rene@renesp.com.br>
(cherry picked from commit 1e8863d)
rucoder added 3 commits July 14, 2026 10:42
The new pkg/pillar/qemudump package imports github.com/klauspost/compress
directly to compress crash dumps in-process, so it is no longer an indirect
dependency. Drop the // indirect marker; no version change.

Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com>
(cherry picked from commit 40da735)
A rare, non-reproducible qemu/KVM passthrough crash must leave usable
post-mortem state on its first occurrence, without ever endangering device
management. domainmgr now owns crash handling end-to-end for two classes,
both on by default:

- qemu process death on a fatal signal (SIGBUS/SIGSEGV/SIGABRT): a bounded
  RLIMIT_CORE is set on the qemu OCI task and the host core_pattern points at
  the encrypted vault, so the kernel writes a process core that pillar
  compresses and rotates.
- guest internal-error (KVM_RUN -EFAULT): the QMP monitor reports it, and
  domainmgr captures the guest RAM as an ELF core (dump-guest-memory streamed
  through a FIFO) before any teardown (capture-first-then-policy).

A new pkg/pillar/qemudump package owns dump storage: in-process zstd with an
adaptive window sized from pillar's cgroup headroom (never system RAM, which
would OOM-kill zedbox), an on-the-fly disk quota (per-domain ring, global cap,
free-space floor), and unique timestamped names. Dumps live in the encrypted
vault and are collected by collect-info for developer analysis.

debug.qemu.pause.on.crash holds a crashed guest alive and freezes reconcile
for live inspection (with a gdb stub via debug.qemu.gdb); debug.qemu.trace.events
enables per-VM qemu tracing with @iommu/@barmap/@vfio presets. A debug-only,
compile-gated (CONFIG_EVE_CRASH_INJECTOR, off in production) x-inject-internal-error
QMP command and tools/qemu/inject-crash.sh drive both crash classes for on-device
validation.

Both paths are validated on real hardware; see docs/QEMU-CRASH-DEBUGGING.md.

Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com>
Signed-off-by: Your Name <you@example.com>

(cherry picked from commit 9c544ca)
- update pkg/debug hash

Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com>

(cherry picked from commit 3034c1c)
@rene

rene commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Updates in this PR:

@github-actions
github-actions Bot requested a review from eriknordmark July 14, 2026 08:43

@eriknordmark eriknordmark left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@eriknordmark
eriknordmark merged commit a2a597f into lf-edge:17.0 Jul 14, 2026
37 of 40 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.

4 participants