@@ -38,7 +38,7 @@ sleep $SleepInSecs
3838verify_sample_workload_by_pod_status workloadPodNameNew workloadNodeNameNew
3939if [[ " $workloadPodName " == " $workloadPodNameNew " ]] ; then
4040 print_logs_error " workload pod $workloadPodName should be killed and new workload should be started"
41- print_debug_on_ERR
41+ print_debug
4242 fast_exit
4343fi
4444
@@ -92,20 +92,20 @@ print_logs_info "running 'kubectl delete po' by background task"
9292sleep $SleepInSecs
9393
9494podState=$( get_pod_state $workloadPodName $workloadNodeName )
95- if [[ -z $podState || " $podState " != " Terminating " ]]; then
96- print_logs_error " Workload pod $workloadPodName should be in Terminating state on node $workloadNodeName , but its actual state is $podState "
97- print_debug_on_ERR
95+ if [[ " $podState " != " Terminating " && " $podState " != " Error " ]]; then
96+ print_logs_error " Workload pod $workloadPodName should be in Error/ Terminating state on node $workloadNodeName , but its actual state is $podState "
97+ print_debug
9898 fast_exit
9999else
100- print_logs_info " Workload pod $workloadPodName is in Terminating state on node $workloadNodeName "
100+ print_logs_info " Workload pod $workloadPodName is in Error state on node $workloadNodeName "
101101fi
102102
103103
104104print_logs_title " Verify the new workload pod in Running state on other nodes or ContainerCreating state on the same node"
105105verify_sample_workload_by_pod_status workloadPodNameNew workloadNodeNameNew " Running\|ContainerCreating"
106106if [[ " $workloadPodName " == " $workloadPodNameNew " ]] ; then
107107 print_logs_error " New workload pod should be started, but still find old running pod $workloadPodName "
108- print_debug_on_ERR
108+ print_debug
109109 fast_exit
110110else
111111 print_logs_info " new workload pod $workloadPodNameNew started on another node $workloadNodeNameNew "
@@ -119,7 +119,7 @@ sleep $SleepInSecs
119119podState=$( get_pod_state $NodePodNameKeyword $workloadNodeName )
120120if [[ -z " $podState " || " $podState " != " Running" ]]; then
121121 print_logs_error " Lustre CSI node pod can't be started on $nodeName , state=$podState "
122- print_debug_on_ERR
122+ print_debug
123123 fast_exit
124124else
125125 print_logs_info " Lustre CSI node pod started on $nodeName again"
@@ -132,7 +132,7 @@ sleep $SleepInSecs
132132podState=$( get_pod_state $workloadPodName $workloadNodeName )
133133if [[ ! -z $podState ]]; then
134134 print_logs_error " Still can find workload pod $workloadPodName in $podState state on node $workloadNodeName , it should be deleted successfully"
135- print_debug_on_ERR
135+ print_debug
136136 fast_exit
137137else
138138 print_logs_info " workload pod $workloadPodName has been deleted successfully from node $workloadNodeName "
0 commit comments