]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ZTS: Fix auto_replace_001_pos test
authorBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 29 Oct 2018 20:05:14 +0000 (15:05 -0500)
committerGitHub <noreply@github.com>
Mon, 29 Oct 2018 20:05:14 +0000 (15:05 -0500)
commitbea75783565eeef4a083892dd4ee28106b092810
tree58819704d71bd1f6f9381b317e9a6683dd773cc2
parentb74f48fe1b15b4958da35413edd89060df7a1c30
ZTS: Fix auto_replace_001_pos test

The root cause of these failures is that udev can notify the
ZED of newly created partition before its links are created.
Handle this by allowing an auto-replace to briefly wait until
udev confirms the links exist.

Distill this test case down to its essentials so it can be run
reliably.  What we need to check is that:

  1) A new disk, in the same physical location, is automatically
     brought online when added to the system,
  2) It completes the replacement process, and
  3) The pool is now ONLINE and healthy.

There is no need to remove the scsi_debug module.  After exporting
the pool the disk can be zeroed, removed, and then re-added to the
system as a new disk.

Reviewed by: loli10K <ezomori.nozomu@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #8051
cmd/zed/agents/zfs_mod.c
tests/zfs-tests/tests/functional/fault/auto_replace_001_pos.ksh
tests/zfs-tests/tests/functional/fault/fault.cfg