Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit c6d4f28

Browse files
authored
Merge pull request #1015 from williammorrison2/bills_csm_fvt_updates_1_8_3
CSM FVT updates from xcat node definitions to variables in the csm_te…
2 parents 66558d8 + 9008063 commit c6d4f28

22 files changed

+272
-182
lines changed

csmtest/buckets/basic/allocation.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# buckets/basic/node.sh
44
#
5-
# © Copyright IBM Corporation 2015-2018. All Rights Reserved
5+
# © Copyright IBM Corporation 2015-2021. All Rights Reserved
66
#
77
# This program is licensed under the terms of the Eclipse Public License
88
# v1.0 as published by the Eclipse Foundation and available at
@@ -126,7 +126,7 @@ check_return_flag_value $? 0 "Test Case 12: Checking allocation history table u
126126

127127
# Test Case 13: csm_allocation_create with launch node input
128128
# Get utility node name
129-
utility_node=`nodels utility | head -1`
129+
utility_node=`nodels ${UTILITY} | head -1`
130130
${CSM_PATH}/csm_allocation_create -j 1 -n ${SINGLE_COMPUTE} -l ${utility_node} > ${TEMP_LOG} 2>&1
131131
check_return_flag_value $? 0 "Test Case 13: csm_allocation_create with launch node input"
132132

csmtest/buckets/basic/csm_ctrl_cmd.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# buckets/basic/csm_ctrl_cmd.sh
44
#
5-
# © Copyright IBM Corporation 2015-2018. All Rights Reserved
5+
# © Copyright IBM Corporation 2015-2021. All Rights Reserved
66
#
77
# This program is licensed under the terms of the Eclipse Public License
88
# v1.0 as published by the Eclipse Foundation and available at
@@ -43,7 +43,8 @@ date >> ${LOG}
4343
echo "------------------------------------------------------------" >> ${LOG}
4444

4545
# Get Target Compute Node
46-
target_node=`nodels compute_B | head -1`
46+
#target_node=`nodels ${COMPUTE_B} | head -1`
47+
target_node=`echo ${COMPUTE_B} | cut -d ',' -f 1`
4748

4849
# Start with Fresh CSM environment
4950
${BASH_SOURCE%/*}/../../tools/dual_aggregator/shutdown_daemons.sh

csmtest/buckets/basic/db_script.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# buckets/basic/db_script.sh
44
#
5-
# © Copyright IBM Corporation 2015-2018. All Rights Reserved
5+
# © Copyright IBM Corporation 2015-2021. All Rights Reserved
66
#
77
# This program is licensed under the terms of the Eclipse Public License
88
# v1.0 as published by the Eclipse Foundation and available at
@@ -69,7 +69,7 @@ check_return_exit $? 2 "Test Case 5: Checking fvttestdb was deleted"
6969

7070
# Cleanup
7171
rm -f ${TEMP_LOG}
72-
rm -f /var/lib/pgsql/backups/fvttestdb*
72+
rm -rf /var/lib/pgsql/backups/fvttestdb_*
7373

7474
echo "------------------------------------------------------------" >> ${LOG}
7575
echo "CSM DB Scripts Bucket PASSED" >> ${LOG}

csmtest/buckets/error_injection/allocation.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# buckets/error_injection/allocation.sh
44
#
5-
# © Copyright IBM Corporation 2015-2018. All Rights Reserved
5+
# © Copyright IBM Corporation 2015-2021. All Rights Reserved
66
#
77
# This program is licensed under the terms of the Eclipse Public License
88
# v1.0 as published by the Eclipse Foundation and available at
@@ -65,7 +65,7 @@ check_all_output "IN_SERVICE"
6565
check_return_exit $? 0 "Test Case 2: csm_allocation_create node is out of service - verify back IN_SERVICE"
6666

6767
# Test Case 3: csm_allocation_create permission denied
68-
su -c "${CSM_PATH}/csm_allocation_create -j 123 -n ${SINGLE_COMPUTE}" plundgr > ${TEMP_LOG} 2>&1
68+
su -c "${CSM_PATH}/csm_allocation_create -j 123 -n ${SINGLE_COMPUTE}" ${USER} > ${TEMP_LOG} 2>&1
6969
check_return_exit $? 1 "Test Case 3: csm_allocation_create permission denied"
7070

7171
# Test Case 4: csm_allocation_create prolog error 255
@@ -267,7 +267,7 @@ ${CSM_PATH}/csm_allocation_update_history -a ${allocation_id} -c "test comment"
267267
check_return_flag_value $? 25 "Test Case 39: csm_allocation_update_history before allocation deleted (i.e. added to history table)"
268268

269269
# Test Case 40: csm_allocation_delete permission denied
270-
su -c "${CSM_PATH}/csm_allocation_delete -a ${allocation_id}" plundgr > ${TEMP_LOG} 2>&1
270+
su -c "${CSM_PATH}/csm_allocation_delete -a ${allocation_id}" ${USER} > ${TEMP_LOG} 2>&1
271271
check_return_flag_value $? 16 "Test Case 40: csm_allocation_delete permission denied"
272272

273273
# Test Case 40: csm_allocation_delete success

csmtest/buckets/error_injection/infrastructure.sh

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# buckets/error_injection/infrastructure.sh
44
#
5-
# © Copyright IBM Corporation 2015-2018. All Rights Reserved
5+
# © Copyright IBM Corporation 2015-2021. All Rights Reserved
66
#
77
# This program is licensed under the terms of the Eclipse Public License
88
# v1.0 as published by the Eclipse Foundation and available at
@@ -31,7 +31,7 @@ LOG=${LOG_PATH}/buckets/error_injection/infrastructure.log
3131
CSM_PATH=/opt/ibm/csm/bin
3232
TEMP_LOG=${LOG_PATH}/buckets/error_injection/infrastructure_tmp.log
3333
FLAG_LOG=${LOG_PATH}/buckets/error_injection/infrastructure_flags.log
34-
UTILIY=$(nodels utility)
34+
UTILIY=$(nodels ${UTILITY})
3535

3636
if [ -f "${BASH_SOURCE%/*}/../../include/functions.sh" ]
3737
then
@@ -63,9 +63,9 @@ check_return_flag_value $? 0 "Test Case 1: Validating Health Check output"
6363

6464
# Test Case 2: Start utility daemon, health check, utility daemon filled in
6565
echo "Test Case 2: Start utility daemon, health check, utility daemon filled in" >> ${LOG}
66-
xdsh utility "systemctl start csmd-utility"
66+
xdsh ${UTILITY} "systemctl start csmd-utility"
6767
sleep 1
68-
xdsh utility "systemctl is-active csmd-utility" > /dev/null
68+
xdsh ${UTILITY} "systemctl is-active csmd-utility" > /dev/null
6969
check_return_exit $? 0 "Test Case 2: Utility is active"
7070
${CSM_PATH}/csm_infrastructure_health_check -v > ${TEMP_LOG} 2>&1
7171
check_return_exit $? 0 "Test Case 2: Health Check"
@@ -74,16 +74,16 @@ check_return_flag_value $? 0 "Test Case 2: Validating Health Check output"
7474

7575
# Test Case 3: health check from utility, same info, local listed as utility
7676
echo "Test Case 3: health check from utility, same info, local listed as utility" >> ${LOG}
77-
xdsh utility "${CSM_PATH}/csm_infrastructure_health_check -v" > ${TEMP_LOG} 2>&1
77+
xdsh ${UTILITY} "${CSM_PATH}/csm_infrastructure_health_check -v" > ${TEMP_LOG} 2>&1
7878
check_return_exit $? 0 "Test Case 3: Health check from utility"
7979
check_all_output "MASTER: ${MASTER}" "Aggregators:0" "Utility Nodes:1" "Local_daemon: UTILITY: ${UTILITY}"
8080
check_return_flag_value $? 0 "Test Case 3: Validating Health Check output"
8181

8282
# Test Case 4: Stop utility daemon, health check, utility daemon unresponsive
8383
echo "Test Case 4: Stop utility daemon, health check, utility daemon unresponsive" >> ${LOG}
84-
xdsh utility "systemctl stop csmd-utility"
84+
xdsh ${UTILITY} "systemctl stop csmd-utility"
8585
sleep 1
86-
xdsh utility "systemctl is-active csmd-utility" > /dev/null
86+
xdsh ${UTILITY} "systemctl is-active csmd-utility" > /dev/null
8787
check_return_exit $? 1 "Test Case 4: Utility is not active"
8888
${CSM_PATH}/csm_infrastructure_health_check -v > ${TEMP_LOG} 2>&1
8989
check_return_exit $? 0 "Test Case 4: Health Check"
@@ -92,9 +92,9 @@ check_return_flag_value $? 0 "Test Case 4: Validating Health Check output"
9292

9393
# Test Case 5: Start utility daemon, health check, utility daemon responsive and bounced=1
9494
echo "Test Case 5: Start utility daemon, health check, utility daemon responsive and bounced=1" >> ${LOG}
95-
xdsh utility "systemctl start csmd-utility"
95+
xdsh ${UTILITY} "systemctl start csmd-utility"
9696
sleep 1
97-
xdsh utility "systemctl is-active csmd-utility" > /dev/null
97+
xdsh ${UTILITY} "systemctl is-active csmd-utility" > /dev/null
9898
check_return_exit $? 0 "Test Case 5: Utility is active"
9999
${CSM_PATH}/csm_infrastructure_health_check -v > ${TEMP_LOG} 2>&1
100100
check_return_exit $? 0 "Test Case 5: Health Check"
@@ -107,7 +107,7 @@ systemctl stop csmd-master
107107
sleep 1
108108
systemctl is-active csmd-master > /dev/null
109109
check_return_exit $? 3 "Test Case 6: Master is inactive"
110-
xdsh utility "cat /var/log/ibm/csm/csm_utility.log" > ${TEMP_LOG} 2>&1
110+
xdsh ${UTILITY} "cat /var/log/ibm/csm/csm_utility.log" > ${TEMP_LOG} 2>&1
111111
check_all_output "Transition from RUNMODE_CONFIGURED to: RUNMODE_DISCONNECTED"
112112
check_return_flag_value $? 0 "Test Case 6: Utility transition to RUNMODE_DISCONNECTED"
113113

@@ -117,7 +117,7 @@ systemctl start csmd-master
117117
sleep 1
118118
systemctl is-active csmd-master > /dev/null
119119
check_return_exit $? 0 "Test Case 7: Master is active"
120-
xdsh utility "systemctl is-active csmd-utility" > /dev/null
120+
xdsh ${UTILITY} "systemctl is-active csmd-utility" > /dev/null
121121
check_return_exit $? 0 "Test Case 7: Utility is still active"
122122
${CSM_PATH}/csm_infrastructure_health_check -v > ${TEMP_LOG} 2>&1
123123
check_return_exit $? 0 "Test Case 7: Health Check"
@@ -227,9 +227,9 @@ check_return_flag_value $? 0 "Test Case 15: Validating Health Check output"
227227

228228
# Test Case 16: Start utility daemon, health check, utility and aggregator daemon present
229229
echo "Test Case 16: Start utility daemon, health check, utility and aggregator daemon present" >> ${LOG}
230-
xdsh utility "systemctl start csmd-utility"
230+
xdsh ${UTILITY} "systemctl start csmd-utility"
231231
sleep 1
232-
xdsh utility "systemctl is-active csmd-utility" > /dev/null
232+
xdsh ${UTILITY} "systemctl is-active csmd-utility" > /dev/null
233233
check_return_exit $? 0 "Test Case 16: Utility is active"
234234
${CSM_PATH}/csm_infrastructure_health_check -v > ${TEMP_LOG} 2>&1
235235
check_return_exit $? 0 "Test Case 16: Health Check"
@@ -249,9 +249,9 @@ check_return_flag_value $? 0 "Test Case 17: Validating Health Check output"
249249

250250
# Test Case 18: Stop utility daemon, health check, unresponsive aggregator and utility
251251
echo "Test Case 18: Stop utility daemon, health check, unresponsive aggregator and utility" >> ${LOG}
252-
xdsh utility "systemctl stop csmd-utility"
252+
xdsh ${UTILITY} "systemctl stop csmd-utility"
253253
sleep 1
254-
xdsh utility "systemctl is-active csmd-utility" > /dev/null
254+
xdsh ${UTILITY} "systemctl is-active csmd-utility" > /dev/null
255255
check_return_exit $? 1 "Test Case 18: Utility is not active"
256256
${CSM_PATH}/csm_infrastructure_health_check -v > ${TEMP_LOG} 2>&1
257257
check_return_exit $? 0 "Test Case 18: Health Check"
@@ -271,9 +271,9 @@ check_return_flag_value $? 0 "Test Case 19: Validating Health Check output"
271271

272272
# Test Case 20: Start utility daemon, health check, responsive aggregator and utility and bounced=1 for both
273273
echo "Test Case 20: Start utility daemon, health check, responsive aggregator and utility and bounced=1 for both" >> ${LOG}
274-
xdsh utility "systemctl start csmd-utility"
274+
xdsh ${UTILITY} "systemctl start csmd-utility"
275275
sleep 1
276-
xdsh utility "systemctl is-active csmd-utility" > /dev/null
276+
xdsh ${UTILITY} "systemctl is-active csmd-utility" > /dev/null
277277
check_return_exit $? 0 "Test Case 20: Utility is active"
278278
${CSM_PATH}/csm_infrastructure_health_check -v > ${TEMP_LOG} 2>&1
279279
check_return_exit $? 0 "Test Case 20: Health Check"
@@ -289,7 +289,7 @@ check_return_exit $? 3 "Test Case 21: Master is not active"
289289
xdsh ${AGGREGATOR_A} "cat /var/log/ibm/csm/csm_aggregator.log" > ${TEMP_LOG} 2>&1
290290
check_all_output "Transition from RUNMODE_CONFIGURED to: RUNMODE_DISCONNECTED"
291291
check_return_flag_value $? 0 "Test Case 21: Aggregator transitions to RUNMODE_DISCONNECTED"
292-
xdsh utility "cat /var/log/ibm/csm/csm_utility.log" > ${TEMP_LOG} 2>&1
292+
xdsh ${UTILITY} "cat /var/log/ibm/csm/csm_utility.log" > ${TEMP_LOG} 2>&1
293293
check_all_output "Transition from RUNMODE_CONFIGURED to: RUNMODE_DISCONNECTED"
294294
check_return_flag_value $? 0 "Test Case 21: Utility transitions to RUNMODE_DISCONNECTED"
295295

@@ -299,7 +299,7 @@ systemctl start csmd-master
299299
sleep 1
300300
systemctl is-active csmd-master > /dev/null
301301
check_return_exit $? 0 "Test Case 22: Master is active"
302-
xdsh utility "systemctl is-active csmd-utility" > /dev/null
302+
xdsh ${UTILITY} "systemctl is-active csmd-utility" > /dev/null
303303
check_return_exit $? 0 "Test Case 22: Utility is active"
304304
xdsh ${AGGREGATOR_A} "systemctl is-active csmd-aggregator" > /dev/null
305305
check_return_exit $? 0 "Test Case 22: Aggregator is active"
@@ -405,9 +405,9 @@ check_return_flag_value $? 0 "Test Case 29: Validating Health Check output"
405405

406406
# Test Case 30: Start utility daemon, health check, utility and aggregator daemon present
407407
echo "Test Case 30: Start utility daemon, health check, utility and aggregator daemon present" >> ${LOG}
408-
xdsh utility "systemctl start csmd-utility"
408+
xdsh ${UTILITY} "systemctl start csmd-utility"
409409
sleep 1
410-
xdsh utility "systemctl is-active csmd-utility" > /dev/null
410+
xdsh ${UTILITY} "systemctl is-active csmd-utility" > /dev/null
411411
check_return_exit $? 0 "Test Case 30: Utility is active"
412412
${CSM_PATH}/csm_infrastructure_health_check -v > ${TEMP_LOG} 2>&1
413413
check_return_exit $? 0 "Test Case 30: Health Check"
@@ -441,9 +441,9 @@ check_return_flag_value $? 0 "Test Case 32: Validating csm_ras_event_query outpu
441441

442442
# Test Case 33: Stop utility daemon, health check, utility disconnected
443443
echo "Test Case 33: Stop utility daemon, health check, utility disconnected" >> ${LOG}
444-
xdsh utility "systemctl stop csmd-utility"
444+
xdsh ${UTILITY} "systemctl stop csmd-utility"
445445
sleep 1
446-
xdsh utility "systemctl is-active csmd-utility" > /dev/null
446+
xdsh ${UTILITY} "systemctl is-active csmd-utility" > /dev/null
447447
check_return_exit $? 1 "Test Case 33: Utility is not active"
448448
${CSM_PATH}/csm_infrastructure_health_check -v > ${TEMP_LOG} 2>&1
449449
check_return_exit $? 0 "Test Case 33: Health Check"

csmtest/buckets/error_injection/versioning.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# buckets/error_injection/versioning.sh
44
#
5-
# © Copyright IBM Corporation 2015-2018. All Rights Reserved
5+
# © Copyright IBM Corporation 2015-2021. All Rights Reserved
66
#
77
# This program is licensed under the terms of the Eclipse Public License
88
# v1.0 as published by the Eclipse Foundation and available at
@@ -70,7 +70,7 @@ systemctl start csmd-master > ${TEMP_LOG} 2>&1
7070
check_return_exit $? 0 "Starting Master"
7171
xdsh ${AGGREGATOR_A} "systemctl start csmd-aggregator" > ${TEMP_LOG} 2>&1
7272
check_return_exit $? 0 "Starting Aggregator"
73-
xdsh utility "systemctl start csmd-utility" > ${TEMP_LOG} 2>&1
73+
xdsh ${UTILITY} "systemctl start csmd-utility" > ${TEMP_LOG} 2>&1
7474
check_return_exit $? 0 "Starting Utility"
7575
xdsh ${SINGLE_COMPUTE} "systemctl start csmd-compute" > ${TEMP_LOG} 2>&1
7676
check_return_exit $? 0 "Starting Compute"
@@ -79,7 +79,7 @@ check_return_exit $? 0 "Starting Compute"
7979
systemctl status csmd-master > ${TEMP_LOG} 2>&1
8080
check_return_exit $? 0 "Test Case 1: Check Master status"
8181

82-
sleep 5
82+
sleep 10
8383
# Test Case 2: Check Compute is not active
8484
xdsh ${SINGLE_COMPUTE} "systemctl is-active csmd-compute" > ${TEMP_LOG} 2>&1
8585
check_return_flag_value $? 1 "Test Case 2: Check Compute is not active"

csmtest/config.template

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export RPM_DIR=
1313
export BIG_DATA_DIR=
1414
export SQL_DIR=
1515
export SSL_KEY=
16+
export CAST_ELASTIC=
1617

1718
# Node Types
1819
export XCATMN=
@@ -22,8 +23,15 @@ export AGGREGATOR_B=
2223
export COMPUTE_NODES=
2324
export SINGLE_COMPUTE=
2425
export UFM_ADDR=
26+
export XCATMN_IP=
2527
export LOGSTASH=
2628

29+
# Node Types
30+
export SERVICE=
31+
export COMPUTE_B=
32+
export COMPUTE_A=
33+
export UTILITY=
34+
2735
# Users
2836
export USER=
2937
export SECOND_USER=

csmtest/include/functions.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@
1313
#
1414
#================================================================================
1515

16+
# Try to source the configuration file to get global configuration variables
17+
if [ -f "${BASH_SOURCE%/*}/../csm_test.cfg" ]
18+
then
19+
. "${BASH_SOURCE%/*}/../csm_test.cfg"
20+
else
21+
echo "Could not find csm_test.cfg file expected at "${BASH_SOURCE%/*}/../csm_test.cfg", exitting."
22+
exit 1
23+
fi
24+
1625
# ----------------------------------------------------------------
1726
# LogMsg Date/Time Function
1827
# Functionality: This helps track the date/timing of each bucket
@@ -48,8 +57,8 @@ check_all_output () {
4857
shutdown_daemons () {
4958
systemctl stop csmd-master
5059
xdsh ${AGGREGATOR_A} "systemctl stop csmd-aggregator"
51-
xdsh utility "systemctl stop csmd-utility"
52-
xdsh csm_comp "systemctl stop csmd-compute"
60+
xdsh ${UTILITY} "systemctl stop csmd-utility"
61+
xdsh ${COMPUTE_NODES} "systemctl stop csmd-compute"
5362
echo "y" | /opt/ibm/csm/db/csm_db_script.sh -d csmdb
5463
/opt/ibm/csm/db/csm_db_script.sh -n csmdb
5564
}

csmtest/include/hcdiag/csm_fvt_diag_test_properties_setup_p8_p9.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@
1313
#
1414
#================================================================================
1515

16+
if [ -f "${BASH_SOURCE%/*}/../../csm_test.cfg" ]
17+
then
18+
. "${BASH_SOURCE%/*}/../../csm_test.cfg"
19+
else
20+
echo "Could not find csm_test.cfg file expected at "${BASH_SOURCE%/*}/../csm_test.cfg", exitting."
21+
exit 1
22+
fi
23+
1624
#---------------------------------------
1725
# Output formatter
1826
#---------------------------------------
@@ -212,7 +220,7 @@ fi
212220
# Check to ensure the return count is not -gt 1.
213221
# Find the pattern in the test.properties file to replace.
214222
#-------------------------------------------------------------
215-
smt_set=`xdsh $COMPUTE_NODES "/usr/sbin/ppc64_cpu --smt | cut -d '=' -f2" | xcoll | grep -v csm_comp | grep -v ==================================== | grep -v "No route to host" | grep -v compute | awk 'NR>1 {print last} {last=$0}'`
223+
smt_set=`xdsh $COMPUTE_NODES "/usr/sbin/ppc64_cpu --smt | cut -d '=' -f2" | xcoll | grep -v $COMPUTE_NODES | grep -v ==================================== | grep -v "No route to host" | grep -v compute | awk 'NR>1 {print last} {last=$0}'`
216224
wc_smt_set=$(echo -n $smt_set | wc -w)
217225
smt_tp_file=`grep -A 3 "\[tests.chk-smt\\b" $ORIG_FILE | awk 'FNR == 4 {print}' | awk '{ print $3}'`
218226

0 commit comments

Comments
 (0)