1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

add ipaddr to the /tmp log files

This commit is contained in:
David Hill
2017-05-23 10:47:01 -05:00
parent 19755539e9
commit 37ead3c076

View File

@ -343,7 +343,7 @@ checkRemoteDir()
`sudo rm -f /tmp/*_check > /dev/null 2>&1`
for ipadd in "${NODE_IPADDRESS[@]}"; do
`./remote_command.sh $ipadd $PASSWORD 'sudo rm -f /tmp/*_check > /dev/null 2>&1' 1 > /tmp/remote_command_check 2>&1`
`./remote_command.sh $ipadd $PASSWORD 'sudo rm -f /tmp/*_check > /dev/null 2>&1' 1 > /tmp/remote_command_check_$ipadd 2>&1`
done
if [ "$USER" != "root" ]; then
@ -354,10 +354,10 @@ checkRemoteDir()
echo ""
for ipadd in "${NODE_IPADDRESS[@]}"; do
`./remote_command.sh $ipadd $PASSWORD 'touch /tmp/cs_check' 1 > /tmp/remote_command_check 2>&1`
`./remote_command.sh $ipadd $PASSWORD 'touch /tmp/cs_check' 1 > /tmp/remote_command_check_$ipadd 2>&1`
rc="$?"
if [ $rc -eq 0 ] || ( [ $rc -eq 2 ] && [ $OS == "suse12" ] ) ; then
`grep "Permission denied" /tmp/remote_command_check > /dev/null 2>&1`
`grep "Permission denied" /tmp/remote_command_check_$ipadd > /dev/null 2>&1`
if [ "$?" -eq 0 ]; then
echo "$ipadd Node permission test on /tmp : ${bold}Failed${normal}, change permissions to 777 and re-test"
exit 1
@ -365,15 +365,15 @@ checkRemoteDir()
echo "$ipadd Node permission test on /tmp : Passed"
fi
else
echo "Error running remote_command.sh to $ipadd Node, check /tmp/remote_command_check"
echo "Error running remote_command.sh to $ipadd Node, check /tmp/remote_command_check_$ipadd"
pass=false
REPORTPASS=false
fi
`./remote_command.sh $ipadd $PASSWORD 'touch /dev/shm/cs_check' 1 > /tmp/remote_command_check 2>&1`
`./remote_command.sh $ipadd $PASSWORD 'touch /dev/shm/cs_check' 1 > /tmp/remote_command_check_$ipadd 2>&1`
rc="$?"
if [ $rc -eq 0 ] || ( [ $rc -eq 2 ] && [ $OS == "suse12" ] ) ; then
`grep "Permission denied" /tmp/remote_command_check > /dev/null 2>&1`
`grep "Permission denied" /tmp/remote_command_check_$ipadd > /dev/null 2>&1`
if [ "$?" -eq 0 ]; then
echo "$ipadd Node permission test on /dev/shm : ${bold}Failed${normal}, change permissions to 777 and re-test"
pass=false
@ -382,7 +382,7 @@ checkRemoteDir()
echo "$ipadd Node permission test on /dev/shm : Passed"
fi
else
echo "Error running remote_command.sh to $ipadd Node, check /tmp/remote_command_check"
echo "Error running remote_command.sh to $ipadd Node, check /tmp/remote_command_check_$ipadd"
pass=false
REPORTPASS=false
fi
@ -407,15 +407,15 @@ checkOS()
pass=true
for ipadd in "${NODE_IPADDRESS[@]}"; do
`./remote_scp_put.sh $ipadd $PASSWORD os_detect.sh 1 > /tmp/remote_scp_put_check 2>&1`
`./remote_scp_put.sh $ipadd $PASSWORD os_detect.sh 1 > /tmp/remote_scp_put_check_$ipadd 2>&1`
if [ "$?" -ne 0 ]; then
echo "Error running remote_scp_put.sh to $ipadd Node, check /tmp/remote_scp_put_check"
echo "Error running remote_scp_put.sh to $ipadd Node, check /tmp/remote_scp_put_check_$ipadd"
else
`./remote_command.sh $ipadd $PASSWORD './os_detect.sh > /tmp/os_detect 2>&1' 1 > /tmp/remote_command_check`
`./remote_command.sh $ipadd $PASSWORD './os_detect.sh > /tmp/os_detect 2>&1' 1 > /tmp/remote_command_check_$ipadd`
rc="$?"
`./remote_scp_get.sh $ipadd $PASSWORD /tmp/os_detect > /tmp/remote_scp_get_check 2>&1`
`./remote_scp_get.sh $ipadd $PASSWORD /tmp/os_detect > /tmp/remote_scp_get_check_$ipadd 2>&1`
if [ "$?" -ne 0 ]; then
echo "Error running remote_scp_get.sh to $ipadd Node, check /tmp/remote_scp_get_check"
echo "Error running remote_scp_get.sh to $ipadd Node, check /tmp/remote_scp_get_check_$ipadd"
else
remoteOS=`cat os_detect | grep "Operating System name" | cut -f2 -d '"'`
echo "$ipadd Node OS Version : $remoteOS"
@ -452,12 +452,12 @@ checkLocale()
pass=true
for ipadd in "${NODE_IPADDRESS[@]}"; do
`./remote_command.sh $ipadd $PASSWORD 'locale | grep LANG= > /tmp/locale_check 2>&1' 1 > /tmp/remote_command_check`
`./remote_command.sh $ipadd $PASSWORD 'locale | grep LANG= > /tmp/locale_check 2>&1' 1 > /tmp/remote_command_check_$ipadd`
rc="$?"
if [ $rc -eq 0 ] || ( [ $rc -eq 2 ] && [ $OS == "suse12" ] ) ; then
`./remote_scp_get.sh $ipadd $PASSWORD /tmp/locale_check > /tmp/remote_scp_get_check 2>&1`
`./remote_scp_get.sh $ipadd $PASSWORD /tmp/locale_check > /tmp/remote_scp_get_check_$ipadd 2>&1`
if [ "$?" -ne 0 ]; then
echo "Error running remote_scp_get.sh to $ipadd Node, check /tmp/remote_scp_get_check"
echo "Error running remote_scp_get.sh to $ipadd Node, check /tmp/remote_scp_get_check_$ipadd"
else
echo "$ipadd Node Locale : `cat locale_check`"
`diff /tmp/locale_check locale_check > /dev/null 2>&1`
@ -469,7 +469,7 @@ checkLocale()
`rm -f locale_check`
fi
else
echo "Error running remote_command.sh to $ipadd Node, check /tmp/remote_command_check"
echo "Error running remote_command.sh to $ipadd Node, check /tmp/remote_command_check_$ipadd"
pass=false
REPORTPASS=false
fi
@ -504,7 +504,7 @@ checkSELINUX()
fi
for ipadd in "${NODE_IPADDRESS[@]}"; do
`./remote_scp_get.sh $ipadd $PASSWORD /etc/selinux/config > /tmp/remote_scp_get_check 2>&1`
`./remote_scp_get.sh $ipadd $PASSWORD /etc/selinux/config > /tmp/remote_scp_get_check_$ipadd 2>&1`
if [ "$?" -ne 0 ]; then
echo "$ipadd Node SELINUX setting is Not Enabled"
else
@ -570,14 +570,14 @@ checkFirewalls()
# 'sysconfig not on remote node
for firewall in "${FIREWALL_LIST[@]}"; do
pass=true
`./remote_command.sh $ipadd $PASSWORD "service '$firewall' status > /tmp/firewall_check 2>&1" 1 > /tmp/remote_command_check`
`./remote_command.sh $ipadd $PASSWORD "service '$firewall' status > /tmp/firewall_check 2>&1" 1 > /tmp/remote_command_check_$ipadd`
if [ "$?" -eq 0 ]; then
echo "${bold}Failed${normal}, $ipadd Node $firewall service is Active, please disable"
pass=false
fpass=false
REPORTPASS=false
else
`./remote_command.sh $ipadd $PASSWORD "systemctl status '$firewall' > /tmp/firewall_check 2>&1" 1 > /tmp/remote_command_check`
`./remote_command.sh $ipadd $PASSWORD "systemctl status '$firewall' > /tmp/firewall_check 2>&1" 1 > /tmp/remote_command_check_$ipadd`
if [ "$?" -eq 0 ]; then
echo "${bold}Failed${normal}, $ipadd Node $firewall service is Active, please disable"
pass=false
@ -617,7 +617,7 @@ checkFirewalls()
fi
for ipadd in "${NODE_IPADDRESS[@]}"; do
`./remote_command.sh $ipadd $PASSWORD '/sbin/rcSuSEfirewall2 status > /tmp/rcSuSEfirewall2_check 2>&1' 1 > /tmp/remote_command_check`
`./remote_command.sh $ipadd $PASSWORD '/sbin/rcSuSEfirewall2 status > /tmp/rcSuSEfirewall2_check 2>&1' 1 > /tmp/remote_command_check_$ipadd`
rc="$?"
if [ $rc -eq 0 ] ; then
echo "${bold}Failed${normal}, $ipadd Node rcSuSEfirewall2 service is Active, please disable"
@ -679,9 +679,9 @@ checkTime()
pass=false
REPORTPASS=false
else
`./remote_scp_get.sh $ipadd $PASSWORD /tmp/time_check > /tmp/remote_scp_get_check 2>&1`
`./remote_scp_get.sh $ipadd $PASSWORD /tmp/time_check > /tmp/remote_scp_get_check_$ipadd 2>&1`
if [ "$?" -ne 0 ]; then
echo "Error running remote_scp_get.sh to $ipadd Node, check /tmp/remote_scp_get_check"
echo "Error running remote_scp_get.sh to $ipadd Node, check /tmp/remote_scp_get_check_$ipadd"
else
remoteTime=`cat time_check`
timeDiff=`echo "$(($remoteTime-$localTime))"`
@ -754,14 +754,14 @@ checkPackages()
for ipadd in "${NODE_IPADDRESS[@]}"; do
for PKG in "${CENTOS_PKG[@]}"; do
if [ $OS == "centos6" ] && [ $PKG == "boost" ]; then
`./remote_command.sh $ipadd $PASSWORD 'ls /usr/lib/libboost_regex.so > /dev/null 2>&1' 1 > /tmp/remote_command_check 2>&1`
`./remote_command.sh $ipadd $PASSWORD 'ls /usr/lib/libboost_regex.so > /dev/null 2>&1' 1 > /tmp/remote_command_check_$ipadd 2>&1`
if [ $? -ne 0 ] ; then
echo "${bold}Failed${normal}, $ipadd Node ${bold}boost libraries${normal} not installed"
pass=false
REPORTPASS=false
fi
else
`./remote_command.sh $ipadd $PASSWORD "yum list installed '$PKG' > /tmp/pkg_check 2>&1" 1 > /tmp/remote_command_check 2>&1`
`./remote_command.sh $ipadd $PASSWORD "yum list installed '$PKG' > /tmp/pkg_check 2>&1" 1 > /tmp/remote_command_check_$ipadd 2>&1`
rc="$?"
if [ $rc -eq 2 ] ; then
echo "${bold}Failed${normal}, $ipadd Node, 'yum' not installed"
@ -819,7 +819,7 @@ checkPackages()
if [ "$IPADDRESSES" != "" ]; then
for ipadd in "${NODE_IPADDRESS[@]}"; do
for PKG in "${SUSE_PKG[@]}"; do
`./remote_command.sh $ipadd $PASSWORD "rpm -qi '$PKG' > /tmp/pkg_check 2>&1" 1 > /tmp/remote_command_check 2>&1`
`./remote_command.sh $ipadd $PASSWORD "rpm -qi '$PKG' > /tmp/pkg_check 2>&1" 1 > /tmp/remote_command_check_$ipadd 2>&1`
rc="$?"
if [ $rc -ne 0 ] ; then
echo "${bold}Failed${normal}, $ipadd Node package ${bold}${PKG}${normal} is not installed, please install"
@ -871,14 +871,14 @@ checkPackages()
if [ "$IPADDRESSES" != "" ]; then
for ipadd in "${NODE_IPADDRESS[@]}"; do
for PKG in "${UBUNTU_PKG[@]}"; do
`./remote_command.sh $ipadd $PASSWORD "dpkg -s '$PKG' > /tmp/pkg_check 2>&1" 1 > /tmp/remote_command_check 2>&1`
`./remote_command.sh $ipadd $PASSWORD "dpkg -s '$PKG' > /tmp/pkg_check 2>&1" 1 > /tmp/remote_command_check_$ipadd 2>&1`
rc="$?"
if [ $rc -eq 0 ] ; then
`./remote_scp_get.sh $ipadd $PASSWORD /tmp/pkg_check > /tmp/remote_scp_get_check 2>&1`
`./remote_scp_get.sh $ipadd $PASSWORD /tmp/pkg_check > /tmp/remote_scp_get_check_$ipadd 2>&1`
if [ "$?" -ne 0 ]; then
echo "Error running remote_scp_get.sh to $ipadd Node, check /tmp/remote_scp_get_check"
echo "Error running remote_scp_get.sh to $ipadd Node, check /tmp/remote_scp_get_check_$ipadd"
else
`cat /tmp/remote_command_check | grep 'command not found' > /dev/null 2>&1`
`cat /tmp/remote_command_check_$ipadd | grep 'command not found' > /dev/null 2>&1`
if [ "$?" -eq 0 ]; then
echo "${bold}Failed${normal}, $ipadd Node ${bold}dpkg${normal} package not installed"
pass=false
@ -894,7 +894,7 @@ checkPackages()
fi
fi
else
echo "Error running remote_command.sh to $ipadd Node, check /tmp/remote_command_check"
echo "Error running remote_command.sh to $ipadd Node, check /tmp/remote_command_check_$ipadd"
pass=false
fi
done
@ -942,14 +942,14 @@ checkPackages()
if [ "$IPADDRESSES" != "" ]; then
for ipadd in "${NODE_IPADDRESS[@]}"; do
for PKG in "${DEBIAN_PKG[@]}"; do
`./remote_command.sh $ipadd $PASSWORD "dpkg -s '$PKG' > /tmp/pkg_check 2>&1" 1 > /tmp/remote_command_check 2>&1`
`./remote_command.sh $ipadd $PASSWORD "dpkg -s '$PKG' > /tmp/pkg_check 2>&1" 1 > /tmp/remote_command_check_$ipadd 2>&1`
rc="$?"
if [ $rc -eq 0 ] ; then
`./remote_scp_get.sh $ipadd $PASSWORD /tmp/pkg_check > /tmp/remote_scp_get_check 2>&1`
`./remote_scp_get.sh $ipadd $PASSWORD /tmp/pkg_check > /tmp/remote_scp_get_check_$ipadd 2>&1`
if [ "$?" -ne 0 ]; then
echo "Error running remote_scp_get.sh to $ipadd Node, check /tmp/remote_scp_get_check"
echo "Error running remote_scp_get.sh to $ipadd Node, check /tmp/remote_scp_get_check_$ipadd"
else
`cat /tmp/remote_command_check | grep 'command not found' > /dev/null 2>&1`
`cat /tmp/remote_command_check_$ipadd | grep 'command not found' > /dev/null 2>&1`
if [ "$?" -eq 0 ]; then
echo "${bold}Failed${normal}, $ipadd Node ${bold}dpkg${normal} package not installed"
pass=false
@ -965,7 +965,7 @@ checkPackages()
fi
fi
else
echo "Error running remote_command.sh to $ipadd Node, check /tmp/remote_command_check"
echo "Error running remote_command.sh to $ipadd Node, check /tmp/remote_command_check_$ipadd"
pass=false
fi
done