mirror of
https://github.com/schoebel/mars
synced 2025-01-20 22:41:05 +00:00
test_suite: fix check for logfiles of host beeing nor primary nor designated primary
This commit is contained in:
parent
c831e34cec
commit
eafdd66914
@ -93,10 +93,17 @@ function logrotate_loop
|
||||
if [ \( $logrotate_rc_act -ne 0 -a $logrotate_rc_req -eq 0 \) \
|
||||
-o \( $logrotate_rc_act -eq 0 -a $logrotate_rc_req -ne 0 \) ]
|
||||
then
|
||||
lib_exit 1 "required rc = $logrotate_rc_req != $logrotate_rc_act = act. rc"
|
||||
lib_exit 1 \
|
||||
"required rc = $logrotate_rc_req != $logrotate_rc_act = act. rc"
|
||||
fi
|
||||
# log-delete-all may delete *all* logfiles generated by host if the host
|
||||
# is nor the primary nor the designated primary. Thus if count > 0
|
||||
# we omit the check for the last logfile in this situation.
|
||||
if [ ! \( $rc_prim -eq 0 -a $rc_desig_prim -eq 0 -a count -gt 0 \) ]
|
||||
then
|
||||
logfile=$(marsadm_get_last_logfile $host $res $host) || lib_exit 1
|
||||
lib_vmsg " last logfile $host:$logfile"
|
||||
fi
|
||||
logfile=$(marsadm_get_last_logfile $host $res $host) || lib_exit 1
|
||||
lib_vmsg " last logfile $host:$logfile"
|
||||
if [ $(($count % $logrotate_number_of_rotates_before_delete)) -eq 0 ]
|
||||
then
|
||||
marsadm_do_cmd $host "log-delete-all" $res || lib_exit 1
|
||||
|
Loading…
Reference in New Issue
Block a user