Repository navigation
evetest: purge with the designated node down - #6478
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6478 +/- ##
==========================================
+ Coverage 27.03% 27.31% +0.27%
==========================================
Files 524 534 +10
Lines 95844 97560 +1716
==========================================
+ Hits 25916 26652 +736
- Misses 67868 68660 +792
- Partials 2060 2248 +188 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
537df21 to
8bc3c48
Compare
|
Claude finished @rene's task in 2m 10s —— View job Review of PR #6478 —
|
|
@eriknordmark , you need to fix the conflicts |
|
Looks like we may have some overlap with #6505. I'll take a look at this, can you take a look at mine @eriknordmark ? |
8bc3c48 to
4106326
Compare
|
Rebased on master — the conflict was |
|
@eriknordmark @andrewd-zededa Does it make sense to merge both this test and the ones provided by #6505? Do they exercise different scenarios or are they mostly duplicate? |
Integration branch on master with the conversion chain (lf-edge#6530, lf-edge#6063, fork#6) and the purge/PVC robustness set (lf-edge#6442, lf-edge#6406, lf-edge#6478). Records the tips each piece was replayed from, the branch-local adapters that no PR carries, and the storage-resizer content pin. Signed-off-by: eriknordmark <erik@zededa.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
4106326 to
1b0b51b
Compare
|
@milan-zededa Different scenarios. They overlap only on "a node is down and an app operation is issued", and diverge on what the operation actually tests. The decisive difference is the threshold. This test sets no They also drive different volume paths, and #6505 says so itself: its step 7 uses Two smaller differences: the node powered off here is node 1, the bootstrap node, where #6505 takes down a non-bootstrap node; and the fixture here is One thing worth fixing rather than defending: that separation rests on the failover finishing well inside the 10-minute threshold, and nothing here asserts it. Separately, on placement: this is the only test in |
5674e6d to
dac6059
Compare
|
@milan-zededa Both follow-ups from my last comment are in. The threshold is now pinned explicitly. The test sets On placement: the test has moved to |
|
Claude finished @eriknordmark's task in 2m 40s —— View job Re-review of PR #6478 —
|
Both PRs promote the tests/apps kubectl plumbing into EdgeDevice, and they picked different shapes: lf-edge#6406 bakes the app namespace into RunKubectl and brings the richer KubeItemList a PVC's phase needs, while lf-edge#6478 takes an explicit namespace plus a per-call timeout, which the Longhorn workaround needs to reach longhorn-system. Keep lf-edge#6478's runner as the only one and move KubectlListItems onto it; the local copy in the app helpers is then dead and goes, as does the duplicate cluster outage-threshold key lf-edge#6478 and lf-edge#6505 each declare. Both PRs also pre-date master's volume-generation policy argument on PurgeApplication, so their two cluster call sites pass the bump policy they were written against. Branch-local: it belongs on whichever of the two rebases last. Signed-off-by: eriknordmark <erik@zededa.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Integration branch on master with the conversion chain (lf-edge#6530, lf-edge#6063, fork#6) and the robustness set (lf-edge#6442, lf-edge#6406, lf-edge#6478, lf-edge#6505, lf-edge#6451, lf-edge#6590, lf-edge#6599). Records the tips each piece was replayed from, where two PRs collide and which side won, the branch-local adapters that no PR carries, and the storage-resizer content pin. Signed-off-by: eriknordmark <erik@zededa.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Both PRs promote the tests/apps kubectl plumbing into EdgeDevice, and they picked different shapes: lf-edge#6406 bakes the app namespace into RunKubectl and brings the richer KubeItemList a PVC's phase needs, while lf-edge#6478 takes an explicit namespace plus a per-call timeout, which the Longhorn workaround needs to reach longhorn-system. Keep lf-edge#6478's runner as the only one and move KubectlListItems onto it; the local copy in the app helpers is then dead and goes, as does the duplicate cluster outage-threshold key lf-edge#6478 and lf-edge#6505 each declare. Both PRs also pre-date master's volume-generation policy argument on PurgeApplication, so their two cluster call sites pass the bump policy they were written against. Branch-local: it belongs on whichever of the two rebases last. Signed-off-by: eriknordmark <erik@zededa.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> (cherry picked from commit 2514912)
Integration branch on master with the conversion chain plus the fault-injection stress harness (lf-edge#6530, lf-edge#6063, fork#6, fork#7) and the robustness set (lf-edge#6442, lf-edge#6406, lf-edge#6478, lf-edge#6505, lf-edge#6451, lf-edge#6590, lf-edge#6599). Records the tips each piece was replayed from, where two PRs collide and which side won, the branch-local adapters that no PR carries, and the chaos storage-resizer content pin. Signed-off-by: eriknordmark <erik@zededa.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
@milan-zededa Following up on the keep-both question with what a closer read of #6505 turned up — the case is stronger than "different scenarios". The two tests drive opposite halves of The more useful point: #6505 changes the shared teardown path — They also differ in setup in ways that matter for coverage: this test re-creates its cluster from scratch ( This branch is rebased on master and passes |
dac6059 to
1864b6d
Compare
a77031f to
f155215
Compare
f155215 to
3fdcf53
Compare
Both PRs add a kubectl runner to EdgeDevice, so taking them together leaves two RunKubectl methods and two EVEKubeAppNamespace constants on one type and the framework stops compiling. Keep lf-edge#6478's runner, which takes an explicit timeout, and move lf-edge#6406's KubectlListItems onto it; the local copies in the apps tests go away with it. Two of lf-edge#6406's call sites also predate master: SeparateClusterPort is a function now, and PurgeApplication takes a volume-generation policy. Branch-local: it belongs on lf-edge#6406 once that PR rebases onto current master, not on this integration branch. Signed-off-by: eriknordmark <erik@zededa.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Both PRs add a kubectl runner to EdgeDevice, so taking them together leaves two RunKubectl methods and two EVEKubeAppNamespace constants on one type and the framework stops compiling. Keep lf-edge#6478's runner, which takes an explicit timeout, and move lf-edge#6406's KubectlListItems onto it; the local copies in the apps tests go away with it. Two of lf-edge#6406's call sites also predate master: SeparateClusterPort is a function now, and PurgeApplication takes a volume-generation policy. Branch-local: it belongs on lf-edge#6406 once that PR rebases onto current master, not on this integration branch. Signed-off-by: eriknordmark <erik@zededa.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
3fdcf53 to
dec41c0
Compare
milan-zededa
left a comment
There was a problem hiding this comment.
LGTM but a merge conflict to fix
dec41c0 to
a71fb95
Compare
|
As @milan-zededa noted, I think I agree that these test cases (#6505 and here) are very closely overlapped, both app failover from a dnid and purge issued on non-dnid. The difference is in the purge type: new vol vs vol generation. |
Listing an app's VMIRS objects is how a test sees which generations of a workload exist, and it was reachable only from tests/apps. Give EdgeDevice a kubectl runner and a VMIRS lister, so any suite can ask, and point the app-workload helpers and the tie-breaker cluster test at them instead of each shelling out to "eve exec kube kubectl" on its own. Signed-off-by: eriknordmark <erik@zededa.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
EdgeCluster.PurgeApplication locates the node hosting the application and waits there for the purge to be observed. A caller that has powered a node off cannot let that node be the answer: the cluster info it published before going down still names it as the host, so the wait sits on a device that will never report again and fails on the timeout. Accept the same excludeDevNames the host lookup already takes, and pass it through. Signed-off-by: eriknordmark <erik@zededa.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
a71fb95 to
52ef4c0
Compare
A purge must not gate its teardown on the app's designated node, nor on wherever a replica happens to be scheduled: neither signal is both durable and liveness-aware, so either one deadlocks a purge issued while the designated node is down. Add a three-node cluster test for that case. The app is deployed with a preferred designated node, that node is powered off so KubeVirt reschedules the replica elsewhere, and the purge is issued while it is still down; the surviving workload must be exactly one VMIRS, named for the new generation. The outage threshold that lets a peer act for a downed designated node is pinned past the whole test, so what the purge exercises is unambiguously the path that needs no such stand-in. The purge is observed on the node hosting the app rather than through the controller. While the designated node is down no node uploads this app's state at all, so PURGING and HALTING happen where nothing reports them; waiting on controller-visible state would time out on a purge that ran correctly. Waiting for the new generation's VMIRS covers both that the purge finished and the end state asserted here. Rescheduling is given twenty minutes rather than ten. Detaching the old workload scales the previous VMIRS down through KubeVirt's validating webhook, so a reschedule cannot finish until virt-api is serving again on a surviving node; observed between 7m47s and over ten minutes. Signed-off-by: eriknordmark <erik@zededa.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A PVC can stay Pending indefinitely while its ProvisioningFailed events alternate "not found" and "already exists": the provisioner created the backend volume, lost that fact from its own cache, and retries forever against a name it no longer recognizes. Deleting the csi-provisioner pod forces a fresh leader election and the next retry succeeds. Watch for that signature while the failover purge test waits for its app, and restart the pod once if it holds for two minutes. Scoped to that one test, which is where it has been observed and which owns the cluster it would restart the pod on. Delete this file once Longhorn recovers on its own. Signed-off-by: eriknordmark <erik@zededa.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
52ef4c0 to
d45fe50
Compare
|
@andrewd-zededa Agreed on the overlap in setup, but they check different things. #6505 purges after a backup node has taken over and checks that the guest boots on the new volume. This one pins the threshold so no backup takes over, and checks that exactly one VMIRS remains, at the new generation. Each would pass a failure the other catches: #6505 doesn't notice a leftover old-generation VMIRS, and this test doesn't notice a guest that won't boot. I've switched this test to #6505's threshold key, |
Description
A purge must not gate its teardown on the app's designated node, nor on wherever
a replica happens to be scheduled: neither signal is both durable and
liveness-aware, so either one deadlocks a purge issued while the designated node
is down. Nothing covered that case.
TestVMAppPurgeDuringFailoverdoes: a three-node replicated-storage cluster, anapp deployed with a preferred designated node, that node powered off so KubeVirt
reschedules the replica elsewhere, and the purge issued while it is still down.
The surviving workload must be exactly one VMIRS, named for the new generation.
It makes no volume or guest-level assertion — replicated-storage
VolumeStatussemantics across a node failover are not established for this suite.
The last commit is a
REMOVE MEworkaround for an infra bug, not foranything the suite tests. A first-ever PVC creation can stall forever in
Longhorn's CSI provisioner, whose
ProvisioningFailedevents alternate "volumenot found" and "volume already exists"; restarting the provisioner pod clears it
on the next retry. The mitigation wraps only this test's app-running wait, fires
only after the signature has held continuously for two minutes, and restarts the
pod once. Delete that file and its single call site once Longhorn no longer
needs the restart.
The test and its workaround were drafted as part of #6318, which also carried a
gcPVCsPVC reclaim and re-enabled the KubevirtassertNoOrphanedPVCscheck.Both of those now live in #6406 — the pillar files are byte-identical there and its unit tests
are a superset — so #6318 is closed and this PR is the test-only remainder.
The test sits in
evetest/tests/clusterwith the other multi-node tests. Thetwo
evetest infra:commits are what let it: the first promotes the kubectlhelpers it needs (
RunKubectl,ListAppVMIRS) ontoEdgeDeviceso any testpackage can reach them, rather than duplicating the apps package's copies; the
second gives
EdgeCluster.PurgeApplicationan exclusion list, becauseFindDeviceHostingAppwould otherwise resolve the host from the powered-offnode's own stale cluster info and wait there forever.
PR dependencies
Merge after #6505. On master this test fails, and correctly so: a purge
issued while the app's designated node is down tears the old generation down and
never creates the new one, leaving the app absent from the cluster until that
node returns (#6610). Against #6505 it passes, the purge completing
about 2m20s after it is issued — verified at that PR's heads
e4688995fanda5a3623db.The end-state assertion is on VMIRS objects, so this test does not need
the
gcPVCsreclaim in #6406.#6406 overlaps: it promotes the same kubectl helpers onto
EdgeDevice. Whicheverlands second drops its own copy — the two implementations are equivalent, mine
adds
ListAppVMIRSon top.How to test and validate this PR
Kubevirt only, and it needs three devices; it is registered last in
TestNodeClusterSuitefor that reason. To run it alone:It skips on any other
HYPERVISOR.EVETEST_TPMandEVETEST_FILESYSTEM(
ext4|zfs, defaultext4) are the other parameters. Thecheckpoints to watch are
app-is-deployed(the app must land on its preferreddesignated node while that node is healthy),
failed-over(the replicarescheduled onto another node with the powered-off one excluded from the
lookup),
purge-issued, andpurge-end-state-asserted— the last is where apurge that never completes shows up, as
expected exactly one VMIRS for the app, found []after the 15-minute budget.Against master it fails there by design; see the dependency note above.
To confirm the test can fail: the decisive check is "exactly one VMIRS, named
for the new generation", which a resurrected or stranded generation breaks.
Changelog notes
None — test-only.
PR Backports
Checklist