You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 08e3836
Browse filesBrowse the repository at this point in the historyBrowse files
fix(e2e): compare LINSTOR pool datasets, not free bytes, at cleanup
For a node with only thick ZFS pools, `linstor sp l` reports the free
capacity cached at the satellite's last report rather than asking the
satellite, and that report can land while `zfs destroy` is still
freeing blocks in the background. A cleanup that had removed every
volume it created could then wait out its whole budget against a
figure that never moved. That residue has reached about 0.9 GiB, with
no known upper bound, against 1 GiB for the smallest volume a suite is
known to have leaked, so a byte tolerance has no safe value between
the two.
Record the datasets under each node's pool before the suite, read with
`zfs list` on that node's satellite, and wait until no dataset outside
that set remains. A leaked volume is then reported by name and node,
and a destroy still freeing space in the background does not count.
Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <[email protected]>
if [ -n"$_current" ] && _residue=$(cozy_linstor_pool_new_datasets "$_baseline""$_current");then
603
+
echo"» LINSTOR pools hold no dataset beyond their pre-suite baseline"
588
604
return 0
589
605
fi
590
606
if [ "$(date +%s)"-ge"$_deadline" ];then
591
607
echo"» ERROR: LINSTOR pools did not return to their pre-suite baseline within ${_timeout}s; a worker or CDI scratch volume may still occupy ZFS space">&2
592
-
printf'%s\n'"$_baseline"| sed 's/^/ baseline-free-kib: /'>&2
593
-
printf'%s\n'"${_current:-<the LINSTOR pool probe returned nothing>}"| sed 's/^/ current-free-kib: /'>&2
608
+
if [ -z"$_current" ];then
609
+
echo" linstor-pool: the dataset probe returned nothing">&2
610
+
else
611
+
printf'%s\n'"$_residue"| sed 's/^/ linstor-pool: /'>&2
612
+
fi
594
613
return 1
595
614
fi
596
615
sleep 5
@@ -660,13 +679,13 @@ cozy_cleanup() {
660
679
echo"» ERROR: cleanup has no test name; scoped tenant drain cannot be verified">&2
661
680
cleanup_failed=1
662
681
fi
663
-
# Wait for this suite's saved per-node baseline: that catches delayed physical
664
-
#teardown, DRBD's included, without requiring volumes the suite did not
665
-
# create to vanish.
682
+
# Wait for this suite's saved per-node baseline: that catches a volume LINSTOR
683
+
#has not destroyed yet, or never will, without requiring volumes the suite
684
+
#did not create to vanish. Blocks a destroy is still freeing do not count.
666
685
local pool_rc=0
667
686
cozy_wait_linstor_pool_baseline 300 || pool_rc=$?
668
687
if [ "$pool_rc"-eq 1 ];then
669
-
echo"» ERROR: LINSTOR capacity did not return to the pre-suite level">&2
688
+
echo"» ERROR: LINSTOR pools did not return to the pre-suite level">&2
670
689
fi
671
690
[ "$pool_rc"-eq 0 ] || cleanup_failed=1
672
691
return"$cleanup_failed"
@@ -5082,7 +5101,7 @@ run_kubernetes_test() {
5082
5101
return 1
5083
5102
fi
5084
5103
# Save the post-stale-cleanup state for the separate Chainsaw `finally` shell;
5085
-
# cleanup later verifies that this suite returned every node to these figures.
5104
+
# cleanup later verifies that this suite left no dataset outside this listing.
5086
5105
if! cozy_capture_linstor_pool_baseline;then
5087
5106
echo"cannot verify LINSTOR reclamation without a complete baseline">&2
0 commit comments