Whamcloud - gitweb
LU-15259 tests: use existing usernames for setfacl
[fs/lustre-release.git] / lustre / tests / cfg / local.sh
1 FSNAME=${FSNAME:-lustre}
2
3 # facet hosts
4 mds_HOST=${mds_HOST:-$(hostname)}
5 mdsfailover_HOST=${mdsfailover_HOST}
6 mgs_HOST=${mgs_HOST:-$mds_HOST}
7 ost_HOST=${ost_HOST:-$(hostname)}
8 ostfailover_HOST=${ostfailover_HOST}
9 # FILESET variable is used by sanity.sh to verify fileset
10 # feature, tests should pass even under subdirectory namespace.
11 FILESET=${FILESET:-""}
12 [[ -z "$FILESET" ]] || [[ "${FILESET:0:1}" = "/" ]] || FILESET="/$FILESET"
13
14 TMP=${TMP:-/tmp}
15
16 DAEMONSIZE=${DAEMONSIZE:-500}
17 MDSCOUNT=${MDSCOUNT:-1}
18 MDSDEVBASE=${MDSDEVBASE:-$TMP/${FSNAME}-mdt}
19 MDSSIZE=${MDSSIZE:-250000}
20 #
21 # Format options of facets can be specified with these variables:
22 #
23 #   - <facet_type>OPT
24 #
25 # Arguments for "--mkfsoptions" shall be specified with these
26 # variables:
27 #
28 #   - <fstype>_MKFS_OPTS
29 #   - <facet_type>_FS_MKFS_OPTS
30 #
31 # A number of other options have their own specific variables.  See
32 # mkfs_opts().
33 #
34 MDSOPT=${MDSOPT:-}
35 MDS_FS_MKFS_OPTS=${MDS_FS_MKFS_OPTS:-}
36 MDS_MOUNT_OPTS=${MDS_MOUNT_OPTS:-}
37 # <facet_type>_MOUNT_FS_OPTS is the mount options specified when formatting
38 # the underlying device by argument "--mountfsoptions"
39 MDS_MOUNT_FS_OPTS=${MDS_MOUNT_FS_OPTS:-}
40
41 MGSSIZE=${MGSSIZE:-$MDSSIZE}
42 MGSOPT=${MGSOPT:-}
43 MGS_FS_MKFS_OPTS=${MGS_FS_MKFS_OPTS:-}
44 MGS_MOUNT_OPTS=${MGS_MOUNT_OPTS:-}
45 MGS_MOUNT_FS_OPTS=${MGS_MOUNT_FS_OPTS:-}
46
47 OSTCOUNT=${OSTCOUNT:-2}
48 OSTDEVBASE=${OSTDEVBASE:-$TMP/${FSNAME}-ost}
49 OSTSIZE=${OSTSIZE:-400000}
50 OSTOPT=${OSTOPT:-}
51 OST_FS_MKFS_OPTS=${OST_FS_MKFS_OPTS:-}
52 OST_MOUNT_OPTS=${OST_MOUNT_OPTS:-}
53 OST_MOUNT_FS_OPTS=${OST_MOUNT_FS_OPTS:-}
54 OST_INDEX_LIST=${OST_INDEX_LIST:-}
55 # Can specify individual ost devs with
56 # OSTDEV1="/dev/sda"
57 # on specific hosts with
58 # ost1_HOST="uml2"
59 # ost1_JRN="/dev/sdb1"
60 #
61 # For ZFS, ost devices can be specified via either or both of the following:
62 # OSTZFSDEV1="${FSNAME}-ost1/ost1"
63 # OSTDEV1="/dev/sdb1"
64 #
65 # OST indices can be specified as follows:
66 # OSTINDEX1="1"
67 # OSTINDEX2="2"
68 # OSTINDEX3="4"
69 # ......
70 # or
71 # OST_INDEX_LIST="[1,2,4-6,8]"  # [n-m,l-k,...], where n < m and l < k, etc.
72 #
73 # The default index value of an individual OST is its facet number minus 1.
74 # More specific ones override more general ones. See facet_index().
75
76 NETTYPE=${NETTYPE:-tcp}
77 MGSNID=${MGSNID:-$(h2nettype $mgs_HOST)}
78
79 #
80 # Back end file system type(s) of facets can be specified with these
81 # variables:
82 #
83 #   1. <facet>_FSTYPE
84 #   2. <facet_type>FSTYPE
85 #   3. FSTYPE
86 #
87 # More specific ones override more general ones.  See facet_fstype().
88 #
89 FSTYPE=${FSTYPE:-ldiskfs}
90
91 LDISKFS_MKFS_OPTS=${LDISKFS_MKFS_OPTS:-}
92 ZFS_MKFS_OPTS=${ZFS_MKFS_OPTS:-}
93
94 LOAD_MODULES_REMOTE=${LOAD_MODULES_REMOTE:-false}
95
96 DEF_STRIPE_SIZE=${DEF_STRIPE_SIZE:-}   # filesystem default stripe size in bytes
97 DEF_STRIPE_COUNT=${DEF_STRIPE_COUNT:-} # filesystem default stripe count
98 TIMEOUT=${TIMEOUT:-20}
99 PTLDEBUG=${PTLDEBUG:-"vfstrace rpctrace dlmtrace neterror ha config \
100                       ioctl super lfsck"}
101 SUBSYSTEM=${SUBSYSTEM:-"all"}
102
103 # promise 2MB for every cpu
104 if [ -f /sys/devices/system/cpu/possible ]; then
105     _debug_mb=$((($(cut -d "-" -f 2 /sys/devices/system/cpu/possible)+1)*2))
106 else
107     _debug_mb=$(($(getconf _NPROCESSORS_CONF)*2))
108 fi
109
110 DEBUG_SIZE=${DEBUG_SIZE:-$_debug_mb}
111
112 TSTUSR=${TSTUSR:-"quota_usr"}
113 TSTUSR2=${TSTUSR2:-"quota_2usr"}
114 USER0=${USER0:-"sanityusr"}
115 USER1=${USER1:-"sanityusr1"}
116
117 ENABLE_QUOTA=${ENABLE_QUOTA:-""}
118 QUOTA_TYPE=${QUOTA_TYPE:-"ug3"}
119 QUOTA_USERS=${QUOTA_USERS:-"$TSTUSR $TSTUSR2 $USER0 $USER1"}
120 # "error: conf_param: No such device" issue in every test suite logs
121 # sanity-quota test_32 hash_lqs_cur_bits is not set properly
122 LQUOTAOPTS=${LQUOTAOPTS:-"hash_lqs_cur_bits=3"}
123
124 #client
125 MOUNT=${MOUNT:-/mnt/${FSNAME}}
126 MOUNT1=${MOUNT1:-$MOUNT}
127 MOUNT2=${MOUNT2:-${MOUNT}2}
128 MOUNT3=${MOUNT3:-${MOUNT}3}
129 # Comma-separated option list used as "mount [...] -o $MOUNT_OPTS [...]"
130 MOUNT_OPTS=${MOUNT_OPTS:-"user_xattr,flock"}
131 # Mount flags (e.g. "-n") used as "mount [...] $MOUNT_FLAGS [...]"
132 MOUNT_FLAGS=${MOUNT_FLAGS:-""}
133 DIR=${DIR:-$MOUNT}
134 DIR1=${DIR:-$MOUNT1}
135 DIR2=${DIR2:-$MOUNT2}
136 DIR3=${DIR3:-$MOUNT3}
137
138 if [ $UID -ne 0 ]; then
139         log "running as non-root uid $UID"
140         RUNAS_ID="$UID"
141         RUNAS_GID=`id -g $USER`
142         RUNAS=""
143 else
144         RUNAS_ID=${RUNAS_ID:-500}
145         RUNAS_GID=${RUNAS_GID:-$RUNAS_ID}
146         RUNAS=${RUNAS:-"runas -u $RUNAS_ID -g $RUNAS_GID"}
147 fi
148
149 PDSH=${PDSH:-no_dsh}
150 FAILURE_MODE=${FAILURE_MODE:-SOFT} # or HARD
151 POWER_DOWN=${POWER_DOWN:-"powerman --off"}
152 POWER_UP=${POWER_UP:-"powerman --on"}
153 SLOW=${SLOW:-no}
154 FAIL_ON_ERROR=${FAIL_ON_ERROR:-true}
155
156 MPIRUN=${MPIRUN:-$(which mpirun 2>/dev/null || true)}
157 MPIRUN_OPTIONS=${MPIRUN_OPTIONS:-"--oversubscribe"}
158 MPI_USER=${MPI_USER:-mpiuser}
159 SHARED_DIR_LOGS=${SHARED_DIR_LOGS:-""}
160 MACHINEFILE_OPTION=${MACHINEFILE_OPTION:-"-machinefile"}
161
162 # This is used by a small number of tests to share state between the client
163 # running the tests, or in some cases between the servers (e.g. lfsck.sh).
164 # It needs to be a non-lustre filesystem that is available on all the nodes.
165 SHARED_DIRECTORY=${SHARED_DIRECTORY:-$TMP}      # bug 17839 comment 65
166
167 #
168 # In order to test multiple remote HSM agents, a new facet type named "AGT" and
169 # the following associated variables are added:
170 #
171 # AGTCOUNT: number of agents
172 # AGTDEV{N}: target HSM mount point (root path of the backend)
173 # agt{N}_HOST: hostname of the agent agt{N}
174 # SINGLEAGT: facet of the single agent
175 #
176 # Please refer to init_agt_vars() in sanity-hsm.sh for the default values of
177 # these variables.
178 #