Skip to content
Snippets Groups Projects
Commit 5d59a54f authored by Elena Gryaznova's avatar Elena Gryaznova
Browse files

b=16716

i=Nathan.Rutman
restore the original at_max on all nodes
parent 37fa2a1d
No related branches found
No related tags found
No related merge requests found
...@@ -1370,19 +1370,29 @@ run_test 62 "don't mis-drop resent replay" ...@@ -1370,19 +1370,29 @@ run_test 62 "don't mis-drop resent replay"
#Adaptive Timeouts (bug 3055) #Adaptive Timeouts (bug 3055)
AT_MAX_SET=0 AT_MAX_SET=0
# Suppose that all osts have the same at_max
for facet in mds client ost; do
eval AT_MAX_SAVE_${facet}=$(at_max_get $facet)
done
at_start() at_start()
{ {
local at_max_new=600
if ! at_is_valid; then if ! at_is_valid; then
skip "AT env is invalid" skip "AT env is invalid"
return 1 return 1
fi fi
if ! at_is_enabled; then local at_max
echo "AT is disabled, enable it by force temporarily"
at_max_set 600 mds ost client for facet in mds client ost; do
AT_MAX_SET=1 at_max=$(at_max_get $facet)
fi if [ $at_max -ne $at_max_new ]; then
echo "AT value on $facet is $at_max, set it by force temporarily to $at_max_new"
at_max_set $at_max_new $facet
AT_MAX_SET=1
fi
done
if [ -z "$ATOLDBASE" ]; then if [ -z "$ATOLDBASE" ]; then
local at_history=$(do_facet mds "find /sys/ -name at_history") local at_history=$(do_facet mds "find /sys/ -name at_history")
...@@ -1561,8 +1571,15 @@ if [ -n "$ATOLDBASE" ]; then ...@@ -1561,8 +1571,15 @@ if [ -n "$ATOLDBASE" ]; then
fi fi
if [ $AT_MAX_SET -ne 0 ]; then if [ $AT_MAX_SET -ne 0 ]; then
echo "restore AT status to be disabled" for facet in mds client ost; do
at_max_set 0 mds ost client var=AT_MAX_SAVE_${facet}
echo restore AT on $facet to saved value ${!var}
at_max_set ${!var} $facet
AT_NEW=$(at_max_get $facet)
echo Restored AT value on $facet $AT_NEW
[ $AT_NEW -ne ${!var} ] && \
error "$facet : AT value was not restored SAVED ${!var} NEW $AT_NEW"
done
fi fi
# end of AT tests includes above lines # end of AT tests includes above lines
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment