Whamcloud - gitweb
LU-16239 tests: do not cleanup clients dirs 70/48870/4
authorElena Gryaznova <elena.gryaznova@hpe.com>
Fri, 14 Oct 2022 14:51:03 +0000 (17:51 +0300)
committerOleg Drokin <green@whamcloud.com>
Thu, 19 Jan 2023 15:31:03 +0000 (15:31 +0000)
Patch adds the ability to not remove the clients
directories. Let's just rename them if CLEANUP set to
false.

Test-Parameters: trivial
Signed-off-by: Elena Gryaznova <elena.gryaznova@hpe.com>
HPE-bug-id: LUS-11158
Reviewed-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Change-Id: Ibc55d32ef4946a62b00dcbf745567c123650ced9
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48870
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/ha.sh

index 352bdaa..0cfd595 100755 (executable)
@@ -527,9 +527,14 @@ ha_repeat_mpi_load()
                        $check_attrs " && rccheck=1
                [[ -n "$ha_postcmd" ]] && ha_info "$ha_postcmd" &&
                        ha_on $client "$ha_postcmd" >>"$log" 2>&1
-               (( ((rc == 0)) && ((rccheck == 0)) && (( mustpass != 0 )) )) ||
-               (( ((rc != 0)) && ((rccheck == 0)) && (( mustpass == 0 )) )) &&
-               ha_on $client rm -rf "$dir";
+               if (( ((rc == 0)) && ((rccheck == 0)) && \
+                       (( mustpass != 0 )) )) ||
+                       (( ((rc != 0)) && ((rccheck == 0)) && \
+                       (( mustpass == 0 )) )); then
+                       local suf=$(date +%s)
+                       $ha_cleanup && ha_on $client rm -rf "$dir" ||
+                               ha_on $client mv "$dir" "${dir}.${suf}"
+               fi;
                } >>"$log" 2>&1
 
                ha_info $client: rc=$rc rccheck=$rccheck mustpass=$mustpass