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 cb7a579
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
605
+
echo"» LINSTOR pools hold no dataset beyond their pre-suite baseline"
588
606
return 0
589
607
fi
590
608
if [ "$(date +%s)"-ge"$_deadline" ];then
591
609
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
610
+
if [ -z"$_current" ];then
611
+
echo" linstor-pool: the dataset probe returned nothing">&2
612
+
else
613
+
printf'%s\n'"$_residue"| sed 's/^/ linstor-pool: /'>&2
614
+
fi
594
615
return 1
595
616
fi
596
617
sleep 5
@@ -660,13 +681,13 @@ cozy_cleanup() {
660
681
echo"» ERROR: cleanup has no test name; scoped tenant drain cannot be verified">&2
661
682
cleanup_failed=1
662
683
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.
684
+
# Wait for this suite's saved per-node baseline: that catches a volume LINSTOR
685
+
#has not destroyed yet, or never will, without requiring volumes the suite
686
+
#did not create to vanish. Blocks a destroy is still freeing do not count.
666
687
local pool_rc=0
667
688
cozy_wait_linstor_pool_baseline 300 || pool_rc=$?
668
689
if [ "$pool_rc"-eq 1 ];then
669
-
echo"» ERROR: LINSTOR capacity did not return to the pre-suite level">&2
690
+
echo"» ERROR: LINSTOR pools did not return to the pre-suite level">&2
670
691
fi
671
692
[ "$pool_rc"-eq 0 ] || cleanup_failed=1
672
693
return"$cleanup_failed"
@@ -5082,7 +5103,7 @@ run_kubernetes_test() {
5082
5103
return 1
5083
5104
fi
5084
5105
# 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.
5106
+
# cleanup later verifies that this suite left no dataset outside this listing.
5086
5107
if! cozy_capture_linstor_pool_baseline;then
5087
5108
echo"cannot verify LINSTOR reclamation without a complete baseline">&2
0 commit comments