@@ -16,7 +16,7 @@ SERVER_FAIL_TO_START_COUNT=0; ENGINE=InnoDB; UUID=$(uuidgen); GCACHE_ENCRYPTION=
1616
1717# Read configuration
1818if [ " $1 " != " " ]; then CONFIGURATION_FILE=$1 ; fi
19- if [ ! -r ${SCRIPT_PWD} /${CONFIGURATION_FILE} ]; then echo " Assert: the confiruation file ${SCRIPT_PWD} /${CONFIGURATION_FILE} cannot be read!" ; exit 1; fi
19+ if [ ! -r ${SCRIPT_PWD} /${CONFIGURATION_FILE} ]; then echo " Assert: the configuration file ${SCRIPT_PWD} /${CONFIGURATION_FILE} cannot be read!" ; exit 1; fi
2020source ${SCRIPT_PWD} /$CONFIGURATION_FILE
2121if [ " ${SEED} " == " " ]; then SEED=${RANDOMD} ; fi
2222
@@ -135,19 +135,16 @@ pxc_bug_found(){
135135 done ;
136136}
137137
138- create_global_manifest () {
139- echoit " Creating global manifest file mysqld.my"
138+ create_local_manifest () {
139+ cmp_name=$1
140+ node=$2
141+ echoit " Creating local manifest file mysqld.my"
140142 cat << EOF >${BASEDIR} /bin/mysqld.my
141143{
142144 "read_local_manifest": true
143145}
144146EOF
145- }
146147
147- create_local_manifest () {
148- cmp_name=$1
149- node=$2
150- echoit " Creating local manifest file mysqld.my"
151148 if [ " $node " == " " ]; then
152149 cat << EOF >${RUNDIR} /${TRIAL} /data/mysqld.my
153150{
@@ -163,20 +160,15 @@ EOF
163160 fi
164161}
165162
166- create_global_config () {
163+ create_local_config () {
167164 cmp_name=$1
168- echoit " Creating global configuration file $cmp_name .cnf"
165+ node=$2
166+ echoit " Creating local configuration file $cmp_name .cnf"
169167 cat << EOF >${BASEDIR} /lib/plugin/$cmp_name .cnf
170168{
171169 "read_local_config": true
172170}
173171EOF
174- }
175-
176- create_local_config () {
177- cmp_name=$1
178- node=$2
179- echoit " Creating local configuration file $cmp_name .cnf"
180172 if [ " $cmp_name " == " component_keyring_file" ]; then
181173 if [ " $node " == " " ]; then
182174 cat << EOF >${RUNDIR} /${TRIAL} /data/$cmp_name .cnf
@@ -1495,17 +1487,6 @@ START_OPT="--core-file" # Compatible with 5.6,5.7,8.0
14951487INIT_OPT=" --no-defaults --initialize-insecure ${MYINIT} " # Compatible with 5.7,8.0 (mysqld init)
14961488INIT_TOOL=" ${BIN} " # Compatible with 5.7,8.0 (mysqld init), changed to MID later if version <=5.6
14971489VERSION_INFO=$( ${BIN} --version | grep -oe ' [58]\.[01567]' | head -n1)
1498- if [ " ${VERSION_INFO} " == " 5.1" -o " ${VERSION_INFO} " == " 5.5" -o " ${VERSION_INFO} " == " 5.6" ]; then
1499- if [ " ${MID} " == " " ]; then
1500- echo " Assert: Version was detected as ${VERSION_INFO} , yet ./scripts/mysql_install_db nor ./bin/mysql_install_db is present!"
1501- exit 1
1502- fi
1503- INIT_TOOL=" ${MID} "
1504- INIT_OPT=" --no-defaults --force ${MYINIT} "
1505- START_OPT=" --core"
1506- elif [ " ${VERSION_INFO} " != " 5.7" -a " ${VERSION_INFO} " != " 8.0" -a " ${VERSION_INFO} " != " 8.1" ]; then
1507- echo " WARNING: mysqld (${BIN} ) version detection failed. This is likely caused by using this script with a non-supported distribution or version of mysqld. Please expand this script to handle (which shoud be easy to do). Even so, the script will now try and continue as-is, but this may fail."
1508- fi
15091490
15101491if [ " ${VERSION_INFO} " == " 5.7" ]; then
15111492 # Keyring components are not supported in PS-5.7 and PXC-5.7, hence disabling it.
@@ -1532,14 +1513,9 @@ elif [ ${PLUGIN_KEYRING_FILE} -eq 1 ]; then
15321513 KEYRING_PARAM=" --early-plugin-load=keyring_file.so --keyring_file_data=keyring"
15331514fi
15341515
1535- if [ ${COMPONENT_KEYRING_FILE} -eq 1 ]; then
1536- create_global_manifest
1537- create_global_config component_keyring_file
1538- elif [ ${COMPONENT_KEYRING_VAULT} -eq 1 ]; then
1516+ if [ ${COMPONENT_KEYRING_VAULT} -eq 1 ]; then
15391517 if check_for_version $MYSQL_VERSION " 8.1.0" ; then
15401518 start_vault_server
1541- create_global_manifest
1542- create_global_config component_keyring_vault
15431519 else
15441520 echoit " ERROR: Vault as a component is not supported in versions older than PS-8.1.0. Use PLUGIN_KEYRING_VAULT=1 instead"
15451521 exit 1
@@ -1639,6 +1615,10 @@ else
16391615fi
16401616echoit " Done. Attempting to cleanup the pstress rundir ${RUNDIR} ..."
16411617rm -Rf ${RUNDIR}
1618+ if [ ${COMPONENT_KEYRING_VAULT} -eq 1 ]; then
1619+ echoit " Stopping vault server"
1620+ killall vault > /dev/null 2>&1
1621+ fi
16421622echoit " The results of this run can be found in the workdir ${WORKDIR} ..."
16431623echoit " Done. Exiting $0 with exit code 0..."
16441624exit 0
0 commit comments