]> granicus.if.org Git - zfs/commitdiff
OpenZFS 7761 - bootfs_005_neg's pool destruction must handle EBUSY
authorPrakash Surya <prakash.surya@delphix.com>
Thu, 12 Jan 2017 00:36:58 +0000 (16:36 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 24 Feb 2017 19:06:14 +0000 (11:06 -0800)
Authored by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Yuri Pankov <yuri.pankov@gmail.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Ported-by: George Melikov <mail@gmelikov.ru>
OpenZFS-issue: https://www.illumos.org/issues/7761
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/ad309d3
Closes #5818

tests/zfs-tests/tests/functional/bootfs/bootfs_005_neg.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/zpool_upgrade.kshlib

index f09b32d2b0e932c6d24a7efea3a561f0cf31978b..82932a7dcd161e1a9ba889ee1d022c24b18635c1 100755 (executable)
@@ -26,7 +26,7 @@
 #
 
 #
-# Copyright (c) 2012, 2015 by Delphix. All rights reserved.
+# Copyright (c) 2012, 2017 by Delphix. All rights reserved.
 #
 
 . $STF_SUITE/include/libtest.shlib
@@ -53,14 +53,10 @@ function cleanup {
        typeset pool_name
        for config in $CONFIGS; do
                pool_name=$(eval $ECHO \$ZPOOL_VERSION_${config}_NAME)
-               if poolexists $pool_name; then
-                       log_must $ZPOOL destroy $pool_name
-               fi
+               destroy_pool $pool_name
        done
 
-       if poolexists $TESTPOOL ; then
-               log_must $ZPOOL destroy $TESTPOOL
-       fi
+       destroy_pool $TESTPOOL
 }
 
 log_assert "Boot properties cannot be set on pools with older versions"
index d2d0eafe27af51ed5db73c6fd5d8f617052a18c8..0252cac70b0f304ad2fd1d2e6ba1e938a39722ef 100644 (file)
@@ -25,7 +25,7 @@
 #
 
 #
-# Copyright (c) 2012 by Delphix. All rights reserved.
+# Copyright (c) 2012, 2017 by Delphix. All rights reserved.
 # Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
 #
 
@@ -93,9 +93,7 @@ function destroy_upgraded_pool
        typeset -n pool_files=ZPOOL_VERSION_${vers}_FILES
        typeset -n pool_name=ZPOOL_VERSION_${vers}_NAME
 
-       if poolexists $pool_name; then
-               log_must $ZPOOL destroy $pool_name
-       fi
+       destroy_pool $pool_name
        for file in $pool_files; do
                $RM -f /$TESTPOOL/$file
        done