|
Customer reported that when running the columnstoreClusterTester script for non-root install on a multi-node system, the test for /dev/shm on remote node passed, but the script was prompting saying a test failed.
Looking at the code, the function checkRemoteDir is not initializing the pass variable to true like other functions, thus causing the error.
Here is output from customer with bash -x
bash -x ./columnstoreClusterTester.sh --ipaddr=mcstest3-um1,mcstest3-um2,mcstest3-pm2
++ tput bold
+ bold=''
++ tput sgr0
+ normal=''
+ IPADDRESSES=
+ OS=
+ PASSWORD=ssh
+ CHECK=true
+ REPORTPASS=true
+ LOGFILE=
+ OS_LIST=("centos6" "centos7" "debian8" "debian9" "suse12" "ubuntu16" "ubuntu18")
+ NODE_IPADDRESS=
+ '[' -z /home/mysql/mariadb/columnstore ']'
++ /home/mysql/mariadb/columnstore/bin/getConfig SystemConfig SystemTempFileDir
+ tmpDir=/home/mysql/.tmp
+ getopts hc-: OPT
+ case "$OPT" in
+ LONG_OPTARG=mcstest3-um1,mcstest3-um2,mcstest3-pm2
+ case $OPTARG in
+ IPADDRESSES=mcstest3-um1,mcstest3-um2,mcstest3-pm2
+ getopts hc-: OPT
++ expr 2 - 1
+ shift 1
+ '[' mcstest3-um1,mcstest3-um2,mcstest3-pm2 '!=' '' ']'
+ IFS=,
+ read -ra NODE_IPADDRESS
+ type expect
+ type nmap
+ echo ''
+ echo '*** This is the MariaDB Columnstore Cluster System Test Tool ***'
-
-
- This is the MariaDB Columnstore Cluster System Test Tool ***
+ echo ''
+ checkLocalOS
+ echo '** Validate local OS is supported'
-
- Validate local OS is supported
+ echo ''
++ /home/mysql/mariadb/columnstore/bin/os_detect.sh
+ '[' 0 -eq 0 ']'
++ cat /home/mysql/.tmp/os_detect
++ grep 'Operating System name'
++ cut -f2 -d '"'
+ localOS='CentOS Linux 7 (Core)'
+ echo 'Local Node OS System Name : CentOS Linux 7 (Core)'
Local Node OS System Name : CentOS Linux 7 (Core)
+ '[' '' '!=' '' ']'
++ cat /home/mysql/.tmp/os_detect
++ grep 'Operating System tag'
++ cut -f4 -d ' '
+ OS=centos7
+ checkLocalDir
+ '[' mysql '!=' root ']'
+ echo ''
+ echo '** Run Non-root User directory permissions check on Local Node (dev/shm)'
-
- Run Non-root User directory permissions check on Local Node (dev/shm)
+ echo ''
++ touch /dev/shm/cs_check
+ '[' 0 -eq 0 ']'
+ echo 'Local Node permission test on /dev/shm : Passed'
Local Node permission test on /dev/shm : Passed
++ rm -f /dev/shm/cs_check
+ checkLocalUMASK
+ echo ''
+ echo '** Run Local UMASK check'
-
- Run Local UMASK check
+ echo ''
+ pass=true
+ filename=UMASKtest
+ rm -f UMASKtest
+ touch UMASKtest
++ stat -c %A UMASKtest
+ permission=rw-rr-
+ result=r
+ '[' r == r ']'
+ result=r
+ '[' r == r ']'
+ echo 'UMASK local setting test passed'
UMASK local setting test passed
+ true
+ rm -f UMASKtest
+ checkLocalSELINUX
+ echo ''
+ echo '** Run Local SELINUX check'
-
- Run Local SELINUX check
+ echo ''
+ pass=true
+ '[' -f /etc/selinux/config ']'
++ cat /etc/selinux/config
++ grep enforcing
++ grep SELINUX
+ '[' 0 -eq 0 ']'
+ echo 'Warning, Local Node SELINUX setting is Enabled, check port test results'
Warning, Local Node SELINUX setting is Enabled, check port test results
+ pass=false
+ false
+ checkContinue
+ '[' true = false ']'
+ echo ''
+ read -p 'Failure occurred, do you want to continue? (y,n) > ' answer
Failure occurred, do you want to continue? (y,n) > y
+ case ${answer:0:1} in
+ return 0
+ '[' mcstest3-um1,mcstest3-um2,mcstest3-pm2 '!=' '' ']'
+ checkPing
+ echo ''
+ echo '** Run Ping access Test to remote nodes'
-
- Run Ping access Test to remote nodes
+ echo ''
+ for ipadd in '"${NODE_IPADDRESS[@]}"'
++ ping mcstest3-um1 -c 1 -w 5
+ '[' 0 -eq 0 ']'
+ echo mcstest3-um1 ' Node Passed ping test'
mcstest3-um1 Node Passed ping test
+ for ipadd in '"${NODE_IPADDRESS[@]}"'
++ ping mcstest3-um2 -c 1 -w 5
+ '[' 0 -eq 0 ']'
+ echo mcstest3-um2 ' Node Passed ping test'
mcstest3-um2 Node Passed ping test
+ for ipadd in '"${NODE_IPADDRESS[@]}"'
++ ping mcstest3-pm2 -c 1 -w 5
+ '[' 0 -eq 0 ']'
+ echo mcstest3-pm2 ' Node Passed ping test'
mcstest3-pm2 Node Passed ping test
+ checkSSH
+ echo ''
+ echo '** Run SSH Login access Test to remote nodes'
-
- Run SSH Login access Test to remote nodes
+ echo ''
+ for ipadd in '"${NODE_IPADDRESS[@]}"'
++ /home/mysql/mariadb/columnstore/bin/remote_command.sh mcstest3-um1 ssh ls 1
+ rc=0
+ '[' 0 -eq 0 ']'
+ '[' ssh == ssh ']'
+ echo mcstest3-um1 ' Node Passed SSH login test using ssh-keys'
mcstest3-um1 Node Passed SSH login test using ssh-keys
+ for ipadd in '"${NODE_IPADDRESS[@]}"'
++ /home/mysql/mariadb/columnstore/bin/remote_command.sh mcstest3-um2 ssh ls 1
+ rc=0
+ '[' 0 -eq 0 ']'
+ '[' ssh == ssh ']'
+ echo mcstest3-um2 ' Node Passed SSH login test using ssh-keys'
mcstest3-um2 Node Passed SSH login test using ssh-keys
+ for ipadd in '"${NODE_IPADDRESS[@]}"'
++ /home/mysql/mariadb/columnstore/bin/remote_command.sh mcstest3-pm2 ssh ls 1
+ rc=0
+ '[' 0 -eq 0 ']'
+ '[' ssh == ssh ']'
+ echo mcstest3-pm2 ' Node Passed SSH login test using ssh-keys'
mcstest3-pm2 Node Passed SSH login test using ssh-keys
+ checkRemoteDir
+ '[' mysql '!=' root ']'
+ echo ''
+ echo '** Run Non-root User directory permissions check on remote nodes (/dev/shm)'
-
- Run Non-root User directory permissions check on remote nodes (/dev/shm)
+ echo ''
++ /home/mysql/mariadb/columnstore/bin/remote_command.sh mcstest3-pm2 ssh 'touch /dev/shm/cs_check' 1
+ rc=0
+ '[' 0 -eq 0 ']'
++ grep 'Permission denied' /home/mysql/.tmp/remote_command_check
+ '[' 1 -eq 0 ']'
+ echo 'mcstest3-pm2 Node permission test on /dev/shm : Passed'
mcstest3-pm2 Node permission test on /dev/shm : Passed
+ false
+ checkContinue
+ '[' true = false ']'
+ echo ''
+ read -p 'Failure occurred, do you want to continue? (y,n) > ' answer
Failure occurred, do you want to continue? (y,n) > y
+ case ${answer:0:1} in
+ return 0
|