Check connect_flags before enabling jobstats in the t-f.
Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ib36575fe7d08b257a2a7dda86851806bf44d7a41
Reviewed-on: http://review.whamcloud.com/3806
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
}
test_205() { # Job stats
+ [ -z "$(lctl get_param -n mdc.*.connect_flags | grep jobstats)" ] &&
+ skip "Server doesn't support jobstats" && return 0
+
local cmd
OLD_JOBENV=`$LCTL get_param -n jobid_var`
if [ $OLD_JOBENV != $JOBENV ]; then
osc_ensure_active client $TIMEOUT
local jobid_var
- if [ $JOBSTATS_AUTO -ne 0 ]; then
+ if [ -z "$(lctl get_param -n mdc.*.connect_flags | grep jobstats)" ]; then
+ jobid_var="none"
+ elif [ $JOBSTATS_AUTO -ne 0 ]; then
echo "enable jobstats, set job scheduler as $JOBID_VAR"
jobid_var=$JOBID_VAR
else