You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
MCOL-792 debian 9 support
This commit is contained in:
@ -10,7 +10,7 @@ CHECK=true
|
|||||||
REPORTPASS=true
|
REPORTPASS=true
|
||||||
LOGFILE=""
|
LOGFILE=""
|
||||||
|
|
||||||
OS_LIST=("centos6" "centos7" "debian8" "suse12" "ubuntu16")
|
OS_LIST=("centos6" "centos7" "debian8" "debian9" "suse12" "ubuntu16")
|
||||||
|
|
||||||
NODE_IPADDRESS=""
|
NODE_IPADDRESS=""
|
||||||
|
|
||||||
@ -62,17 +62,16 @@ helpPrint () {
|
|||||||
echo " OS version"
|
echo " OS version"
|
||||||
echo " Locale settings"
|
echo " Locale settings"
|
||||||
echo " Firewall settings"
|
echo " Firewall settings"
|
||||||
echo " Date/time settings"
|
echo " Date/time settings"
|
||||||
echo " MariaDB port 3306 availability"
|
|
||||||
echo " Dependent packages installed"
|
echo " Dependent packages installed"
|
||||||
echo " For non-root user install - test permissions on /tmp and /dev/shm"
|
echo " For non-root user install - test permissions on /tmp and /dev/shm"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Usage: $0 [options]"
|
echo "Usage: $0 [options]"
|
||||||
echo "OPTIONS:"
|
echo "OPTIONS:"
|
||||||
echo " -h,--help Help"
|
echo " -h,--help Help"
|
||||||
echo " --ipaddr=[ipaddresses] Remote Node IP-Addresses/Hostnames, if not provide, will only check local node"
|
echo " --ipaddr=[ipaddresses] Remote Node IP-Addresses/Hostnames, if not provide, will only check local node"
|
||||||
echo " examples: 192.168.1.1,192.168.1.2 or serverum1,serverpm2"
|
echo " examples: 192.168.1.1,192.168.1.2 or serverum1,serverpm2"
|
||||||
echo " --os=[os] Optional: Set OS Version (centos6, centos7, debian8, suse12, ubuntu16)"
|
echo " --os=[os] Optional: Set OS Version (centos6, centos7, debian8, debian9, suse12, ubuntu16)"
|
||||||
echo " --password=[password] Provide a user password. (Default: ssh-keys setup will be assumed)"
|
echo " --password=[password] Provide a user password. (Default: ssh-keys setup will be assumed)"
|
||||||
echo " -c,--continue Continue on failures"
|
echo " -c,--continue Continue on failures"
|
||||||
echo " --logfile=[fileName] Output results to a log file"
|
echo " --logfile=[fileName] Output results to a log file"
|
||||||
@ -193,8 +192,6 @@ if [ "$IPADDRESSES" != "" ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
USER=`whoami 2>/dev/null`
|
|
||||||
|
|
||||||
checkLocalOS()
|
checkLocalOS()
|
||||||
{
|
{
|
||||||
echo "** Validate local OS is supported"
|
echo "** Validate local OS is supported"
|
||||||
@ -717,11 +714,8 @@ checkPackages()
|
|||||||
echo "** Run MariaDB ColumnStore Dependent Package Check"
|
echo "** Run MariaDB ColumnStore Dependent Package Check"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
declare -a CENTOS_PKG=("expect" "perl" "perl-DBI" "openssl" "zlib" "file" "sudo" "libaio" "rsync" "snappy" "net-tools")
|
declare -a CENTOS_PKG=("expect" "perl" "perl-DBI" "openssl" "zlib" "file" "sudo" "libaio" "rsync" "snappy" "net-tools" "perl-DBD-MySQL")
|
||||||
# packages that need to be removed, MCS doesnt work with these packaged installed
|
|
||||||
declare -a CENTOS_PKG_UNINSTALL=("mariadb-libs")
|
|
||||||
|
|
||||||
#check local packages
|
|
||||||
if [ "$OS" == "centos6" ] || [ "$OS" == "centos7" ]; then
|
if [ "$OS" == "centos6" ] || [ "$OS" == "centos7" ]; then
|
||||||
if [ ! `which yum 2>/dev/null` ] ; then
|
if [ ! `which yum 2>/dev/null` ] ; then
|
||||||
echo "${bold}Failed${normal}, Local Node ${bold}yum${normal} package not installed"
|
echo "${bold}Failed${normal}, Local Node ${bold}yum${normal} package not installed"
|
||||||
@ -756,27 +750,6 @@ checkPackages()
|
|||||||
checkContinue
|
checkContinue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#check the packages that should exist
|
|
||||||
pass=true
|
|
||||||
#check centos packages that should be removed on local node
|
|
||||||
for PKG in "${CENTOS_PKG_UNINSTALL[@]}"; do
|
|
||||||
`yum list installed "$PKG" > /tmp/pkg_check 2>&1`
|
|
||||||
`cat /tmp/pkg_check | grep Installed > /dev/null 2>&1`
|
|
||||||
if [ "$?" -eq 0 ]; then
|
|
||||||
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is installed which can cause issues with MCS, please uninstall"
|
|
||||||
pass=false
|
|
||||||
REPORTPASS=false
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ $pass == true ] ; then
|
|
||||||
echo ""
|
|
||||||
echo "Local Node - Passed, all packages that should not be installed are uninstalled"
|
|
||||||
else
|
|
||||||
checkContinue
|
|
||||||
fi
|
|
||||||
|
|
||||||
# check remote packages
|
|
||||||
echo ""
|
echo ""
|
||||||
pass=true
|
pass=true
|
||||||
if [ "$IPADDRESSES" != "" ]; then
|
if [ "$IPADDRESSES" != "" ]; then
|
||||||
@ -811,32 +784,12 @@ checkPackages()
|
|||||||
checkContinue
|
checkContinue
|
||||||
pass=true
|
pass=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#check package that shouldn't be installed
|
|
||||||
for PKG in "${CENTOS_PKG_UNINSTALL[@]}"; do
|
|
||||||
`./remote_command.sh $ipadd $PASSWORD "yum list installed '$PKG' > /tmp/pkg_check 2>&1" 1 > /tmp/remote_command_check 2>&1`
|
|
||||||
rc="$?"
|
|
||||||
if [ $rc -eq 0 ] ; then
|
|
||||||
echo "${bold}Failed${normal}, $ipadd Node package ${bold}${PKG}${normal} is installed which can cause issues with MCS, please unstall"
|
|
||||||
pass=false
|
|
||||||
REPORTPASS=false
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if $pass; then
|
|
||||||
echo ""
|
|
||||||
echo "$ipadd Node - Passed, all packages that should not be installed are uninstalled"
|
|
||||||
else
|
|
||||||
checkContinue
|
|
||||||
pass=true
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
declare -a SUSE_PKG=("boost-devel" "expect" "perl" "perl-DBI" "openssl" "file" "sudo" "libaio1" "rsync" "libsnappy1" "net-tools")
|
declare -a SUSE_PKG=("boost-devel" "expect" "perl" "perl-DBI" "openssl" "file" "sudo" "libaio1" "rsync" "libsnappy1" "net-tools" "perl-DBD-mysql")
|
||||||
|
|
||||||
if [ "$OS" == "suse12" ]; then
|
if [ "$OS" == "suse12" ]; then
|
||||||
if [ ! `which rpm 2>/dev/null` ] ; then
|
if [ ! `which rpm 2>/dev/null` ] ; then
|
||||||
@ -888,7 +841,7 @@ checkPackages()
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
declare -a UBUNTU_PKG=("libboost-all-dev" "expect" "libdbi-perl" "perl" "openssl" "file" "sudo" "libreadline-dev" "rsync" "snappy" "net-tools")
|
declare -a UBUNTU_PKG=("libboost-all-dev" "expect" "libdbi-perl" "perl" "openssl" "file" "sudo" "libreadline-dev" "rsync" "libsnappy1V5" "net-tools" "libdbd-mysql-perl")
|
||||||
|
|
||||||
if [ "$OS" == "ubuntu16" ] ; then
|
if [ "$OS" == "ubuntu16" ] ; then
|
||||||
if [ ! `which dpkg 2>/dev/null` ] ; then
|
if [ ! `which dpkg 2>/dev/null` ] ; then
|
||||||
@ -953,7 +906,7 @@ checkPackages()
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
declare -a DEBIAN_PKG=("libboost-all-dev" "expect" "libdbi-perl" "perl" "openssl" "file" "sudo" "libreadline-dev" "rsync" "libsnappy1" "net-tools")
|
declare -a DEBIAN_PKG=("libboost-all-dev" "expect" "libdbi-perl" "perl" "openssl" "file" "sudo" "libreadline-dev" "rsync" "libsnappy1" "net-tools" "libdbd-mysql-perl")
|
||||||
|
|
||||||
if [ "$OS" == "debian8" ]; then
|
if [ "$OS" == "debian8" ]; then
|
||||||
if [ ! `which dpkg 2>/dev/null` ] ; then
|
if [ ! `which dpkg 2>/dev/null` ] ; then
|
||||||
@ -1017,40 +970,73 @@ checkPackages()
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
|
||||||
|
|
||||||
checkMySQLPort()
|
|
||||||
{
|
|
||||||
# MySQL Port Usage check
|
|
||||||
#
|
|
||||||
echo ""
|
|
||||||
echo "** Run MariaDB Port Usage check - port 3306 shouldn't be in-use"
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
pass=true
|
declare -a DEBIAN9_PKG=("libboost-all-dev" "expect" "libdbi-perl" "perl" "openssl" "file" "sudo" "libreadline5" "rsync" "libsnappy1V5" "net-tools")
|
||||||
`netstat -na | grep -e ":3306 " | grep LISTEN > /dev/null 2>&1`
|
|
||||||
if [ "$?" -eq 0 ]; then
|
|
||||||
echo "${bold}Failed${normal}, Local Node - MariaDB port 3306 is being used. Recommend stopping the process that is using that port"
|
|
||||||
pass=false
|
|
||||||
else
|
|
||||||
echo "Local Node - MariaDB port 3306 is not in-use"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$IPADDRESSES" != "" ]; then
|
if [ "$OS" == "debian9" ]; then
|
||||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
if [ ! `which dpkg 2>/dev/null` ] ; then
|
||||||
`./remote_command.sh $ipadd $PASSWORD "netstat -na | grep -e ":3306 " | grep LISTEN > /dev/null 2>&1" 1 > /tmp/remote_command_check 2>&1`
|
echo "${bold}Failed${normal}, Local Node ${bold}rpm${normal} package not installed"
|
||||||
if [ "$?" -eq 0 ]; then
|
pass=false
|
||||||
echo "${bold}Failed${normal}, $ipadd MariaDB port 3306 is being used. Recommend stopping the process that is using that port"
|
REPORTPASS=false
|
||||||
pass=false
|
else
|
||||||
|
pass=true
|
||||||
|
#check centos packages on local node
|
||||||
|
for PKG in "${DEBIAN9_PKG[@]}"; do
|
||||||
|
`dpkg -s "$PKG" > /tmp/pkg_check 2>&1`
|
||||||
|
`cat /tmp/pkg_check | grep 'install ok installed' > /dev/null 2>&1`
|
||||||
|
if [ "$?" -ne 0 ]; then
|
||||||
|
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is not installed, please install"
|
||||||
|
pass=false
|
||||||
|
REPORTPASS=false
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if $pass; then
|
||||||
|
echo "Local Node - Passed, all dependency packages are installed"
|
||||||
else
|
else
|
||||||
echo "$ipadd MariaDB port 3306 is not in-use"
|
checkContinue
|
||||||
fi
|
fi
|
||||||
done
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
pass=true
|
||||||
|
if [ "$IPADDRESSES" != "" ]; then
|
||||||
|
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||||
|
for PKG in "${DEBIAN9_PKG[@]}"; do
|
||||||
|
`./remote_command.sh $ipadd $PASSWORD "dpkg -s '$PKG' > /tmp/pkg_check 2>&1" 1 > /tmp/remote_command_check 2>&1`
|
||||||
|
`./remote_scp_get.sh $ipadd $PASSWORD /tmp/pkg_check > /tmp/remote_scp_get_check 2>&1`
|
||||||
|
if [ "$?" -ne 0 ]; then
|
||||||
|
echo "Error running remote_scp_get.sh to $ipadd Node, check /tmp/remote_scp_get_check"
|
||||||
|
else
|
||||||
|
`cat /tmp/remote_command_check | 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
|
||||||
|
break
|
||||||
|
else
|
||||||
|
`cat pkg_check | grep 'install ok installed' > /dev/null 2>&1`
|
||||||
|
if [ "$?" -ne 0 ]; then
|
||||||
|
echo "${bold}Failed${normal}, $ipadd Node package ${bold}${PKG}${normal} is not installed, please install"
|
||||||
|
pass=false
|
||||||
|
fi
|
||||||
|
|
||||||
|
`rm -f pkg_check`
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if $pass; then
|
||||||
|
echo "$ipadd Node - Passed, all dependency packages are installed"
|
||||||
|
else
|
||||||
|
checkContinue
|
||||||
|
pass=true
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
|
done
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! $pass; then
|
|
||||||
checkContinue
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
@ -1070,7 +1056,6 @@ if [ "$IPADDRESSES" != "" ]; then
|
|||||||
checkPorts
|
checkPorts
|
||||||
checkTime
|
checkTime
|
||||||
fi
|
fi
|
||||||
checkMySQLPort
|
|
||||||
checkPackages
|
checkPackages
|
||||||
|
|
||||||
if [ $REPORTPASS == true ] ; then
|
if [ $REPORTPASS == true ] ; then
|
||||||
|
@ -29,7 +29,7 @@ detectOS () {
|
|||||||
echo Operating System name: $osPrettyName
|
echo Operating System name: $osPrettyName
|
||||||
echo Operating System tag: $osTag
|
echo Operating System tag: $osTag
|
||||||
case "$osTag" in
|
case "$osTag" in
|
||||||
centos6|centos7|ubuntu16|debian8|suse12)
|
centos6|centos7|ubuntu16|debian8|suse12|debian9)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo OS not supported
|
echo OS not supported
|
||||||
|
Reference in New Issue
Block a user