mirror of https://github.com/openzfs/zfs.git
ZTS: zed_start should not fail if zed is already running
zed_start may be called in places where zed is not typically already running, but this is not a requirement of the tests. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Olaf Faaland <faaland1@llnl.gov> Closes #9974
This commit is contained in:
parent
c6a6b4d50a
commit
034313908a
|
@ -3621,15 +3621,15 @@ function zed_start
|
||||||
# Verify the ZED is not already running.
|
# Verify the ZED is not already running.
|
||||||
pgrep -x zed > /dev/null
|
pgrep -x zed > /dev/null
|
||||||
if (($? == 0)); then
|
if (($? == 0)); then
|
||||||
log_fail "ZED already running"
|
log_note "ZED already running"
|
||||||
fi
|
else
|
||||||
|
|
||||||
log_note "Starting ZED"
|
log_note "Starting ZED"
|
||||||
# run ZED in the background and redirect foreground logging
|
# run ZED in the background and redirect foreground logging
|
||||||
# output to $ZED_LOG.
|
# output to $ZED_LOG.
|
||||||
log_must truncate -s 0 $ZED_DEBUG_LOG
|
log_must truncate -s 0 $ZED_DEBUG_LOG
|
||||||
log_must eval "zed -vF -d $ZEDLET_DIR -p $ZEDLET_DIR/zed.pid -P $PATH" \
|
log_must eval "zed -vF -d $ZEDLET_DIR -p $ZEDLET_DIR/zed.pid -P $PATH" \
|
||||||
"-s $ZEDLET_DIR/state 2>$ZED_LOG &"
|
"-s $ZEDLET_DIR/state 2>$ZED_LOG &"
|
||||||
|
fi
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue