Emit history events for 'zpool create'

History commands and events were being suppressed for the
'zpool create' command since the history object did not
yet exist.  Create the object earlier so this history
doesn't get lost.

Split the pool_destroy event in to pool_destroy and
pool_export so they may be distinguished.

Updated events_001_pos and events_002_pos test cases.  They
now check for the expected history events and were reworked
to be more reliable.

Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #6712 
Closes #6486
This commit is contained in:
Brian Behlendorf
2017-10-23 09:45:59 -07:00
committed by GitHub
parent 1cfdb0e6e4
commit d5e024cba2
9 changed files with 132 additions and 69 deletions
+3 -1
View File
@@ -179,6 +179,8 @@ if is_linux; then
DEV_MPATHDIR="/dev/mapper"
ZEDLET_DIR="/var/tmp/zed"
ZED_LOG="$ZEDLET_DIR/zed.log"
ZED_DEBUG_LOG="$ZEDLET_DIR/zed.debug.log"
VDEVID_CONF="$ZEDLET_DIR/vdev_id.conf"
VDEVID_CONF_ETC="/etc/zfs/vdev_id.conf"
@@ -200,4 +202,4 @@ else
fi
export unpack_opts pack_opts verbose unpack_preserve pack_preserve \
ZVOL_DEVDIR ZVOL_RDEVDIR NEWFS_DEFAULT_FS DEV_RDSKDIR DEV_MPATHDIR \
ZEDLET_DIR VDEVID_CONF VDEVID_CONF_ETC
ZEDLET_DIR ZED_LOG ZED_DEBUG_LOG VDEVID_CONF VDEVID_CONF_ETC