Adding upstream version 4.3+20240723.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
c0f6a5a1b7
commit
3ea4f9a80b
70 changed files with 1465 additions and 1206 deletions
|
@ -9,7 +9,8 @@ check all state UU
|
|||
check all dmesg
|
||||
mdadm --manage $md0 --fail $dev0 --remove $dev0
|
||||
mdadm --manage $md0 --re-add $dev0
|
||||
check $NODE1 recovery
|
||||
#non-clustered array also doesn't do sync job
|
||||
#check $NODE1 recovery
|
||||
check all wait
|
||||
check all state UU
|
||||
check all dmesg
|
||||
|
|
|
@ -9,6 +9,7 @@ check all state UU
|
|||
check all dmesg
|
||||
mdadm --manage $md0 --fail $dev0 --remove $dev0
|
||||
mdadm --manage $md0 --re-add $dev0
|
||||
check all wait
|
||||
check all state UU
|
||||
check all dmesg
|
||||
stop_md all $md0
|
||||
|
|
|
@ -10,9 +10,9 @@ check all state UU
|
|||
check all dmesg
|
||||
mdadm --manage $md0 --fail $dev0
|
||||
sleep 0.2
|
||||
check $NODE1 recovery
|
||||
check $NODE1 recovery-remote
|
||||
stop_md $NODE1 $md0
|
||||
check $NODE2 recovery
|
||||
check $NODE2 recovery-remote
|
||||
check $NODE2 wait
|
||||
check $NODE2 state UU
|
||||
check all dmesg
|
||||
|
|
|
@ -10,9 +10,9 @@ check all state UU
|
|||
check all dmesg
|
||||
mdadm --manage $md0 --fail $dev0
|
||||
sleep 0.3
|
||||
check $NODE1 recovery
|
||||
check $NODE1 recovery-remote
|
||||
stop_md $NODE1 $md0
|
||||
check $NODE2 recovery
|
||||
check $NODE2 recovery-remote
|
||||
check $NODE2 wait
|
||||
check $NODE2 state UU
|
||||
check all dmesg
|
||||
|
|
|
@ -1,5 +1,22 @@
|
|||
#!/bin/bash
|
||||
|
||||
COLOR_FAIL='\033[0;31m' #RED
|
||||
COLOR_WARN='\033[1;33m' #YELLOW
|
||||
COLOR_SUCCESS='\033[0;32m' #GREEN
|
||||
COLOR_NONE='\033[0m'
|
||||
|
||||
fail() {
|
||||
printf "${COLOR_FAIL}$1${COLOR_NONE}"
|
||||
}
|
||||
|
||||
warn() {
|
||||
printf "${COLOR_WARN}$1${COLOR_NONE}"
|
||||
}
|
||||
|
||||
succeed() {
|
||||
printf "${COLOR_SUCCESS}$1${COLOR_NONE}"
|
||||
}
|
||||
|
||||
check_ssh()
|
||||
{
|
||||
NODE1="$(grep '^NODE1' $CLUSTER_CONF | cut -d'=' -f2)"
|
||||
|
@ -151,6 +168,33 @@ stop_md()
|
|||
fi
|
||||
}
|
||||
|
||||
record_system_speed_limit() {
|
||||
system_speed_limit_max=`cat /proc/sys/dev/raid/speed_limit_max`
|
||||
system_speed_limit_min=`cat /proc/sys/dev/raid/speed_limit_min`
|
||||
}
|
||||
|
||||
# To avoid sync action finishes before checking it, it needs to limit
|
||||
# the sync speed
|
||||
control_system_speed_limit() {
|
||||
echo $test_speed_limit_min > /proc/sys/dev/raid/speed_limit_min
|
||||
echo $test_speed_limit_max > /proc/sys/dev/raid/speed_limit_max
|
||||
}
|
||||
|
||||
restore_system_speed_limit() {
|
||||
echo $system_speed_limit_min > /proc/sys/dev/raid/speed_limit_max
|
||||
echo $system_speed_limit_max > /proc/sys/dev/raid/speed_limit_max
|
||||
}
|
||||
|
||||
record_selinux() {
|
||||
# empty
|
||||
return 0
|
||||
}
|
||||
|
||||
restore_selinux() {
|
||||
# empty
|
||||
return 0
|
||||
}
|
||||
|
||||
# $1/optional, it shows why to save log
|
||||
save_log()
|
||||
{
|
||||
|
@ -240,6 +284,22 @@ check()
|
|||
die "$ip: check '$2' failed."
|
||||
done
|
||||
;;
|
||||
recovery-remote )
|
||||
cnt=5
|
||||
for ip in ${NODES[@]}
|
||||
do
|
||||
while ! ssh $ip "grep -sqE 'recovery|REMOTE' /proc/mdstat"
|
||||
do
|
||||
if [ "$cnt" -gt '0' ]
|
||||
then
|
||||
sleep 0.2
|
||||
cnt=$[cnt-1]
|
||||
else
|
||||
die "$ip: no '$2' happening!"
|
||||
fi
|
||||
done
|
||||
done
|
||||
;;
|
||||
PENDING | recovery | resync | reshape )
|
||||
cnt=5
|
||||
for ip in ${NODES[@]}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue