Skip to content
Browse files

I have ported setup.ksh history_001_neg.ksh history_003_neg.ksh histo…

…ry_005_neg.ksh history_007_neg.ksh from history script.
  • Loading branch information...
1 parent 0400af1 commit c66aeea6f225ab6a2b4aa452022d678a43f62791 @vikramjadhav vikramjadhav committed
View
2 ZFS-Test_Suite/tests/functional/history/#README#
@@ -0,0 +1,2 @@
+
+Install ncompress
View
98 ZFS-Test_Suite/tests/functional/history/#history_006_neg.ksh#
@@ -0,0 +1,98 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)history_006_neg.ksh 1.2 07/01/09 SMI"
+#
+
+. $STF_SUITE/commands.cfg
+. $STF_SUITE/include/libtest.kshlib
+. $STF_SUITE/include/default_common_varible.kshlib
+. $STF_SUITE/tests/functional/history/history_common.kshlib
+. history.cfg
+
+#################################################################################
+#
+# __stc_assertion_start
+#
+# ID: history_006_neg
+#
+# DESCRIPTION:
+# Verify the following zfs subcommands are not logged.
+# list, get, mount, unmount, share, unshare, send
+#
+# STRATEGY:
+# 1. Create a test pool.
+# 2. Separately invoke zfs list|get|mount|unmount|share|unshare|send
+# 3. Verify they was not recored in pool history.
+#
+# TESTABILITY: explicit
+#
+# TEST_AUTOMATION_LEVEL: automated
+#
+# CODING_STATUS: COMPLETED (2006-07-05)
+#
+# __stc_assertion_end
+#
+################################################################################
+
+verify_runnable "global"
+
+function cleanup
+{
+ [[ -f $EXPECT_HISTORY ]] && $RM -f $EXPECT_HISTORY
+ [[ -f $REAL_HISTORY ]] && $RM -f $REAL_HISTORY
+ if datasetexists $fs ; then
+ log_must $ZFS destroy -rf $fs
+ fi
+ log_must $ZFS create $fs
+}
+
+log_assert "Verify 'zfs list|get|mount|unmount|share|unshare|send' will not " \
+ "be logged."
+log_onexit cleanup
+
+# Create initial test environment
+fs=$TESTPOOL/$TESTFS; snap1=$fs@snap1; snap2=$fs@snap2
+log_must $ZFS set sharenfs=on $fs
+log_must $ZFS set sharesmb=on $fs
+log_must $ZFS snapshot $snap1
+log_must $ZFS snapshot $snap2
+
+# Save initial TESTPOOL history
+log_must eval "$ZPOOL history $TESTPOOL > $EXPECT_HISTORY"
+
+log_must $ZFS list $fs > /dev/null
+log_must $ZFS get mountpoint $fs > /dev/null
+log_must $ZFS unmount $fs
+log_must $ZFS mount $fs
+$ZFS share $fs
+$ZFS unshare $fs
+log_must $ZFS send -i $snap1 $snap2 > /dev/null
+
+log_must eval "$ZPOOL history $TESTPOOL > $REAL_HISTORY"
+log_must $DIFF $EXPECT_HISTORY $REAL_HISTORY
+
+log_pass "Verify 'zfs list|get|mount|unmount|share|unshare|send' passed."
View
242 ZFS-Test_Suite/tests/functional/history/#history_common.kshlib#
@@ -0,0 +1,242 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)history_common.kshlib 1.3 07/07/31 SMI"
+#
+
+. $STF_SUITE/include/libtest.kshlib
+
+#
+# Execute arguments and record them to the log file.
+# Notice: EXPECT_HISTORY need be defined.
+#
+# $1-n arguments for execution.
+#
+function exec_record
+{
+ [[ -z $EXPECT_HISTORY ]] && log_fail "EXPECT_HISTORY is undefined."
+
+ typeset long_hist
+ typeset user='root'
+ typeset opt
+ while getopts ":lu:" opt; do
+ case $opt in
+ l) long_hist=1;;
+ u) user=$OPTARG ;;
+ esac
+ done
+ shift $(($OPTIND -1))
+
+ if [[ $user == 'root' ]]; then
+ log_must "$@"
+ else
+ log_must $SU $user -c "$@"
+ fi
+
+ typeset cmdline="$@"
+ # Remove "eval" ">*" & "<*" for 'zfs send' and 'zfs receive'.
+ cmdline=${cmdline#eval}
+ cmdline=${cmdline%%\>*}
+ cmdline=${cmdline%%\<*}
+
+ # Remove additional blank
+ cmdline=${cmdline## }
+ cmdline=${cmdline%% }
+
+ # Get the basename of command. i.e: /usr/sbin/zpool -> zpool
+ typeset cmd=$($ECHO $cmdline | $AWK '{print $1}')
+ eval cmdline=\${cmdline#$cmd}
+ cmd=${cmd##*/}
+
+ # Write basic history to file
+ print -n $cmd $cmdline >> $EXPECT_HISTORY
+ if [[ -n $long_hist ]]; then
+ # Write long history to file
+ hn=$($HOSTNAME)
+ zn=$($ZONENAME)
+ print -n " [user $user on $hn:$zn]" >> $EXPECT_HISTORY
+ fi
+ # Plus enter in the end of line
+ print >> $EXPECT_HISTORY
+}
+
+#
+# Format 'zpool history' output to specified file.
+#
+# $1 pool name
+# $2 output file.
+# $3 option
+#
+function format_history
+{
+ typeset pool=$1
+ typeset outfile=$2
+ typeset option=$3
+
+ [[ -z $pool || -z $outfile ]] && \
+ log_fail "Usage: format_history <pool> <outfile> [option]"
+
+ typeset temp_history=/tmp/temp_history.format_history.$$
+ $ZPOOL history $option $pool > $temp_history
+
+ # Truncate output file
+ $CAT /dev/null > $outfile
+
+ typeset line
+ typeset -i n=0
+ while read line; do
+ # Ignore the first line and empty line
+ if [[ $n -eq 0 || -z $line ]]; then
+ n=1; continue
+ fi
+ $ECHO ${line#* } >> $outfile
+ done < $temp_history
+
+ $RM -f $temp_history
+}
+
+#
+# Get the additional pool history.
+#
+# $1 pool name
+# $2 additional history file
+# $3 option
+#
+function additional_history
+{
+ typeset pool=$1
+ typeset add_his_file=$2
+ typeset option=$3
+
+ if [[ -z $pool || -z $add_his_file ]]; then
+ log_fail "Usage: additional_history <pool> " \
+ "<additional_history_file> [option]"
+ fi
+
+ typeset temp_history=/tmp/temp_history.additional_history.$$
+ # Current current history
+ format_history $pool $temp_history $option
+ # Figure out new history
+ $DIFF $temp_history $REAL_HISTORY | $GREP "^<" | $SED 's/^<[ ]*//' > \
+ $add_his_file
+
+ $CP $temp_history $REAL_HISTORY
+ $RM -f $temp_history
+}
+
+#
+# Get given dataset id
+#
+# $1 dataset name
+#
+function get_dataset_id
+{
+ typeset ds=$1
+
+ #
+ # The zdb information looks like:
+ #
+ # Dataset pool/fs [ZPL], ID 21, cr_txg 6, 18.0K, 4 objects
+ #
+ typeset dst_id=$($ZDB $ds | $GREP "^Dataset $ds " | \
+ $AWK -F\, '{print $2}' | $AWK '{print $2}')
+
+ $ECHO $dst_id
+}
+
+#
+# Scan history file and check if it include expected internal history
+# information
+#
+# $1 history file
+# $2 subcmd
+# $3 dataset
+# $4 keyword
+#
+function verify_history #<his_file> <subcmd> <ds> [keyword]
+{
+ typeset his_file=$1
+ typeset subcmd=$2
+ typeset ds=$3
+ typeset keyword=$4
+
+ typeset dst_id=$(get_dataset_id $ds)
+ typeset line found=0
+ while read line; do
+ case $subcmd in
+ snapshot|rollback|destroy|inherit)
+ #
+ # i.e:
+ # [internal snapshot txg:10] dataset = 21
+ # [internal create txg:25] dataset = 29
+ #
+ $ECHO $line | $GREP "internal $subcmd txg:" | \
+ $GREP "dataset = $dst_id" > /dev/null 2>&1
+ if (($? == 0)); then
+ found=1
+ break 2
+ fi
+ ;;
+ allow)
+ #
+ # [internal permission update txg:136] ud$160293
+ # snapshot dataset = 21
+ #
+ $ECHO $line | \
+ $GREP "internal permission update txg:"| \
+ $GREP "$keyword" | \
+ $GREP "dataset = $dst_id" > \
+ /dev/null 2>&1
+ if (($? == 0)); then
+ found=1
+ break 2
+ fi
+ ;;
+ unallow)
+ #
+ # [internal permission update txg:444] ud$160293 mount
+ # dataset = 21
+ #
+ $ECHO $line | \
+ $GREP "internal permission remove txg:"| \
+ $GREP "$keyword" | \
+ $GREP "dataset = $dst_id" > \
+ /dev/null 2>&1
+ if (($? == 0)); then
+ found=1
+ break 2
+ fi
+ ;;
+ *)
+ ;;
+ esac
+ done < $his_file
+
+ if [[ $found == 1 ]]; then
+ return 0
+ else
+ return 1
+ fi
+}
View
1 ZFS-Test_Suite/tests/functional/history/.#README
View
1 ZFS-Test_Suite/tests/functional/history/.#history_006_neg.ksh
View
51 ZFS-Test_Suite/tests/functional/history/Makefile
@@ -0,0 +1,51 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)Makefile 1.3 07/05/25 SMI"
+#
+
+STF_USER_CONFIGURE=
+STF_ROOT_CONFIGURE=
+
+STF_ROOT_SETUP=setup
+STF_USER_SETUP=
+
+STF_ROOT_CLEANUP=cleanup
+STF_USER_CLEANUP=
+
+STF_ROOT_TESTCASES=history_001_pos history_002_pos \
+ history_003_pos history_004_pos history_005_neg history_006_neg \
+ history_007_pos history_008_pos history_009_pos history_010_pos
+STF_USER_TESTCASES=
+
+STF_ENVFILES=history.cfg
+STF_INCLUDES=history_common.kshlib
+STF_DATAFILES=zfs-pool-v4.dat.Z \
+ i386.migratedpool.DAT.Z i386.orig_history.txt \
+ sparc.migratedpool.DAT.Z sparc.orig_history.txt
+
+STF_DONTBUILDMODES=true
+
+include $(STF_TOOLS)/Makefiles/Makefile.master
View
36 ZFS-Test_Suite/tests/functional/history/cleanup.ksh
@@ -0,0 +1,36 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)cleanup.ksh 1.2 07/01/09 SMI"
+#
+
+. $STF_SUITE/commands.cfg
+. $STF_SUITE/include/libtest.kshlib
+
+$ZPOOL history > /dev/null 2>&1
+(($? != 0)) && log_unsupported
+
+default_cleanup
View
45 ZFS-Test_Suite/tests/functional/history/history.cfg
@@ -0,0 +1,45 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)history.cfg 1.5 08/08/15 SMI"
+#
+
+export ZFSROOT=
+
+export MPOOL=mpool.$$
+
+export EXPECT_HISTORY=/tmp/exp_history.$$
+export REAL_HISTORY=/tmp/real_history.$$
+export ADD_HISTORY=/tmp/add_history.$$
+
+export MIGRATEDPOOLNAME=${MIGRATEDPOOLNAME:-history_pool}
+export TIMEZONE=${TIMEZONE:-US/Mountain}
+
+export STF_TIMEOUT=1800
+
+export HIST_USER="huser"
+export HIST_GROUP="hgroup"
+
+export TESTVOL=testvol.$$
View
145 ZFS-Test_Suite/tests/functional/history/history_001_pos.ksh
@@ -0,0 +1,145 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)history_001_pos.ksh 1.3 07/05/25 SMI"
+#
+
+
+
+. $STF_SUITE/commands.cfg
+. $STF_SUITE/include/libtest.kshlib
+. $STF_SUITE/include/default_common_varible.kshlib
+. $STF_SUITE/tests/functional/history/history_common.kshlib
+. ./history.cfg
+
+#################################################################################
+#
+# __stc_assertion_start
+#
+# ID: history_001_pos
+#
+# DESCRIPTION:
+# Create a scenario to verify the following zpool subcommands are logged.
+# create, destroy, add, remove, offline, online, attach, detach, replace,
+# scrub, export, import, clear, upgrade.
+#
+# STRATEGY:
+# 1. Create three virtual disk files.
+# 2. Create a three-way mirror.
+# 3. Invoke every sub-commands to this mirror, except upgrade.
+# 4. Compare 'zpool history' log with expected log.
+# 5. Imported specified pool and upgrade it, verify 'upgrade' was logged.
+#
+# TESTABILITY: explicit
+#
+# TEST_AUTOMATION_LEVEL: automated
+#
+# CODING_STATUS: COMPLETED (2006-07-05)
+#
+# __stc_assertion_end
+#
+################################################################################
+
+verify_runnable "global"
+
+function cleanup
+{
+ destroy_pool $MPOOL
+ destroy_pool $upgrade_pool
+
+ [[ -d $import_dir ]] && $RM -rf $import_dir
+ for file in $REAL_HISTORY $EXPECT_HISTORY \
+ $VDEV1 $VDEV2 $VDEV3 $VDEV4
+ do
+ [[ -f $file ]] && $RM -f $file
+ done
+}
+
+log_assert "Verify zpool sub-commands which modify state are logged."
+log_onexit cleanup
+
+mntpnt=$(get_prop mountpoint $TESTPOOL)
+(( $? != 0)) && log_fail "get_prop($TESTPOOL mountpoint)"
+VDEV1=$mntpnt/vdev1; VDEV2=$mntpnt/vdev2;
+VDEV3=$mntpnt/vdev3; VDEV4=$mntpnt/vdev4;
+
+log_must $DD if=/dev/zero of=$VDEV1 bs=1M count=64
+log_must $DD if=/dev/zero of=$VDEV2 bs=1M count=64
+log_must $DD if=/dev/zero of=$VDEV3 bs=1M count=64
+log_must $DD if=/dev/zero of=$VDEV4 bs=1M count=100
+
+$CAT /dev/null > $EXPECT_HISTORY
+
+exec_record $ZPOOL create $MPOOL mirror $VDEV1 $VDEV2
+exec_record $ZPOOL add -f $MPOOL spare $VDEV3
+exec_record $ZPOOL remove $MPOOL $VDEV3
+exec_record $ZPOOL offline $MPOOL $VDEV1
+exec_record $ZPOOL online $MPOOL $VDEV1
+exec_record $ZPOOL attach $MPOOL $VDEV1 $VDEV4
+exec_record $ZPOOL detach $MPOOL $VDEV4
+exec_record $ZPOOL replace -f $MPOOL $VDEV1 $VDEV4
+exec_record $ZPOOL scrub $MPOOL
+exec_record $ZPOOL export $MPOOL
+exec_record $ZPOOL import -d $mntpnt $MPOOL
+exec_record $ZPOOL destroy $MPOOL
+exec_record $ZPOOL import -D -f -d $mntpnt $MPOOL
+exec_record $ZPOOL clear $MPOOL
+
+format_history $MPOOL $REAL_HISTORY
+log_must $DIFF $REAL_HISTORY $EXPECT_HISTORY
+
+#
+# Check current system ZFS version.
+# If ZFS version > 4, do upgrade test. Otherwise, ignore it.
+#
+# Format:
+#
+# This system is currently running ZFS version 6.
+#
+typeset str=$($ZPOOL upgrade | $NAWK '{if(NR == 1) print $0}')
+typeset -i version=${str##* }
+if ((version <= 4)); then
+ log_pass "zpool sub-commands which modify state are logged passed. "
+fi
+
+import_dir=/var/tmp/import_dir.$$
+log_must $MKDIR $import_dir
+log_must $CP $STF_SUITE/tests/functional/history/zfs-pool-v4.dat.Z $import_dir
+log_must $UNCOMPRESS $import_dir/zfs-pool-v4.dat.Z
+
+# Truncate $EXPECT_HISTORY file
+log_must eval "$CAT /dev/null > $EXPECT_HISTORY"
+
+upgrade_pool=$($ZPOOL import -d $import_dir | $GREP "pool:" | $AWK '{print $2}')
+exec_record $ZPOOL import -d $import_dir $upgrade_pool
+# Get existing history
+format_history $upgrade_pool $EXPECT_HISTORY
+exec_record $ZPOOL upgrade $upgrade_pool
+
+format_history $upgrade_pool $REAL_HISTORY
+log_must $DIFF $REAL_HISTORY $EXPECT_HISTORY
+
+log_pass "zpool sub-commands which modify state are logged passed. "
View
105 ZFS-Test_Suite/tests/functional/history/history_003_pos.ksh
@@ -0,0 +1,105 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)history_003_pos.ksh 1.2 07/01/09 SMI"
+#
+
+. $STF_SUITE/commands.cfg
+. $STF_SUITE/include/libtest.kshlib
+. $STF_SUITE/include/default_common_varible.kshlib
+. $STF_SUITE/tests/functional/history/history_common.kshlib
+. ./history.cfg
+
+#################################################################################
+#
+# __stc_assertion_start
+#
+# ID: history_003_pos
+#
+# DESCRIPTION:
+# zpool history can record and output huge log.
+#
+# STRATEGY:
+# 1. Create two 100M virtual disk files.
+# 2. Create test pool using the two virtual files.
+# 3. Loop 2000 times to set compression to test pool.
+# 4. Make sure 'zpool history' output correctly.
+#
+# TESTABILITY: explicit
+#
+# TEST_AUTOMATION_LEVEL: automated
+#
+# CODING_STATUS: COMPLETED (2006-07-05)
+#
+# __stc_assertion_end
+#
+################################################################################
+
+verify_runnable "global"
+
+function cleanup
+{
+ datasetexists $spool && log_must $ZPOOL destroy $spool
+ [[ -f $VDEV0 ]] && log_must $RM -f $VDEV0
+ [[ -f $VDEV1 ]] && log_must $RM -f $VDEV1
+}
+
+log_assert "zpool history limitation test."
+log_onexit cleanup
+
+mntpnt=$(get_prop mountpoint $TESTPOOL)
+(( $? != 0 )) && log_fail "get_prop mountpoint $TESTPOOL"
+
+VDEV0=$mntpnt/vdev0; VDEV1=$mntpnt/vdev1
+
+log_must $DD if=/dev/zero of=$VDEV0 bs=1M count=100
+log_must $DD if=/dev/zero of=$VDEV1 bs=1M count=100
+
+spool=smallpool.$$; sfs=smallfs.$$
+log_must $ZPOOL create $spool $VDEV0 $VDEV1
+log_must $ZFS create $spool/$sfs
+
+typeset -i orig_count=$($ZPOOL history $spool | $WC -l | $AWK '{print $1}')
+
+typeset -i i=0
+while ((i < 400)); do
+ $ZFS set compression=off $spool/$sfs
+ $ZFS set compression=on $spool/$sfs
+ $ZFS set compression=off $spool/$sfs
+ $ZFS set compression=on $spool/$sfs
+ $ZFS set compression=off $spool/$sfs
+ ((i += 1))
+ echo "$i.."
+done
+
+typeset -i entry_count=$($ZPOOL history $spool | $WC -l | $AWK '{print $1}')
+
+if ((entry_count - orig_count != 2000)); then
+ log_fail "The entries count error: entry_count=$entry_count " \
+ "orig_count = $orig_count"
+fi
+
+log_pass "zpool history limitation test passed."
View
85 ZFS-Test_Suite/tests/functional/history/history_005_neg.ksh
@@ -0,0 +1,85 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)history_005_neg.ksh 1.2 07/01/09 SMI"
+#
+
+. $STF_SUITE/commands.cfg
+. $STF_SUITE/include/libtest.kshlib
+. $STF_SUITE/include/default_common_varible.kshlib
+. $STF_SUITE/tests/functional/history/history_common.kshlib
+. ./history.cfg
+
+
+#################################################################################
+#
+# __stc_assertion_start
+#
+# ID: history_005_neg
+#
+# DESCRIPTION:
+# Verify the following zpool subcommands are not logged.
+# zpool list
+# zpool status
+# zpool iostat
+#
+# STRATEGY:
+# 1. Create a test pool.
+# 2. Separately invoke zpool list|status|iostat
+# 3. Verify they was not recored in pool history.
+#
+# TESTABILITY: explicit
+#
+# TEST_AUTOMATION_LEVEL: automated
+#
+# CODING_STATUS: COMPLETED (2006-07-05)
+#
+# __stc_assertion_end
+#
+################################################################################
+
+verify_runnable "global"
+
+function cleanup
+{
+ [[ -f $EXPECT_HISTORY ]] && $RM -f $EXPECT_HISTORY
+ [[ -f $REAL_HISTORY ]] && $RM -f $REAL_HISTORY
+}
+
+log_assert "Verify 'zpool list|status|iostat' will not be logged."
+log_onexit cleanup
+
+# Save initial TESTPOOL history
+log_must eval "$ZPOOL history $TESTPOOL > $EXPECT_HISTORY"
+
+log_must $ZPOOL list $TESTPOOL > /dev/null
+log_must $ZPOOL status $TESTPOOL > /dev/null
+log_must $ZPOOL iostat $TESTPOOL > /dev/null
+
+log_must eval "$ZPOOL history $TESTPOOL > $REAL_HISTORY"
+log_must $DIFF $EXPECT_HISTORY $REAL_HISTORY
+
+log_pass "Verify 'zpool list|status|iostat' passed."
View
127 ZFS-Test_Suite/tests/functional/history/history_007_pos.ksh
@@ -0,0 +1,127 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)history_007_pos.ksh 1.1 07/01/09 SMI"
+#
+
+. $STF_SUITE/commands.cfg
+. $STF_SUITE/include/libtest.kshlib
+. $STF_SUITE/include/default_common_varible.kshlib
+. $STF_SUITE/tests/functional/history/history_common.kshlib
+. ./history.cfg
+
+#################################################################################
+#
+# __stc_assertion_start
+#
+# ID: history_007_pos
+#
+# DESCRIPTION:
+# Verify command history moves with pool while pool being migrated
+#
+# STRATEGY:
+# 1. Import uniform platform and cross platform pools
+# 2. Contract the command history of the imported pool
+# 3. Compare imported history log with the previous log.
+#
+# TESTABILITY: explicit
+#
+# TEST_AUTOMATION_LEVEL: automated
+#
+# CODING_STATUS: COMPLETED (2006-10-25)
+#
+# __stc_assertion_end
+#
+################################################################################
+
+verify_runnable "global"
+
+function cleanup
+{
+ poolexists $migratedpoolname && \
+ log_must $ZPOOL destroy -f $migratedpoolname
+
+ [[ -d $import_dir ]] && $RM -rf $import_dir
+}
+
+log_assert "Verify command history moves with pool while migrating."
+log_onexit cleanup
+
+tst_dir=$STF_SUITE/tests/functional/history
+import_dir=$TESTDIR/importdir.$$
+migrated_cmds_f=$import_dir/migrated_history.$$
+migratedpoolname=$MIGRATEDPOOLNAME
+typeset -i RET=1
+typeset -i linenum=0
+
+[[ ! -d $import_dir ]] && log_must $MKDIR $import_dir
+
+# We test the migrations on both uniform platform and cross platform
+for arch in "i386" "sparc"; do
+ log_must $CP $tst_dir/${arch}.orig_history.txt $import_dir
+ orig_cmds_f=$import_dir/${arch}.orig_history.txt
+ #remove blank line
+ orig_cmds_f1=$import_dir/${arch}.orig_history_1.txt
+ $CAT $orig_cmds_f | $GREP -v "^$" > $orig_cmds_f1
+
+ log_must $CP $tst_dir/${arch}.migratedpool.DAT.Z $import_dir
+ log_must $UNCOMPRESS $import_dir/${arch}.migratedpool.DAT.Z
+
+ #destroy the pool with same name, so that import operation could succeed.
+ poolexists $migratedpoolname && \
+ log_must $ZPOOL destroy -f $migratedpoolname
+
+ log_must $ZPOOL import -d $import_dir $migratedpoolname
+ $ENV TZ=$TIMEZONE $ZPOOL history $migratedpoolname | \
+ $GREP -v "^$" >$migrated_cmds_f
+ RET=$?
+ (( $RET != 0 )) && log_fail "$ZPOOL histroy $migratedpoolname fails."
+
+ # The migrated history file should differ with original history file on
+ # two commands -- 'export' and 'import', which are included in migrated
+ # history file but not in original history file. so, check the two commands
+ # firstly in migrated history file and then delete them, and then compare
+ # this filtered file with the original history file. They should be identical
+ # at this time.
+ for subcmd in "export" "import"; do
+ $GREP "$subcmd" $migrated_cmds_f >/dev/null 2>&1
+ RET=$?
+ (( $RET != 0 )) && log_fail "zpool $subcmd is not logged for" \
+ "the imported pool $migratedpoolname."
+ done
+
+ tmpfile=$import_dir/cmds_tmp.$$
+ linenum=`$CAT $migrated_cmds_f | $WC -l`
+ (( linenum = linenum - 2 ))
+ $HEAD -n $linenum $migrated_cmds_f > $tmpfile
+ log_must $DIFF $tmpfile $orig_cmds_f1
+
+ #cleanup for next loop testing
+ log_must $ZPOOL destroy -f $migratedpoolname
+ log_must $RM -f `$LS $import_dir | grep -v i386.orig_history.txt sparc.orig_history.txt`
+done
+
+log_pass "Command history moves with pool as expected while pool being migrated. "
View
127 ZFS-Test_Suite/tests/functional/history/history_007_pos.ksh~
@@ -0,0 +1,127 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)history_007_pos.ksh 1.1 07/01/09 SMI"
+#
+
+. $STF_SUITE/commands.cfg
+. $STF_SUITE/include/libtest.kshlib
+. $STF_SUITE/include/default_common_varible.kshlib
+. $STF_SUITE/tests/functional/history/history_common.kshlib
+. ./history.cfg
+
+#################################################################################
+#
+# __stc_assertion_start
+#
+# ID: history_007_pos
+#
+# DESCRIPTION:
+# Verify command history moves with pool while pool being migrated
+#
+# STRATEGY:
+# 1. Import uniform platform and cross platform pools
+# 2. Contract the command history of the imported pool
+# 3. Compare imported history log with the previous log.
+#
+# TESTABILITY: explicit
+#
+# TEST_AUTOMATION_LEVEL: automated
+#
+# CODING_STATUS: COMPLETED (2006-10-25)
+#
+# __stc_assertion_end
+#
+################################################################################
+
+verify_runnable "global"
+
+function cleanup
+{
+ poolexists $migratedpoolname && \
+ log_must $ZPOOL destroy -f $migratedpoolname
+
+ [[ -d $import_dir ]] && $RM -rf $import_dir
+}
+
+log_assert "Verify command history moves with pool while migrating."
+log_onexit cleanup
+
+tst_dir=$STF_SUITE/tests/functional/history
+import_dir=$TESTDIR/importdir.$$
+migrated_cmds_f=$import_dir/migrated_history.$$
+migratedpoolname=$MIGRATEDPOOLNAME
+typeset -i RET=1
+typeset -i linenum=0
+
+[[ ! -d $import_dir ]] && log_must $MKDIR $import_dir
+
+# We test the migrations on both uniform platform and cross platform
+for arch in "i386" "sparc"; do
+ log_must $CP $tst_dir/${arch}.orig_history.txt $import_dir
+ orig_cmds_f=$import_dir/${arch}.orig_history.txt
+ #remove blank line
+ orig_cmds_f1=$import_dir/${arch}.orig_history_1.txt
+ $CAT $orig_cmds_f | $GREP -v "^$" > $orig_cmds_f1
+
+ log_must $CP $tst_dir/${arch}.migratedpool.DAT.Z $import_dir
+ log_must $UNCOMPRESS $import_dir/${arch}.migratedpool.DAT.Z
+
+ #destroy the pool with same name, so that import operation could succeed.
+ poolexists $migratedpoolname && \
+ log_must $ZPOOL destroy -f $migratedpoolname
+
+ log_must $ZPOOL import -d $import_dir $migratedpoolname
+ $ENV TZ=$TIMEZONE $ZPOOL history $migratedpoolname | \
+ $GREP -v "^$" >$migrated_cmds_f
+ RET=$?
+ (( $RET != 0 )) && log_fail "$ZPOOL histroy $migratedpoolname fails."
+
+ # The migrated history file should differ with original history file on
+ # two commands -- 'export' and 'import', which are included in migrated
+ # history file but not in original history file. so, check the two commands
+ # firstly in migrated history file and then delete them, and then compare
+ # this filtered file with the original history file. They should be identical
+ # at this time.
+ for subcmd in "export" "import"; do
+ $GREP "$subcmd" $migrated_cmds_f >/dev/null 2>&1
+ RET=$?
+ (( $RET != 0 )) && log_fail "zpool $subcmd is not logged for" \
+ "the imported pool $migratedpoolname."
+ done
+
+ tmpfile=$import_dir/cmds_tmp.$$
+ linenum=`$CAT $migrated_cmds_f | $WC -l`
+ (( linenum = linenum - 2 ))
+ $HEAD -n $linenum $migrated_cmds_f > $tmpfile
+ log_must $DIFF $tmpfile $orig_cmds_f1
+
+ #cleanup for next loop testing
+ log_must $ZPOOL destroy -f $migratedpoolname
+ log_must $RM -f `$LS $import_dir`
+done
+
+log_pass "Command history moves with pool as expected while pool being migrated. "
View
242 ZFS-Test_Suite/tests/functional/history/history_common.kshlib
@@ -0,0 +1,242 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)history_common.kshlib 1.3 07/07/31 SMI"
+#
+
+. $STF_SUITE/include/libtest.kshlib
+
+#
+# Execute arguments and record them to the log file.
+# Notice: EXPECT_HISTORY need be defined.
+#
+# $1-n arguments for execution.
+#
+function exec_record
+{
+ [[ -z $EXPECT_HISTORY ]] && log_fail "EXPECT_HISTORY is undefined."
+
+ typeset long_hist
+ typeset user='root'
+ typeset opt
+ while getopts ":lu:" opt; do
+ case $opt in
+ l) long_hist=1;;
+ u) user=$OPTARG ;;
+ esac
+ done
+ shift $(($OPTIND -1))
+
+ if [[ $user == 'root' ]]; then
+ log_must "$@"
+ else
+ log_must $SU $user -c "$@"
+ fi
+
+ typeset cmdline="$@"
+ # Remove "eval" ">*" & "<*" for 'zfs send' and 'zfs receive'.
+ cmdline=${cmdline#eval}
+ cmdline=${cmdline%%\>*}
+ cmdline=${cmdline%%\<*}
+
+ # Remove additional blank
+ cmdline=${cmdline## }
+ cmdline=${cmdline%% }
+
+ # Get the basename of command. i.e: /usr/sbin/zpool -> zpool
+ typeset cmd=$($ECHO $cmdline | $AWK '{print $1}')
+ eval cmdline=\${cmdline#$cmd}
+ cmd=${cmd##*/}
+
+ # Write basic history to file
+ print -n $cmd $cmdline >> $EXPECT_HISTORY
+ if [[ -n $long_hist ]]; then
+ # Write long history to file
+ hn=$($HOSTNAME)
+ zn=$($ZONENAME)
+ print -n " [user $user on $hn:$zn]" >> $EXPECT_HISTORY
+ fi
+ # Plus enter in the end of line
+ print >> $EXPECT_HISTORY
+}
+
+#
+# Format 'zpool history' output to specified file.
+#
+# $1 pool name
+# $2 output file.
+# $3 option
+#
+function format_history
+{
+ typeset pool=$1
+ typeset outfile=$2
+ typeset option=$3
+
+ [[ -z $pool || -z $outfile ]] && \
+ log_fail "Usage: format_history <pool> <outfile> [option]"
+
+ typeset temp_history=/tmp/temp_history.format_history.$$
+ $ZPOOL history $option $pool > $temp_history
+
+ # Truncate output file
+ $CAT /dev/null > $outfile
+
+ typeset line
+ typeset -i n=0
+ while read line; do
+ # Ignore the first line and empty line
+ if [[ $n -eq 0 || -z $line ]]; then
+ n=1; continue
+ fi
+ $ECHO ${line#* } >> $outfile
+ done < $temp_history
+
+ $RM -f $temp_history
+}
+
+#
+# Get the additional pool history.
+#
+# $1 pool name
+# $2 additional history file
+# $3 option
+#
+function additional_history
+{
+ typeset pool=$1
+ typeset add_his_file=$2
+ typeset option=$3
+
+ if [[ -z $pool || -z $add_his_file ]]; then
+ log_fail "Usage: additional_history <pool> " \
+ "<additional_history_file> [option]"
+ fi
+
+ typeset temp_history=/tmp/temp_history.additional_history.$$
+ # Current current history
+ format_history $pool $temp_history $option
+ # Figure out new history
+ $DIFF $temp_history $REAL_HISTORY | $GREP "^<" | $SED 's/^<[ ]*//' > \
+ $add_his_file
+
+ $CP $temp_history $REAL_HISTORY
+ $RM -f $temp_history
+}
+
+#
+# Get given dataset id
+#
+# $1 dataset name
+#
+function get_dataset_id
+{
+ typeset ds=$1
+
+ #
+ # The zdb information looks like:
+ #
+ # Dataset pool/fs [ZPL], ID 21, cr_txg 6, 18.0K, 4 objects
+ #
+ typeset dst_id=$($ZDB $ds | $GREP "^Dataset $ds " | \
+ $AWK -F\, '{print $2}' | $AWK '{print $2}')
+
+ $ECHO $dst_id
+}
+
+#
+# Scan history file and check if it include expected internal history
+# information
+#
+# $1 history file
+# $2 subcmd
+# $3 dataset
+# $4 keyword
+#
+function verify_history #<his_file> <subcmd> <ds> [keyword]
+{
+ typeset his_file=$1
+ typeset subcmd=$2
+ typeset ds=$3
+ typeset keyword=$4
+
+ typeset dst_id=$(get_dataset_id $ds)
+ typeset line found=0
+ while read line; do
+ case $subcmd in
+ snapshot|rollback|destroy|inherit)
+ #
+ # i.e:
+ # [internal snapshot txg:10] dataset = 21
+ # [internal create txg:25] dataset = 29
+ #
+ $ECHO $line | $GREP "internal $subcmd txg:" | \
+ $GREP "dataset = $dst_id" > /dev/null 2>&1
+ if (($? == 0)); then
+ found=1
+ break 2
+ fi
+ ;;
+ allow)
+ #
+ # [internal permission update txg:136] ud$160293
+ # snapshot dataset = 21
+ #
+ $ECHO $line | \
+ $GREP "internal permission update txg:"| \
+ $GREP "$keyword" | \
+ $GREP "dataset = $dst_id" > \
+ /dev/null 2>&1
+ if (($? == 0)); then
+ found=1
+ break 2
+ fi
+ ;;
+ unallow)
+ #
+ # [internal permission update txg:444] ud$160293 mount
+ # dataset = 21
+ #
+ $ECHO $line | \
+ $GREP "internal permission remove txg:"| \
+ $GREP "$keyword" | \
+ $GREP "dataset = $dst_id" > \
+ /dev/null 2>&1
+ if (($? == 0)); then
+ found=1
+ break 2
+ fi
+ ;;
+ *)
+ ;;
+ esac
+ done < $his_file
+
+ if [[ $found == 1 ]]; then
+ return 0
+ else
+ return 1
+ fi
+}
View
BIN ZFS-Test_Suite/tests/functional/history/i386.migratedpool.DAT.Z
Binary file not shown.
View
13 ZFS-Test_Suite/tests/functional/history/i386.orig_history.txt
@@ -0,0 +1,13 @@
+History for 'history_pool':
+2006-10-20.13:18:37 zpool create history_pool /var/tmp/i386.migratedpool.DAT
+2006-10-20.13:18:37 zfs create history_pool/fs
+2006-10-20.13:18:37 zfs set compression=on history_pool/fs
+2006-10-20.13:18:37 zfs set checksum=on history_pool
+2006-10-20.13:18:37 zfs snapshot history_pool/fs@snap
+2006-10-20.13:18:37 zfs clone history_pool/fs@snap history_pool/clone
+2006-10-20.13:18:37 zfs promote history_pool/clone
+2006-10-20.13:18:37 zfs promote history_pool/fs
+2006-10-20.13:18:37 zfs destroy -r -R history_pool/fs
+2006-10-20.13:18:37 zpool export history_pool
+2007-04-05.00:05:38 zpool upgrade history_pool
+
View
42 ZFS-Test_Suite/tests/functional/history/setup.ksh
@@ -0,0 +1,42 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)setup.ksh 1.2 07/01/09 SMI"
+#
+
+. $STF_SUITE/commands.cfg
+. $STF_SUITE/include/default_common_varible.kshlib
+. $STF_SUITE/include/libtest.kshlib
+#. $STF_SUITE/default.cfg
+
+
+DISKS="$@"
+
+$ZPOOL history > /dev/null 2>&1
+(($? != 0)) && log_unsupported
+
+DISK=${DISKS%% *}
+default_setup $DISK
View
BIN ZFS-Test_Suite/tests/functional/history/sparc.migratedpool.DAT.Z
Binary file not shown.
View
13 ZFS-Test_Suite/tests/functional/history/sparc.orig_history.txt
@@ -0,0 +1,13 @@
+History for 'history_pool':
+2006-10-27.03:13:47 zpool create history_pool /var/tmp/sparc.migratedpool.DAT
+2006-10-27.03:13:48 zfs create history_pool/fs
+2006-10-27.03:13:48 zfs set compression=on history_pool/fs
+2006-10-27.03:13:48 zfs set checksum=on history_pool
+2006-10-27.03:13:48 zfs snapshot history_pool/fs@snap
+2006-10-27.03:13:48 zfs clone history_pool/fs@snap history_pool/clone
+2006-10-27.03:13:49 zfs promote history_pool/clone
+2006-10-27.03:13:49 zfs promote history_pool/fs
+2006-10-27.03:13:49 zfs destroy -r -R history_pool/fs
+2006-10-27.03:13:49 zpool export history_pool
+2007-04-05.00:41:55 zpool upgrade history_pool
+
View
BIN ZFS-Test_Suite/tests/functional/history/zfs-pool-v4.dat.Z
Binary file not shown.

0 comments on commit c66aeea

Please sign in to comment.
Something went wrong with that request. Please try again.