diff --git a/CMakeLists.txt b/CMakeLists.txt index e1bff2b11..ce18bec3f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,6 +74,14 @@ SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/obj) SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin) SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib) +IF (RPM) + SET(MARIADB_PLUGINDIR "/usr/lib64/mysql/plugin") +ELSEIF (DEB) + SET(MARIADB_PLUGINDIR "/usr/lib/mysql/plugin") +ELSE() + SET(MARIADB_PLUGINDIR "/usr/local/lib/mysql/plugin") +ENDIF() + SET_PROPERTY(DIRECTORY PROPERTY EP_BASE ${CMAKE_CURRENT_BINARY_DIR}/external) LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake) @@ -104,7 +112,7 @@ SET(CMAKE_SKIP_BUILD_RPATH FALSE) # (but later on when installing) SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) -SET(CMAKE_INSTALL_RPATH "${INSTALL_ENGINE}/lib;${INSTALL_ENGINE}/mysql/lib") +SET(CMAKE_INSTALL_RPATH "${INSTALL_ENGINE}/lib") # add the automatically determined parts of the RPATH # which point to directories outside the build tree to the install RPATH @@ -116,11 +124,6 @@ IF("${isSystemDir}" STREQUAL "-1") SET(CMAKE_INSTALL_RPATH "${INSTALL_ENGINE}/lib") ENDIF("${isSystemDir}" STREQUAL "-1") -LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${SERVER_SOURCE_ROOT_DIR}/libmysql/" isSystemDir) -IF("${isSystemDir}" STREQUAL "-1") - SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH};${INSTALL_ENGINE}/mysql/lib") -ENDIF("${isSystemDir}" STREQUAL "-1") - INCLUDE (configureEngine) diff --git a/build/CopyLog.sh b/build/CopyLog.sh deleted file mode 100644 index 896808661..000000000 --- a/build/CopyLog.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/expect -f -#@echo off -spawn scp /InfiniDB/genii/mysql/queries/nightly/srvswdev11/go.log root@srvnightly:/tmp/srvbldwin1-genii-queryTester.log - -expect { - -re "authenticity" { send "yes\r" - expect { - -re "word: " { send "$PASSWORD\r" } abort - -re "passphrase" { send "$PASSWORD\r" } abort - } - } - -re "word: " { send "Calpont1\r" } abort - } -expect "*\r" -expect "\r" \ No newline at end of file diff --git a/build/bb_pre_build.sh b/build/bb_pre_build.sh deleted file mode 100755 index 2d0948c79..000000000 --- a/build/bb_pre_build.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -prefix="$1" - -if [ -z "$prefix" ]; then - echo "usage: $0 destdir" 1>&2 - exit 1 -fi - -rm -rf infinidb mysql infinidb-ent - -git clone http://srvgip1.calpont.com/repos/infinidb.git -cd infinidb -git checkout develop -cd .. - -git clone https://github.com/infinidb/mysql.git -cd mysql -git checkout develop -cd .. - -git clone http://srvgip1.calpont.com/repos/infinidb-ent.git -cd infinidb-ent -git checkout develop -cd .. - -cd infinidb - -mkdir -p export/{include,lib,etc,share,bin,sbin,post} - -cp -r utils/autoconf/* . -autoreconf -libtoolize --force --install - -./configure --prefix=$prefix - diff --git a/build/setmktop b/build/setmktop deleted file mode 100755 index 2826782cd..000000000 --- a/build/setmktop +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -# This script is for adding an include statement to Makefiles in order -# to point them at the toplevel rules.mak. It was used to add these -# lines when rules.mak was introduced. - -root=${root:-.} - -files=$(find $root -name '[mM]akefile' | grep -v ./mysql) - -for x in $files; do - - istmt=$(dirname $(echo $x | sed -r -e 's,\./,,' -e 's,[^/]+/,\.\./,g'))/rules.mak - tmpfile=/tmp/setmktop.$UID - # put new include stmt - echo "include $istmt" > $tmpfile - # append the old file less any include rules.mak lines - grep -v '^include .*rules.mak' $x >> $tmpfile - # copy over old - mv $tmpfile $x - printf "%s %s\n" "$x :" $istmt -done diff --git a/dbcon/mysql/CMakeLists.txt b/dbcon/mysql/CMakeLists.txt index 1f81f6854..88093de63 100644 --- a/dbcon/mysql/CMakeLists.txt +++ b/dbcon/mysql/CMakeLists.txt @@ -81,7 +81,7 @@ set_target_properties(is_columnstore_files PROPERTIES PREFIX "") set_target_properties(is_columnstore_files PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS calmysql is_columnstore_tables is_columnstore_columns is_columnstore_extents is_columnstore_files DESTINATION ${ENGINE_LIBDIR} COMPONENT storage-engine) +install(TARGETS calmysql is_columnstore_tables is_columnstore_columns is_columnstore_extents is_columnstore_files DESTINATION ${MARIADB_PLUGINDIR} COMPONENT storage-engine) install(FILES syscatalog_mysql.sql dumpcat_mysql.sql calsetuserpriority.sql diff --git a/dbcon/mysql/columnstore.cnf b/dbcon/mysql/columnstore.cnf index 21a9ca571..7c551d355 100644 --- a/dbcon/mysql/columnstore.cnf +++ b/dbcon/mysql/columnstore.cnf @@ -1,14 +1,11 @@ # The following options will be passed to all MySQL clients [client] #password = your_password -socket = /usr/local/mariadb/columnstore/mysql/lib/mysql/mysql.sock # Here follows entries for some specific programs # The MySQL server [mysqld] -socket = /usr/local/mariadb/columnstore/mysql/lib/mysql/mysql.sock -datadir = /usr/local/mariadb/columnstore/mysql/db sql_mode="ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" #columnstore_processing_handlers_fallback = OFF; @@ -29,15 +26,9 @@ sql_mode="ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" #columnstore_use_import_for_batchinsert=1 #columnstore_import_for_batchinsert_delimiter=7 -basedir = /usr/local/mariadb/columnstore/mysql/ -character-sets-dir = /usr/local/mariadb/columnstore/mysql/share/charsets/ -lc-messages-dir = /usr/local/mariadb/columnstore/mysql/share/ -plugin_dir = /usr/local/mariadb/columnstore/mysql/lib/plugin - # Replication Master Server (default) # binary logging is required for replication # log-bin=mysql-bin -binlog_format=ROW # required unique id between 1 and 2^32 - 1 # defaults to 1 if master-host @@ -45,9 +36,11 @@ binlog_format=ROW server-id = 1 # binary logging - not required for slaves, but recommended -log-bin=/usr/local/mariadb/columnstore/mysql/db/mysql-bin -relay-log=/usr/local/mariadb/columnstore/mysql/db/relay-bin -relay-log-index = /usr/local/mariadb/columnstore/mysql/db/relay-bin.index -relay-log-info-file = /usr/local/mariadb/columnstore/mysql/db/relay-bin.info lower_case_table_names=1 + +plugin-load-add=libcalmysql.so +plugin-load-add=is_columnstore_tables.so +plugin-load-add=is_columnstore_columns.so +plugin-load-add=is_columnstore_extents.so +plugin-load-add=is_columnstore_files.so diff --git a/dbcon/mysql/install_mcs_mysql.sh b/dbcon/mysql/install_mcs_mysql.sh index 8b33221d5..d59a65b2e 100755 --- a/dbcon/mysql/install_mcs_mysql.sh +++ b/dbcon/mysql/install_mcs_mysql.sh @@ -24,15 +24,55 @@ for arg in "$@"; do fi done -$installdir/mysql/bin/mysql --force --user=root mysql 2> ${tmpdir}/mysql_install.log < ${tmpdir}/mysql_install.log </dev/null <$installdir/mysql/syscatalog_mysql.sql -$installdir/mysql/bin/mysql --user=root mysql 2>/dev/null <$installdir/mysql/calsetuserpriority.sql -$installdir/mysql/bin/mysql --user=root mysql 2>/dev/null <$installdir/mysql/calremoveuserpriority.sql -$installdir/mysql/bin/mysql --user=root mysql 2>/dev/null <$installdir/mysql/calshowprocesslist.sql -$installdir/mysql/bin/mysql --user=root mysql 2>/dev/null <$installdir/mysql/columnstore_info.sql +mysql --user=root mysql 2>/dev/null <$installdir/mysql/syscatalog_mysql.sql +mysql --user=root mysql 2>/dev/null <$installdir/mysql/calsetuserpriority.sql +mysql --user=root mysql 2>/dev/null <$installdir/mysql/calremoveuserpriority.sql +mysql --user=root mysql 2>/dev/null <$installdir/mysql/calshowprocesslist.sql +mysql --user=root mysql 2>/dev/null <$installdir/mysql/columnstore_info.sql diff --git a/dbcon/mysql/mysql-Columnstore b/dbcon/mysql/mysql-Columnstore index 370b277d0..5c5305726 100755 --- a/dbcon/mysql/mysql-Columnstore +++ b/dbcon/mysql/mysql-Columnstore @@ -43,40 +43,12 @@ # If you change base dir, you must also change datadir. These may get # overwritten by settings in the MySQL configuration files. -prefix=/usr/local - -USER=`whoami 2>/dev/null` - -if [ $USER != "root" ]; then - prefix=$HOME -fi - -if [ $USER != "root" ]; then - if [ -f $prefix/.bash_profile ]; then - profileFile=$prefix/.bash_profile - elif [ -f $prefix/.profile ]; then - profileFile=$prefix/.profile - else - profileFile=$prefix/.bashrc - fi - - . $profileFile -fi # Source function library. if [ -f /etc/init.d/functions ]; then . /etc/init.d/functions fi -if [ -z "$COLUMNSTORE_INSTALL_DIR" ]; then - COLUMNSTORE_INSTALL_DIR=/usr/local/mariadb/columnstore -fi - -export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR - -basedir=$COLUMNSTORE_INSTALL_DIR/mysql -datadir=$basedir/db - # Default value, in seconds, afterwhich the script should timeout waiting # for server start. # Value here is overriden by value in my.cnf. @@ -86,7 +58,7 @@ service_startup_timeout=90 user=`whoami 2>/dev/null` # Lock directory -lockdir=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation LockFileDirectory` +lockdir=/var/lock/subsys lock_file_path="$lockdir/mysql-Columnstore" @@ -96,14 +68,14 @@ lock_file_path="$lockdir/mysql-Columnstore" mysqld_pid_file_path= if test -z "$basedir" then - basedir=/usr/local/mariadb/columnstore/mysql - bindir=/usr/local/bin + basedir=/usr + bindir=/usr/bin if test -z "$datadir" then datadir=/var/lib/mysql fi - sbindir=/usr/local/sbin - bindir=/usr/local/bin + sbindir=/usr/bin + bindir=/usr/bin else bindir="$basedir/bin" if test -z "$datadir" @@ -295,7 +267,7 @@ wait_for_ready () { i=0 while test $i -ne $service_startup_timeout ; do - if $bindir/mysqladmin ping --socket=$basedir/lib/mysql/mysql.sock >/dev/null 2>&1; then + if $bindir/mysqladmin ping >/dev/null 2>&1; then log_success_msg return 0 elif kill -0 $! 2>/dev/null ; then @@ -335,7 +307,7 @@ fi kill_by_pid() { # let's see if we can kill the 2 mysql procs by hand # get the our mysql from ps - eval $(ps -ef | grep "$COLUMNSTORE_INSTALL_DIR/mysql/bin/mysqld" | grep -v grep | head -1 | awk '{printf "pid=%d\n", $2}') + eval $(ps -ef | grep "bin/mysqld" | grep -v grep | head -1 | awk '{printf "pid=%d\n", $2}') if [ -n "$pid" ]; then ppid=$(ps -o ppid= -p $pid) @@ -361,7 +333,7 @@ case "$mode" in then # Give extra arguments to mysqld with the my.cnf file. This script # may be overwritten at next upgrade. - $bindir/mysqld_safe --datadir="$datadir" --pid-file="$mysqld_pid_file_path" "--ledir=$bindir" "$@" >/dev/null 2>&1 & + $bindir/mysqld_safe --datadir="$datadir" --pid-file="$mysqld_pid_file_path" "$@" >/dev/null 2>&1 & wait_for_ready; return_value=$? # Make lock for RedHat / SuSE diff --git a/genii.vpw b/genii.vpw deleted file mode 100644 index 417da26ce..000000000 --- a/genii.vpw +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/oam/etc/ProcessConfig.xml b/oam/etc/ProcessConfig.xml index c14055190..868fdaf6a 100644 --- a/oam/etc/ProcessConfig.xml +++ b/oam/etc/ProcessConfig.xml @@ -132,7 +132,7 @@ mysqld um - $INSTALLDIR/mysql/libexec/mysqld + /usr/bin/mysqld 0 100 diff --git a/oam/etc/ProcessConfig.xml.singleserver b/oam/etc/ProcessConfig.xml.singleserver index 9c543ae38..af9a2051e 100644 --- a/oam/etc/ProcessConfig.xml.singleserver +++ b/oam/etc/ProcessConfig.xml.singleserver @@ -121,7 +121,7 @@ mysqld pm - /usr/local/mariadb/columnstore/mysql/libexe/mysqld + /usr/bin/mysqld 0 100 diff --git a/oam/install_scripts/CMakeLists.txt b/oam/install_scripts/CMakeLists.txt index 75807ea3b..e8f3ef05c 100644 --- a/oam/install_scripts/CMakeLists.txt +++ b/oam/install_scripts/CMakeLists.txt @@ -27,7 +27,6 @@ install(PROGRAMS post-install columnstoreSyslog-ng syslogSetup.sh remote_scp_put.sh - columnstore.def remotessh.exp rsync.sh remote_command_verify.sh diff --git a/oam/install_scripts/columnstore.conf b/oam/install_scripts/columnstore.conf index e1b92ea84..5807d70aa 100644 --- a/oam/install_scripts/columnstore.conf +++ b/oam/install_scripts/columnstore.conf @@ -1,2 +1 @@ /usr/local/mariadb/columnstore/lib -/usr/local/mariadb/columnstore/mysql/lib \ No newline at end of file diff --git a/oam/install_scripts/columnstore.def b/oam/install_scripts/columnstore.def deleted file mode 100644 index 1a12f57d7..000000000 --- a/oam/install_scripts/columnstore.def +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -# Copy this file to /etc/default and rename it to 'columnstore'. - -# Change this line to your MariaDB Columnstore installation directory -COLUMNSTORE_INSTALL_DIR=/usr/local/mariadb/columnstore - -LD_LIBRARY_PATH=$COLUMNSTORE_INSTALL_DIR/lib:$COLUMNSTORE_INSTALL_DIR/mysql/lib -export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH diff --git a/oam/install_scripts/columnstore.in b/oam/install_scripts/columnstore.in index 36bfa4f78..f224ffc8f 100644 --- a/oam/install_scripts/columnstore.in +++ b/oam/install_scripts/columnstore.in @@ -51,8 +51,8 @@ export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR InstallDir=$COLUMNSTORE_INSTALL_DIR if [ $InstallDir != "/usr/local/mariadb/columnstore" ]; then - export PATH=$InstallDir/bin:$InstallDir/mysql/bin:/bin:/usr/bin - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$InstallDir/lib:$InstallDir/mysql/lib + export PATH=$InstallDir/bin:/bin:/usr/bin + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$InstallDir/lib fi #hadoop diff --git a/oam/install_scripts/columnstoreAlias b/oam/install_scripts/columnstoreAlias index ae3dfd13c..88c1de84c 100644 --- a/oam/install_scripts/columnstoreAlias +++ b/oam/install_scripts/columnstoreAlias @@ -1,6 +1,6 @@ # MariaDB Columnstore Alias Commands # -alias mcsmysql='/usr/local/mariadb/columnstore/mysql/bin/mysql -u root' +alias mcsmysql='mysql -u root' alias ma=/usr/local/mariadb/columnstore/bin/mcsadmin alias mcsadmin=/usr/local/mariadb/columnstore/bin/mcsadmin alias cpimport=/usr/local/mariadb/columnstore/bin/cpimport diff --git a/oam/install_scripts/columnstoreLogRotate.in b/oam/install_scripts/columnstoreLogRotate.in index 8c2bb7cd1..b217a5d2f 100644 --- a/oam/install_scripts/columnstoreLogRotate.in +++ b/oam/install_scripts/columnstoreLogRotate.in @@ -18,12 +18,3 @@ copy olddir @ENGINE_SYSCONFDIR@/columnstore } -/usr/local/mariadb/columnstore/mysql/db/*.err { - missingok - rotate 7 - daily - dateext - copytruncate - olddir /usr/local/mariadb/columnstore/mysql/db - su root root -} diff --git a/oam/install_scripts/disable-rep-columnstore.sh b/oam/install_scripts/disable-rep-columnstore.sh index c93f59f90..8dda50fab 100644 --- a/oam/install_scripts/disable-rep-columnstore.sh +++ b/oam/install_scripts/disable-rep-columnstore.sh @@ -48,8 +48,7 @@ stop slave; EOD cat ${tmpdir}/idb_disable-rep.sql >>${tmpdir}/disable-rep-status.log -$installdir/mysql/bin/mysql \ - --defaults-extra-file=$installdir/mysql/my.cnf \ +mysql \ --user=root $pwprompt \ calpontsys <${tmpdir}/idb_disable-rep.sql >>${tmpdir}/disable-rep-status.log 2>&1 @@ -64,8 +63,7 @@ reset slave; EOD cat ${tmpdir}/idb_disable-rep.sql >>${tmpdir}/disable-rep-status.log -$installdir/mysql/bin/mysql \ - --defaults-extra-file=$installdir/mysql/my.cnf \ +mysql \ --user=root $pwprompt \ calpontsys <${tmpdir}/idb_disable-rep.sql >>${tmpdir}/disable-rep-status.log 2>&1 diff --git a/oam/install_scripts/mariadb-command-line.sh b/oam/install_scripts/mariadb-command-line.sh index eda201387..d1c853548 100755 --- a/oam/install_scripts/mariadb-command-line.sh +++ b/oam/install_scripts/mariadb-command-line.sh @@ -56,7 +56,7 @@ $command; EOD cat${tmpdir}/mariadb-command-line.sql >> ${tmpdir}/mariadb-command-line.log -$installdir/mysql/bin/mysql \ +mysql \ --user=root \ calpontsys < ${tmpdir}/mariadb-command-line.sql >> ${tmpdir}/mariadb-command-line.log 2>&1 diff --git a/oam/install_scripts/master-rep-columnstore.sh b/oam/install_scripts/master-rep-columnstore.sh index d8369ed9c..a0185cb78 100644 --- a/oam/install_scripts/master-rep-columnstore.sh +++ b/oam/install_scripts/master-rep-columnstore.sh @@ -51,7 +51,7 @@ GRANT REPLICATION SLAVE ON *.* TO '$repUser'@'$hostipaddr'; EOD cat ${tmpdir}/idb_master-rep.sql >>${tmpdir}/master-rep-status-$hostipaddr.log -$installdir/mysql/bin/mysql \ +mysql \ --user=root \ calpontsys <${tmpdir}/idb_master-rep.sql >>${tmpdir}/master-rep-status-$hostipaddr.log 2>&1 @@ -68,7 +68,7 @@ grant REPLICATION SLAVE on *.* to '$repUser'@'$hostipaddr' identified by 'Calpon EOD cat ${tmpdir}/idb_master-rep.sql >>${tmpdir}/master-rep-status-$hostipaddr.log -$installdir/mysql/bin/mysql \ +mysql \ --user=root \ calpontsys <${tmpdir}/idb_master-rep.sql >>${tmpdir}/master-rep-status-$hostipaddr.log 2>&1 @@ -83,7 +83,7 @@ SHOW MASTER STATUS EOD cat ${tmpdir}/idb_master-rep.sql >>${tmpdir}/master-rep-status-$hostipaddr.log -$installdir/mysql/bin/mysql \ +mysql \ --user=root \ calpontsys <${tmpdir}/idb_master-rep.sql >>${tmpdir}/master-rep-status-$hostipaddr.log 2>&1 @@ -95,7 +95,7 @@ SHOW MASTER STATUS EOD cat ${tmpdir}/idb_master-rep.sql >${tmpdir}/show-master-status.log -$installdir/mysql/bin/mysql \ +mysql \ --user=root \ calpontsys <${tmpdir}/idb_master-rep.sql >>${tmpdir}/show-master-status.log diff --git a/oam/install_scripts/module_installer.sh b/oam/install_scripts/module_installer.sh index ce36ba5a7..52d8713af 100755 --- a/oam/install_scripts/module_installer.sh +++ b/oam/install_scripts/module_installer.sh @@ -50,8 +50,8 @@ shift $shiftcnt if [ $installdir != "/usr/local/mariadb/columnstore" ]; then export COLUMNSTORE_INSTALL_DIR=$installdir - export PATH=$COLUMNSTORE_INSTALL_DIR/bin:$COLUMNSTORE_INSTALL_DIR/mysql/bin:/bin:/usr/bin - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$COLUMNSTORE_INSTALL_DIR/lib:$COLUMNSTORE_INSTALL_DIR/mysql/lib + export PATH=$COLUMNSTORE_INSTALL_DIR/bin:/bin:/usr/bin + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$COLUMNSTORE_INSTALL_DIR/lib else export COLUMNSTORE_INSTALL_DIR=$installdir fi @@ -93,13 +93,6 @@ if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then systemtype=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation ServerTypeInstall` if [ $systemtype = "1" ]; then umstoragetype=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation UMStorageType` - if [ $umstoragetype = "external" ]; then - echo "Setup UM Volume Mount" - device=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation UMVolumeDeviceName$mid` - mkdir -p $COLUMNSTORE_INSTALL_DIR/mysql/db > /dev/null 2>&1 - sudo mount $device $COLUMNSTORE_INSTALL_DIR/mysql/db -t ext2 -o noatime,nodiratime,noauto,user - sudo chown $user:$user -R $COLUMNSTORE_INSTALL_DIR/mysql > /dev/null 2>&1 - fi fi fi diff --git a/oam/install_scripts/post-install.in b/oam/install_scripts/post-install.in index cee979792..79d07f3f5 100755 --- a/oam/install_scripts/post-install.in +++ b/oam/install_scripts/post-install.in @@ -22,7 +22,7 @@ for arg in "$@"; do if [ $installdirTmp == $installdir ] ; then user=root export COLUMNSTORE_INSTALL_DIR=$installdir - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib:$installdir/mysql/lib + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib else installdir=$installdirTmp prefix=`dirname $installdir` @@ -43,7 +43,7 @@ done if [ $user != "root" ]; then export COLUMNSTORE_INSTALL_DIR=$installdir - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib:$installdir/mysql/lib + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib else # add library config file /bin/cp -f $installdir/bin/columnstore.conf /etc/ld.so.conf.d/. >/dev/null 2>&1 @@ -130,7 +130,7 @@ if [ $user != "root" ]; then echo " " >> ${profileFile} echo "# MariaDB Columnstore Non-Root Environment Variables" >> ${profileFile} echo "export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR" >> ${profileFile} - echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$COLUMNSTORE_INSTALL_DIR/lib:$COLUMNSTORE_INSTALL_DIR/mysql/lib" >> ${profileFile} + echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$COLUMNSTORE_INSTALL_DIR/lib" >> ${profileFile} fi egrep -qs 'MariaDB Columnstore Non-Root Alias Variables' ${profileFile} @@ -207,10 +207,6 @@ mkdir -p $hdfsDir >/dev/null 2>&1 #create mount directories mkdir /mnt/tmp > /dev/null 2>&1 -# remove mysql archive log -test -d $installdir/mysql/db || mkdir -p $installdir/mysql/db -rm -rf $installdir/mysql/db/columnstore_log_archive > /dev/null 2>&1 - # delete Columnstore shared memory segments $installdir/bin/clearShm > /dev/null 2>&1 diff --git a/oam/install_scripts/post-mysql-install b/oam/install_scripts/post-mysql-install index 725a0c6c6..93b18fb1f 100755 --- a/oam/install_scripts/post-mysql-install +++ b/oam/install_scripts/post-mysql-install @@ -22,9 +22,9 @@ checkForError() { # See if engine columnstore exist #--------------------------------------------------------------------------- echo "checking for engine columnstore..." - $installdir/mysql/bin/mysql \ + mysql \ --user=root \ - --execute='select * from mysql.plugin where name="columnstore";' \ + --execute='show engines;' \ calpontsys | grep -i columnstore # @@ -65,31 +65,11 @@ USER=`whoami 2>/dev/null` if [ $USER != "root" ]; then ldconfig >/dev/null 2>&1 export COLUMNSTORE_INSTALL_DIR=$installdir - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$COLUMNSTORE_INSTALL_DIR/lib:$COLUMNSTORE_INSTALL_DIR/mysql/lib + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$COLUMNSTORE_INSTALL_DIR/lib else ldconfig fi -if [ -f $installdir/lib/libcalmysql.so.1.0.0 ]; then - libcalmysql=$installdir/lib/libcalmysql.so.1.0.0 - libudfsdk=$installdir/lib/libudf_mysql.so.1.0.0 - libregrsdk=$installdir/lib/libregr_mysql.so.1.0.0 -elif [ -f $installdir/lib/libcalmysql.so.1 ]; then - libcalmysql=$installdir/lib/libcalmysql.so.1 - libudfsdk=$installdir/lib/libudf_mysql.so.1 - libregrsdk=$installdir/lib/libregr_mysql.so.1 -else - libcalmysql= -fi - -if [ -d $installdir/mysql/lib64/mysql/plugin -a -n "$libcalmysql" ]; then - cd $installdir/mysql/lib64/mysql/plugin - ln -sf $libcalmysql libcalmysql.so - ln -sf $libcalmysql libcalmysqlent.so - ln -sf $libudfsdk libudf_mysql.so - ln -sf $libregrsdk libregr_mysql.so -fi - if [ $installdir != "/usr/local/mariadb/columnstore" ]; then sed -i -e s@/usr/local/mariadb/columnstore@$installdir@g /etc/my.cnf.d/columnstore.cnf fi diff --git a/oam/install_scripts/post-mysqld-install b/oam/install_scripts/post-mysqld-install index 629625492..b7936d7f4 100755 --- a/oam/install_scripts/post-mysqld-install +++ b/oam/install_scripts/post-mysqld-install @@ -38,132 +38,7 @@ for arg in "$@"; do fi done -#cd $installdir/mysql/lib -#for file in libmysqlclient libmysqlclient_r; do -# ln -sf $file.so.18.0.0 $file.so -# ln -sf $file.so.18.0.0 $file.so.18 -#done -cd $installdir/mysql/lib/plugin -for file in ha_archive ha_blackhole ha_federated ha_innodb; do - ln -sf $file.so $file.so.0 -done - -### taken from MySQL-server-5.1.30-0.glibc23.i386.rpm -mysql_datadir=$installdir/mysql/db - -# Create data directory if needed -if test ! -d $mysql_datadir; then mkdir -m 755 $mysql_datadir; fi -if test ! -d $mysql_datadir/mysql; then mkdir $mysql_datadir/mysql; fi -if test ! -d $mysql_datadir/test; then mkdir $mysql_datadir/test; fi -if test ! -d $installdir/mysql/lib; then mkdir $installdir/mysql/lib; fi -if test ! -d $installdir/mysql/lib/mysql; then mkdir $installdir/mysql/lib/mysql; fi - -# Create a MySQL user and group. Do not report any problems if it already -# exists. -groupadd -r $user 2> /dev/null || true -useradd -m -r -d $mysql_datadir -s /bin/bash -c "MySQL server" -g $user $user 2> /dev/null || true -# The user may already exist, make sure it has the proper group nevertheless (BUG#12823) -usermod -g $user $user 2> /dev/null || true - -# Change permissions so that the user that will run the MySQL daemon -# owns all database files. -chown -R $user:$user $installdir/mysql - -# Initiate databases if needed -if [ $installdir != "/usr/local/mariadb/columnstore" ]; then - sed -i -e s@/usr/local/mariadb/columnstore@$installdir@g /etc/my.cnf.d/columnstore.cnf -fi - -# InfiniDB testing hook... -test -x /usr/local/bin/idb-testing-mysql-pre-start && /usr/local/bin/idb-testing-mysql-pre-start $installdir/mysql - -# If DB exist, run upgrade script if it exist -if [ -d $installdir/mysql/db/calpontsys ]; then - - if [ -x $installdir/mysql/mysql-Columnstore ]; then - # Restart in the same way that mysqld will be started normally. - $installdir/mysql/mysql-Columnstore stop >/dev/null 2>&1 - sleep 2 - $installdir/mysql/mysql-Columnstore start --skip-grant-tables - - sleep 5 - - # Run MariaDB (mysql) upgrade script, if it exist - if [ -x $installdir/mysql/bin/mysql_upgrade ]; then - echo "Running mysql_upgrade script" - if [[ ${password} == " " ]]; then - $installdir/mysql/bin/mysql_upgrade > $tmpdir/mysql_upgrade.log - if [ $? -ne 0 ]; then - echo "ERROR: mysql_upgrade failure, check $tmpdir/mysql_upgrade.log" - $installdir/mysql/mysql-Columnstore stop - sleep 2 - exit 2; - fi - else - $installdir/mysql/bin/mysql_upgrade --password=$password > $tmpdir/mysql_upgrade.log - if [ $? -ne 0 ]; then - echo "ERROR: mysql_upgrade failure, check $tmpdir/mysql_upgrade.log" - $installdir/mysql/mysql-Columnstore stop - sleep 2 - exit 2; - fi - fi - fi - - # stop - $installdir/mysql/mysql-Columnstore stop - sleep 2 - fi -fi - ### Don't give the user the notes, we'll fix them ourselves... -$installdir/mysql/scripts/mysql_install_db --rpm --user=$user --basedir=$installdir/mysql >/dev/null -# Change permissions again to fix any new files. -chown -R $user:$user $mysql_datadir - -# Fix permissions for the permission database so that only the user -# can read them. -chmod -R og-rw $mysql_datadir/mysql - -# Change permissions again to fix any new files. -chown -R $user.$user $installdir/mysql - -if [ -f $installdir/lib/libcalmysql.so.1.0.0 ]; then - libcalmysql=$installdir/lib/libcalmysql.so.1.0.0 - libudfsdk=$installdir/lib/libudf_mysql.so.1.0.0 - libregrsdk=$installdir/lib/libregr_mysql.so.1.0.0 - is_columnstore_tables=$installdir/lib/is_columnstore_tables.so.1.0.0 - is_columnstore_columns=$installdir/lib/is_columnstore_columns.so.1.0.0 - is_columnstore_extents=$installdir/lib/is_columnstore_extents.so.1.0.0 - is_columnstore_files=$installdir/lib/is_columnstore_files.so.1.0.0 -elif [ -f $installdir/lib/libcalmysql.so.1 ]; then - libcalmysql=$installdir/lib/libcalmysql.so.1 - libudfsdk=$installdir/lib/libudf_mysql.so.1 - libregrsdk=$installdir/lib/libregr_mysql.so.1 - is_columnstore_tables=$installdir/lib/is_columnstore_tables.so.1 - is_columnstore_columns=$installdir/lib/is_columnstore_columns.so.1 - is_columnstore_extents=$installdir/lib/is_columnstore_extents.so.1 - is_columnstore_files=$installdir/lib/is_columnstore_files.so.1 -else - libcalmysql= -fi - -if [ -n "$libcalmysql" ]; then - - cd $installdir/mysql/lib/plugin - ln -sf $libcalmysql libcalmysql.so - ln -sf $libcalmysql libcalmysqlent.so - ln -sf $libudfsdk libudf_mysql.so - ln -sf $libregrsdk libregr_mysql.so - ln -sf $is_columnstore_tables is_columnstore_tables.so - ln -sf $is_columnstore_columns is_columnstore_columns.so - ln -sf $is_columnstore_extents is_columnstore_extents.so - ln -sf $is_columnstore_files is_columnstore_files.so -fi - -# cleanup previous install mysql replication files -rm -rf $mysql_datadir/*relay* -rm -rf $mysql_datadir/mysql-bin.* -rm -rf $mysql_datadir/master.info +mysql_install_db --rpm --user=$user >/dev/null exit 0 diff --git a/oam/install_scripts/pre-uninstall.in b/oam/install_scripts/pre-uninstall.in index 497e03fa9..4121921c5 100755 --- a/oam/install_scripts/pre-uninstall.in +++ b/oam/install_scripts/pre-uninstall.in @@ -38,7 +38,7 @@ $installdir/myql/columnstore-Mysql stop > /dev/null 2>&1 if [ $user != "root" ]; then export COLUMNSTORE_INSTALL_DIR=$installdir - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib:$installdir/mysql/lib + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib fi cloud=`$installdir/bin/getConfig Installation Cloud` @@ -72,8 +72,6 @@ if [ $user == "root" ]; then rm -f /var/log/mariadb/columnstore/*.log1 > /dev/null 2>&1 fi -rm -rf $installdir/mysql/db/columnstore_log_archive > /dev/null 2>&1\ - # delete Mariab Columnstore shared memory segments $installdir/bin/clearShm > /dev/null 2>&1 @@ -131,7 +129,7 @@ fi if [ $quiet != 1 ]; then #make copy of Columnstore.xml /bin/cp -f @ENGINE_SYSCONFDIR@/columnstore/Columnstore.xml @ENGINE_SYSCONFDIR@/columnstore/Columnstore.xml.rpmsave > /dev/null 2>&1 - /bin/cp -f $installdir/mysql/my.cnf $installdir/mysql/my.cnf.rpmsave > /dev/null 2>&1 + /bin/cp -f /etc/my.cnf.d/columnstore.cnf /etc/my.cnf.d/columnstore.cnf.rpmsave > /dev/null 2>&1 cp $installdir/bin/myCnf-include-args.text $installdir/bin/myCnf-include-args.text.rpmsave >& /dev/null rm -f @ENGINE_SYSCONFDIR@/columnstore/AlarmConfig.xml.installSave fi diff --git a/oam/install_scripts/rsync.sh b/oam/install_scripts/rsync.sh index 660057582..33c3e5d31 100755 --- a/oam/install_scripts/rsync.sh +++ b/oam/install_scripts/rsync.sh @@ -25,7 +25,8 @@ if { $PASSWORD == "ssh" } { set PASSWORD "" } -set COMMAND "rsync -vopgr -e ssh --exclude=mysql/ --exclude=test/ --exclude=infinidb_vtable/ --exclude=infinidb_querystats/ --exclude=calpontsys/ --include=*/ --include=*/* --exclude=* $INSTALLDIR/mysql/db/ $USERNAME@$SERVER:$INSTALLDIR/mysql/db/" +# LinuxJedi: Not sure what this is expecting to be copying, but it probably shouldn't be doing it +# set COMMAND "rsync -vopgr -e ssh --exclude=mysql/ --exclude=test/ --exclude=infinidb_vtable/ --exclude=infinidb_querystats/ --exclude=calpontsys/ --include=*/ --include=*/* --exclude=* $INSTALLDIR/mysql/db/ $USERNAME@$SERVER:$INSTALLDIR/mysql/db/" # # run command diff --git a/oam/install_scripts/slave-rep-columnstore.sh b/oam/install_scripts/slave-rep-columnstore.sh index 310c72b49..2f38c99b2 100644 --- a/oam/install_scripts/slave-rep-columnstore.sh +++ b/oam/install_scripts/slave-rep-columnstore.sh @@ -56,7 +56,7 @@ stop slave; EOD cat ${tmpdir}/idb_slave-rep.sql >>${tmpdir}/slave-rep-status.log -$installdir/mysql/bin/mysql \ +mysql \ --user=root \ calpontsys <${tmpdir}/idb_slave-rep.sql >>${tmpdir}/slave-rep-status.log 2>&1 @@ -78,7 +78,7 @@ CHANGE MASTER TO EOD cat ${tmpdir}/idb_slave-rep.sql >>${tmpdir}/slave-rep-status.log -$installdir/mysql/bin/mysql \ +mysql \ --user=root \ calpontsys <${tmpdir}/idb_slave-rep.sql >>${tmpdir}/slave-rep-status.log 2>&1 @@ -93,7 +93,7 @@ start slave; EOD cat ${tmpdir}/idb_slave-rep.sql >>${tmpdir}/slave-rep-status.log -$installdir/mysql/bin/mysql \ +mysql \ --user=root \ calpontsys <${tmpdir}/idb_slave-rep.sql >>${tmpdir}/slave-rep-status.log 2>&1 @@ -108,7 +108,7 @@ SHOW SLAVE STATUS\G EOD cat ${tmpdir}/idb_slave-rep.sql >>${tmpdir}/slave-rep-status.log -$installdir/mysql/bin/mysql \ +mysql \ --user=root \ calpontsys <${tmpdir}/idb_slave-rep.sql >>${tmpdir}/slave-rep-status.log 2>&1 diff --git a/oam/oamcpp/liboamcpp.cpp b/oam/oamcpp/liboamcpp.cpp index 5e3d6bfea..b9b9f4490 100644 --- a/oam/oamcpp/liboamcpp.cpp +++ b/oam/oamcpp/liboamcpp.cpp @@ -7859,47 +7859,25 @@ void Oam::actionMysqlCalpont(MYSQLCALPONT_ACTION action) if (action == MYSQL_START || action == MYSQL_RESTART) { //get pid - cmd = "cat " + InstallDir + "/mysql/db/*.pid > " + pidtmp; - system(cmd.c_str()); - ifstream oldFile(pidtmp.c_str()); + char buf[512]; + FILE *cmd_pipe = popen("pidof -s mysqld", "r"); - //fail if file size 0 - oldFile.seekg(0, std::ios::end); - int size = oldFile.tellg(); + fgets(buf, 512, cmd_pipe); + pid_t pid = strtoul(buf, NULL, 10); - if ( size == 0 ) + pclose( cmd_pipe ); + + if (!pid) { // mysql not started - writeLog("***mysql.pid FILE SIZE EQUALS ZERO", LOG_TYPE_ERROR); + writeLog("***mysqld NOT RUNNING", LOG_TYPE_ERROR); exceptionControl("actionMysqlCalpont", API_FAILURE); } - char line[400]; - string pid; - - while (oldFile.getline(line, 400)) - { - pid = line; - string::size_type pos = pid.find("cat", 0); - - if (pos != string::npos) - { - // mysql not started - writeLog("***mysql.pid FILE HAS CAT", LOG_TYPE_ERROR); - exceptionControl("actionMysqlCalpont", API_FAILURE); - } - - break; - } - - oldFile.close(); - - int PID = atoi(pid.c_str()); - //set process status try { - setProcessStatus("mysqld", moduleName, ACTIVE, PID); + setProcessStatus("mysqld", moduleName, ACTIVE, pid); } catch (...) {} @@ -7918,24 +7896,18 @@ void Oam::actionMysqlCalpont(MYSQLCALPONT_ACTION action) if ( state != ACTIVE ) { //get pid - cmd = "cat " + InstallDir + "/mysql/db/*.pid > " + pidtmp; - system(cmd.c_str()); - ifstream oldFile(pidtmp.c_str()); - char line[400]; - string pid; + char buf[512]; + FILE *cmd_pipe = popen("pidof -s mysqld", "r"); - while (oldFile.getline(line, 400)) - { - pid = line; - break; - } + fgets(buf, 512, cmd_pipe); + pid_t pid = strtoul(buf, NULL, 10); - oldFile.close(); + pclose( cmd_pipe ); //set process status try { - setProcessStatus("mysqld", moduleName, ACTIVE, atoi(pid.c_str())); + setProcessStatus("mysqld", moduleName, ACTIVE, pid); } catch (...) {} @@ -7945,26 +7917,20 @@ void Oam::actionMysqlCalpont(MYSQLCALPONT_ACTION action) else { //check if pid has changed - cmd = "cat " + InstallDir + "/mysql/db/*.pid > " + pidtmp; - system(cmd.c_str()); - ifstream oldFile(pidtmp.c_str()); - char line[400]; - string pid; + char buf[512]; + FILE *cmd_pipe = popen("pidof -s mysqld", "r"); - while (oldFile.getline(line, 400)) - { - pid = line; - break; - } + fgets(buf, 512, cmd_pipe); + pid_t pid = strtoul(buf, NULL, 10); - oldFile.close(); + pclose( cmd_pipe ); - if ( pidStatus != atoi(pid.c_str()) ) + if ( pidStatus != pid ) { //set process status try { - setProcessStatus("mysqld", moduleName, ACTIVE, atoi(pid.c_str())); + setProcessStatus("mysqld", moduleName, ACTIVE, pid); } catch (...) {} diff --git a/oam/oamcpp/liboamcpp.h b/oam/oamcpp/liboamcpp.h index 04276081d..61779decf 100644 --- a/oam/oamcpp/liboamcpp.h +++ b/oam/oamcpp/liboamcpp.h @@ -572,7 +572,6 @@ enum PROC_MGT_TYPE_REQUEST OAMPARENTCOLD, GETALARMDATA, GETACTIVEALARMDATA, - RUNUPGRADE, PROCUNMOUNT, PROCMOUNT, PROCFSTABUPDATE, diff --git a/oamapps/columnstoreSupport/approximateRowCount.sh b/oamapps/columnstoreSupport/approximateRowCount.sh index cbbe5ef71..250d90383 100755 --- a/oamapps/columnstoreSupport/approximateRowCount.sh +++ b/oamapps/columnstoreSupport/approximateRowCount.sh @@ -10,7 +10,7 @@ if [ -z "$MYSQLCMD" ]; then INSTALLDIR="/usr/local/mariadb/columnstore" - MYSQLCMD="$INSTALLDIR/mysql/bin/mysql -u root" + MYSQLCMD="mysql -u root" fi # diff --git a/oamapps/columnstoreSupport/columnstoreSupport.cpp b/oamapps/columnstoreSupport/columnstoreSupport.cpp index cea177681..1c57b375c 100644 --- a/oamapps/columnstoreSupport/columnstoreSupport.cpp +++ b/oamapps/columnstoreSupport/columnstoreSupport.cpp @@ -205,7 +205,7 @@ void reportThread(string reporttype) cmd = "mv -f " + tmpDir + "/" + localModule + "_logReport.tar.gz ."; system(cmd.c_str()); - cmd = "tar -zcf " + localModule + "_mysqllogReport.tar.gz " + installDir + "/mysql/db/*.err* 2>/dev/null"; + cmd = "tar -zcf " + localModule + "_mysqllogReport.tar.gz /var/log/mysql/*.err* 2>/dev/null"; system(cmd.c_str()); // run log config on local server @@ -873,7 +873,7 @@ int main(int argc, char* argv[]) { // check if mysql is supported and get info string logFile = tmpDir + "/idbmysql.log"; - string columnstoreMysql = installDir + "/mysql/bin/mysql -u root "; + string columnstoreMysql = "mysql -u root "; string cmd = columnstoreMysql + " -e 'status' > " + logFile + " 2>&1"; system(cmd.c_str()); @@ -947,7 +947,7 @@ int main(int argc, char* argv[]) if (!FAILED) { // check if mysql is supported and get info - string columnstoreMysql = installDir + "/mysql/bin/mysql -u root " + pwprompt; + string columnstoreMysql = "mysql -u root " + pwprompt; string cmd = columnstoreMysql + " -V > /dev/null 2>&1"; int ret = system(cmd.c_str()); diff --git a/oamapps/columnstoreSupport/findStranded.sh b/oamapps/columnstoreSupport/findStranded.sh index 12e160172..1d71d15e6 100755 --- a/oamapps/columnstoreSupport/findStranded.sh +++ b/oamapps/columnstoreSupport/findStranded.sh @@ -17,8 +17,8 @@ fi export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR if [ $COLUMNSTORE_INSTALL_DIR != "/usr/local/mariadb/columnstore" ]; then - export PATH=$COLUMNSTORE_INSTALL_DIR/bin:$COLUMNSTORE_INSTALL_DIR/mysql/bin:/bin:/usr/bin - export LD_LIBRARY_PATH=$COLUMNSTORE_INSTALL_DIR/lib:$COLUMNSTORE_INSTALL_DIR/mysql/lib + export PATH=$COLUMNSTORE_INSTALL_DIR/bin:/bin:/usr/bin + export LD_LIBRARY_PATH=$COLUMNSTORE_INSTALL_DIR/lib fi cd $COLUMNSTORE_INSTALL_DIR diff --git a/oamapps/columnstoreSupport/getMinMax.sh b/oamapps/columnstoreSupport/getMinMax.sh index a4d32421d..244966305 100755 --- a/oamapps/columnstoreSupport/getMinMax.sh +++ b/oamapps/columnstoreSupport/getMinMax.sh @@ -10,7 +10,7 @@ if [ -z "$MYSQLCMD" ]; then INSTALLDIR="/usr/local/mariadb/columnstore" - MYSQLCMD="$INSTALLDIR/mysql/bin/mysql -u root" + MYSQLCMD="mysql -u root" fi # diff --git a/oamapps/columnstoreSupport/minMaxCheck.sh b/oamapps/columnstoreSupport/minMaxCheck.sh index 9429452be..91ab741e3 100755 --- a/oamapps/columnstoreSupport/minMaxCheck.sh +++ b/oamapps/columnstoreSupport/minMaxCheck.sh @@ -45,7 +45,7 @@ # if [ -z "$MYSQLCMD" ]; then - MYSQLCMD="/usr/local/mariadb/columnstore/mysql/bin/mysql -u root" + MYSQLCMD="mysql -u root" fi if [ -z "$INSTALLDIR" ]; then diff --git a/oamapps/columnstoreSupport/sqlLogs.sh b/oamapps/columnstoreSupport/sqlLogs.sh index 3e654a37d..64dfe0640 100755 --- a/oamapps/columnstoreSupport/sqlLogs.sh +++ b/oamapps/columnstoreSupport/sqlLogs.sh @@ -13,13 +13,13 @@ fi export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR if [ $COLUMNSTORE_INSTALL_DIR != "/usr/local/mariadb/columnstore" ]; then - export PATH=$COLUMNSTORE_INSTALL_DIR/bin:$COLUMNSTORE_INSTALL_DIR/mysql/bin:/bin:/usr/bin - export LD_LIBRARY_PATH=$COLUMNSTORE_INSTALL_DIR/lib:$COLUMNSTORE_INSTALL_DIR/mysql/lib + export PATH=$COLUMNSTORE_INSTALL_DIR/bin:/bin:/usr/bin + export LD_LIBRARY_PATH=$COLUMNSTORE_INSTALL_DIR/lib fi if [ -z "$MYSQLCMD" ]; then - MYSQLCMD="$COLUMNSTORE_INSTALL_DIR/mysql/bin/mysql -u root" + MYSQLCMD="mysql -u root" export MYSQLCMD fi diff --git a/oamapps/postConfigure/amazonInstaller.cpp b/oamapps/postConfigure/amazonInstaller.cpp index 22560fc78..2b1ff66b2 100644 --- a/oamapps/postConfigure/amazonInstaller.cpp +++ b/oamapps/postConfigure/amazonInstaller.cpp @@ -2095,12 +2095,6 @@ int main(int argc, char* argv[]) cmd = "mkdir -p " + installDir + "/data1/mysqldb > /dev/null 2>&1"; system(cmd.c_str()); - - cmd = "mkdir -p " + installDir + "/mysql > /dev/null 2>&1"; - system(cmd.c_str()); - - cmd = "cd " + installDir + "/mysql/;ln -s " + installDir + "/data1/mysqldb db > /dev/null 2>&1"; - system(cmd.c_str()); } //install rpms diff --git a/oamapps/postConfigure/helpers.cpp b/oamapps/postConfigure/helpers.cpp index 476476449..fa612966a 100644 --- a/oamapps/postConfigure/helpers.cpp +++ b/oamapps/postConfigure/helpers.cpp @@ -311,101 +311,6 @@ void mysqlSetup() return; } -/****************************************************************************************** -* @brief sendUpgradeRequest -* -* purpose: send Upgrade Request Msg to all ACTIVE UMs -* -* -******************************************************************************************/ -int sendUpgradeRequest(int IserverTypeInstall, bool pmwithum) -{ - Oam oam; - - while (true) - { - try - { - ProcessStatus procstat; - oam.getProcessStatus("WriteEngineServer", "pm1", procstat); - - if ( procstat.ProcessOpState == oam::ACTIVE) - break; - } - catch (const std::exception& exc) - { - std::cerr << exc.what() << std::endl; - } - } - - SystemModuleTypeConfig systemmoduletypeconfig; - - try - { - oam.getSystemConfig(systemmoduletypeconfig); - } - catch (const std::exception& exc) - { - std::cerr << exc.what() << std::endl; - } - - messageqcpp::ByteStream msg; - messageqcpp::ByteStream::byte requestID = RUNUPGRADE; - - msg << requestID; - - int returnStatus = oam::API_SUCCESS; - - for ( unsigned int i = 0; i < systemmoduletypeconfig.moduletypeconfig.size(); i++) - { - int moduleCount = systemmoduletypeconfig.moduletypeconfig[i].ModuleCount; - - if ( moduleCount == 0) - continue; - - string moduleType = systemmoduletypeconfig.moduletypeconfig[i].ModuleType; - - if ( moduleType == "um" || - ( moduleType == "pm" && IserverTypeInstall == oam::INSTALL_COMBINE_DM_UM_PM ) || - ( moduleType == "pm" && pmwithum ) ) - { - - DeviceNetworkList::iterator pt = systemmoduletypeconfig.moduletypeconfig[i].ModuleNetworkList.begin(); - - for ( ; pt != systemmoduletypeconfig.moduletypeconfig[i].ModuleNetworkList.end(); pt++) - { - int opState = oam::ACTIVE; - bool degraded; - - try - { - oam.getModuleStatus((*pt).DeviceName, opState, degraded); - - if (opState == oam::ACTIVE || - opState == oam::DEGRADED) - { - returnStatus = sendMsgProcMon( (*pt).DeviceName, msg, requestID, 30 ); - - if ( returnStatus != API_SUCCESS) - { - string tmpDir = startup::StartUp::tmpDir(); - - cout << "ERROR: Error return in running the MariaDB Columnstore Upgrade, check " + tmpDir + "/mysql_upgrade.log on " << (*pt).DeviceName << endl; - return returnStatus; - } - } - } - catch (const std::exception& exc) - { - std::cerr << exc.what() << std::endl; - } - } - } - } - - return returnStatus; -} - /****************************************************************************************** * @brief sendReplicationRequest * diff --git a/oamapps/postConfigure/helpers.h b/oamapps/postConfigure/helpers.h index ff5c6f82e..d81893432 100644 --- a/oamapps/postConfigure/helpers.h +++ b/oamapps/postConfigure/helpers.h @@ -38,7 +38,6 @@ extern bool waitForActive(); extern void dbrmDirCheck(); extern void mysqlSetup(); extern int sendMsgProcMon( std::string module, messageqcpp::ByteStream msg, int requestID, int timeout ); -extern int sendUpgradeRequest(int IserverTypeInstall, bool pmwithum = false); extern int sendReplicationRequest(int IserverTypeInstall, std::string password, bool pmwithum); extern void checkFilesPerPartion(int DBRootCount, Config* sysConfig); extern void checkMysqlPort( string& mysqlPort, Config* sysConfig); diff --git a/oamapps/postConfigure/installer.cpp b/oamapps/postConfigure/installer.cpp index bff95a3b5..a22beb221 100644 --- a/oamapps/postConfigure/installer.cpp +++ b/oamapps/postConfigure/installer.cpp @@ -995,19 +995,6 @@ int main(int argc, char* argv[]) { if ( oam.checkLogStatus(logFile, "System catalog appears to exist") ) { -/* cout << endl << "Run MariaDB Server Upgrade.. "; - cout.flush(); - - //send message to procmon's to run upgrade script - int status = sendUpgradeRequest(IserverTypeInstall); - - if ( status != 0 ) { - cout << endl << "MariaDB Columnstore Install Failed" << endl << endl; - exit(1); - } - else - cout << " DONE" << endl; -*/ cout.flush(); } else diff --git a/oamapps/postConfigure/postConfigure.cpp b/oamapps/postConfigure/postConfigure.cpp index d1f5e3686..cdfa5d392 100644 --- a/oamapps/postConfigure/postConfigure.cpp +++ b/oamapps/postConfigure/postConfigure.cpp @@ -2961,15 +2961,6 @@ int main(int argc, char* argv[]) cout << "ERROR: Failed trying to update MariaDB ColumnStore System Configuration file" << endl; exit(1); } - - string pathID = installDir + "/mysql/db"; - - // check volume for attach and try to attach if not - if ( !attachVolume(newModuleHostName, volumeName, deviceName, pathID) ) - { - cout << "attachVolume error" << endl; - exit(1); - } } } @@ -3866,19 +3857,6 @@ int main(int argc, char* argv[]) { if ( oam.checkLogStatus(dbbuilderLog, "System catalog appears to exist") ) { -/* cout << endl << "Run MariaDB Server Upgrade.. "; - cout.flush(); - - //send message to procmon's to run upgrade script - int status = sendUpgradeRequest(IserverTypeInstall, pmwithum); - - if ( status != 0 ) { - cout << endl << "MariaDB Columnstore Install Failed" << endl << endl; - exit(1); - } - else - cout << " DONE" << endl; -*/ cout.flush(); } else diff --git a/oamapps/postConfigure/quick_installer_amazon.sh b/oamapps/postConfigure/quick_installer_amazon.sh index 67f0f2ce1..274a7578d 100755 --- a/oamapps/postConfigure/quick_installer_amazon.sh +++ b/oamapps/postConfigure/quick_installer_amazon.sh @@ -73,7 +73,7 @@ else $HOME/mariadb/columnstore/bin/post-install --installdir=$HOME/mariadb/columnstore export COLUMNSTORE_INSTALL_DIR=$HOME/mariadb/columnstore - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/mariadb/columnstore/lib:$HOME/mariadb/columnstore/mysql/lib + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/mariadb/columnstore/lib echo "${bold}Run postConfigure script${normal}" echo "" diff --git a/oamapps/postConfigure/quick_installer_multi_server.sh b/oamapps/postConfigure/quick_installer_multi_server.sh index d47bdaacd..6e8a8af82 100755 --- a/oamapps/postConfigure/quick_installer_multi_server.sh +++ b/oamapps/postConfigure/quick_installer_multi_server.sh @@ -79,7 +79,7 @@ else $HOME/mariadb/columnstore/bin/post-install --installdir=$HOME/mariadb/columnstore export COLUMNSTORE_INSTALL_DIR=$HOME/mariadb/columnstore - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/mariadb/columnstore/lib:$HOME/mariadb/columnstore/mysql/lib + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/mariadb/columnstore/lib echo "${bold}Run postConfigure script${normal}" echo "" diff --git a/oamapps/postConfigure/quick_installer_single_server.sh b/oamapps/postConfigure/quick_installer_single_server.sh index 51db8a1ba..617595de6 100755 --- a/oamapps/postConfigure/quick_installer_single_server.sh +++ b/oamapps/postConfigure/quick_installer_single_server.sh @@ -32,7 +32,7 @@ else $HOME/mariadb/columnstore/bin/post-install --installdir=$HOME/mariadb/columnstore export COLUMNSTORE_INSTALL_DIR=$HOME/mariadb/columnstore - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/mariadb/columnstore/lib:$HOME/mariadb/columnstore/mysql/lib + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/mariadb/columnstore/lib echo "Run postConfigure script" echo "" diff --git a/procmgr/processmanager.cpp b/procmgr/processmanager.cpp index 439b0405d..153dad992 100644 --- a/procmgr/processmanager.cpp +++ b/procmgr/processmanager.cpp @@ -10467,134 +10467,6 @@ int ProcessManager::setEnableState(std::string target, std::string state) } - -/****************************************************************************************** -* @brief sendUpgradeRequest -* -* purpose: send Upgrade Request Msg to all ACTIVE UMs -* -* -******************************************************************************************/ -void sendUpgradeRequest() -{ - ProcessLog log; - Configuration config; - ProcessManager processManager(config, log); - Oam oam; - bool exitThread = false; - int exitThreadStatus = oam::API_SUCCESS; - - pthread_t ThreadId; - ThreadId = pthread_self(); - - // wait until DMLProc is ACTIVE - while (true) - { - try - { - ProcessStatus procstat; - oam.getProcessStatus("WriteEngineServer", config.moduleName(), procstat); - - if ( procstat.ProcessOpState == oam::ACTIVE) - break; - } - catch (exception& ex) - { -// string error = ex.what(); -// log.writeLog(__LINE__, "EXCEPTION ERROR on getProcessStatus: " + error, LOG_TYPE_ERROR); - } - catch (...) - { -// log.writeLog(__LINE__, "EXCEPTION ERROR on getProcessStatus: Caught unknown exception!", LOG_TYPE_ERROR); - } - } - - SystemModuleTypeConfig systemmoduletypeconfig; - - try - { - oam.getSystemConfig(systemmoduletypeconfig); - } - catch (exception& ex) - { - string error = ex.what(); - log.writeLog(__LINE__, "EXCEPTION ERROR on getSystemConfig: " + error, LOG_TYPE_ERROR); - exitThread = true; - exitThreadStatus = oam::API_FAILURE; - } - catch (...) - { - log.writeLog(__LINE__, "EXCEPTION ERROR on getSystemConfig: Caught unknown exception!", LOG_TYPE_ERROR); - exitThread = true; - exitThreadStatus = oam::API_FAILURE; - } - - if ( exitThread ) - { - pthread_detach (ThreadId); - pthread_exit(reinterpret_cast(static_cast(exitThreadStatus))); - } - - ByteStream msg; - ByteStream::byte requestID = RUNUPGRADE; - - msg << requestID; - msg << " "; // pass a blank dummy password - - int returnStatus = oam::API_SUCCESS; - - for ( unsigned int i = 0; i < systemmoduletypeconfig.moduletypeconfig.size(); i++) - { - int moduleCount = systemmoduletypeconfig.moduletypeconfig[i].ModuleCount; - - if ( moduleCount == 0) - continue; - - string moduleType = systemmoduletypeconfig.moduletypeconfig[i].ModuleType; - - if ( moduleType == "um" || - ( moduleType == "pm" && config.ServerInstallType() == oam::INSTALL_COMBINE_DM_UM_PM ) ) - { - - DeviceNetworkList::iterator pt = systemmoduletypeconfig.moduletypeconfig[i].ModuleNetworkList.begin(); - - for ( ; pt != systemmoduletypeconfig.moduletypeconfig[i].ModuleNetworkList.end(); pt++) - { - int opState = oam::ACTIVE; - bool degraded; - - try - { - oam.getModuleStatus((*pt).DeviceName, opState, degraded); - - if (opState == oam::ACTIVE || - opState == oam::DEGRADED) - { - returnStatus = processManager.sendMsgProcMon( (*pt).DeviceName, msg, requestID, 30 ); - - upgradethreadStatus = returnStatus; - - if ( returnStatus != API_SUCCESS) - break; - } - } - catch (exception& ex) - { -// string error = ex.what(); -// log.writeLog(__LINE__, "EXCEPTION ERROR on getModuleStatus on module " + (*pt).DeviceName + ": " + error, LOG_TYPE_ERROR); - } - catch (...) - { -// log.writeLog(__LINE__, "EXCEPTION ERROR on getModuleStatus on module " + (*pt).DeviceName + ": Caught unknown exception!", LOG_TYPE_ERROR); - } - } - } - } - - pthread_detach (ThreadId); - pthread_exit(0); -} - /****************************************************************************************** * @brief stopProcessTypes * diff --git a/procmgr/processmanager.h b/procmgr/processmanager.h index bb0766881..0663c3e4b 100644 --- a/procmgr/processmanager.h +++ b/procmgr/processmanager.h @@ -81,8 +81,6 @@ void startModuleThread(std::string moduleName); void stopModuleThread(std::string moduleName); void processMSG(messageqcpp::IOSocket* fIos); -void sendUpgradeRequest(); - /** @brief Timeset for Milleseconds */ #define TS_MS(x) ((x) * 1000000) diff --git a/procmon/processmonitor.cpp b/procmon/processmonitor.cpp index 0863d6f92..3f2a10e58 100644 --- a/procmon/processmonitor.cpp +++ b/procmon/processmonitor.cpp @@ -1697,23 +1697,6 @@ void ProcessMonitor::processMessage(messageqcpp::ByteStream msg, messageqcpp::IO break; } - case RUNUPGRADE: - { - log.writeLog(__LINE__, "MSG RECEIVED: Run upgrade script "); - - // run upgrade script - int ret = runUpgrade(); - - ackMsg << (ByteStream::byte) ACK; - ackMsg << (ByteStream::byte) RUNUPGRADE; - ackMsg << (ByteStream::byte) ret; - mq.write(ackMsg); - - log.writeLog(__LINE__, "RUNUPGRADE: ACK back to ProcMgr return status = " + oam.itoa((int) ret)); - - break; - } - case PROCUNMOUNT: { string dbrootID; @@ -5916,86 +5899,6 @@ bool ProcessMonitor::amazonVolumeCheck(int dbrootID) MonitorLog log; Oam oam; - if ( config.moduleType() == "um") - { - log.writeLog(__LINE__, "amazonVolumeCheck function called for User Module", LOG_TYPE_DEBUG); - - string volumeNameID = "UMVolumeName" + oam.itoa(config.moduleID()); - string volumeName = oam::UnassignedName; - string deviceNameID = "UMVolumeDeviceName" + oam.itoa(config.moduleID()); - string deviceName = oam::UnassignedName; - - try - { - oam.getSystemConfig( volumeNameID, volumeName); - oam.getSystemConfig( deviceNameID, deviceName); - } - catch (...) - {} - - if ( volumeName.empty() || volumeName == oam::UnassignedName ) - { - log.writeLog(__LINE__, "amazonVolumeCheck function exiting, no volume assigned ", LOG_TYPE_WARNING); - return false; - } - - string status = oam.getEC2VolumeStatus(volumeName); - - if ( status == "attached" ) - { - string cmd; - string mountLog = tmpLogDir + "/um_mount.log"; - cmd = SUDO + "mount " + deviceName + " " + startup::StartUp::installDir() + "/mysql/db -t ext2 -o noatime,nodiratime,user > " + mountLog; - - system(cmd.c_str()); - log.writeLog(__LINE__, "mount cmd: " + cmd, LOG_TYPE_DEBUG); - - cmd = SUDO + "chown -R " + USER + ":" + USER + " " + startup::StartUp::installDir() + "/mysql/db"; - system(cmd.c_str()); - - log.writeLog(__LINE__, "amazonVolumeCheck function successfully completed, volume attached: " + volumeName, LOG_TYPE_DEBUG); - return true; - } - - if ( status != "available" ) - { - log.writeLog(__LINE__, "amazonVolumeCheck function failed, volume not attached and not available: " + volumeName, LOG_TYPE_WARNING); - return false; - } - else - { - //get Module HostName / InstanceName - string instanceName; - - try - { - ModuleConfig moduleconfig; - oam.getSystemConfig(config.moduleName(), moduleconfig); - HostConfigList::iterator pt1 = moduleconfig.hostConfigList.begin(); - instanceName = (*pt1).HostName; - } - catch (...) - {} - - if (oam.attachEC2Volume(volumeName, deviceName, instanceName)) - { - string cmd = SUDO + "mount " + deviceName + " " + startup::StartUp::installDir() + "/mysql/db -t ext2 -o noatime,nodiratime,user > /dev/null 2>&1"; - system(cmd.c_str()); - log.writeLog(__LINE__, "mount cmd: " + cmd, LOG_TYPE_DEBUG); - - cmd = SUDO + "chown -R " + USER + ":" + USER + " " + startup::StartUp::installDir() + "/mysql/db"; - system(cmd.c_str()); - - return true; - } - else - { - log.writeLog(__LINE__, "amazonVolumeCheck function failed, volume failed to attached: " + volumeName, LOG_TYPE_WARNING); - return false; - } - } - } - else { log.writeLog(__LINE__, "amazonVolumeCheck function called for DBRoot" + oam.itoa(dbrootID), LOG_TYPE_DEBUG); @@ -6615,56 +6518,6 @@ int ProcessMonitor::glusterUnassign(std::string dbrootID) return oam::API_SUCCESS; } -/****************************************************************************************** -* @brief runUpgrade -* -* purpose: run upgrade script -* -******************************************************************************************/ -int ProcessMonitor::runUpgrade() -{ - Oam oam; - - string tmpLog = tmpLogDir + "/mysql_upgrade.log"; - - string mysqlpw = oam.getMySQLPassword(); - - string passwordOption = ""; - if ( mysqlpw != oam::UnassignedName ) - passwordOption = " --password=" + mysqlpw; - - for ( int i = 0 ; i < 10 ; i++ ) - { - //run upgrade script - string cmd = startup::StartUp::installDir() + "/mysql/bin/mysql_upgrade " + - passwordOption + " > " + tmpLog + " 2>&1"; - - log.writeLog(__LINE__, "runUpgrade, cmd = " + cmd, LOG_TYPE_DEBUG); - int retCode = system(cmd.c_str()); - if ( retCode == 0 ) { - log.writeLog(__LINE__, "mysql_upgrade.sh: Successful return", LOG_TYPE_DEBUG); - return oam::API_SUCCESS; - } - else { - if (oam.checkLogStatus(cmd, "ERROR 1045") ) { - log.writeLog(__LINE__, "mysql_upgrade.sh: Missing Password error, return success", LOG_TYPE_DEBUG); - return oam::API_SUCCESS; - } - - log.writeLog(__LINE__, "mysql_upgrade.sh: Error return, check log " + tmpLog, LOG_TYPE_ERROR); - //restart mysqld and retry - try { - oam.actionMysqlCalpont(MYSQL_RESTART); - } - catch(...) - {} - sleep(1); - } - } - return oam::API_FAILURE; -} - - } //end of namespace // vim:ts=4 sw=4: diff --git a/tools/configMgt/buildTester.sh b/tools/configMgt/buildTester.sh deleted file mode 100755 index 5af5bf432..000000000 --- a/tools/configMgt/buildTester.sh +++ /dev/null @@ -1,475 +0,0 @@ -#!/usr/bin/expect -# -# $Id: buildTester.sh 421 2007-04-05 15:46:55Z dhill $ -# -# Build, install, and test Calpont Builds -# -set EMAIL " " -set USERNAME root -set PASSWORD Calpont1 -set BUILD " " -set SVN genii -set RELEASE " " -set SYSTEM noSystem -set USER " " -set DEBUG "-k" -set TEST(0) " " -set SERVER srvswdev11 - -#set SHARED "//cal6500/shared" -set SHARED "//calweb/shared" - -spawn -noecho /bin/bash - -for {set i 0} {$i<[llength $argv]} {incr i} { - set arg($i) [lindex $argv $i] -} - -set i 0 -while true { - if { $i == [llength $argv] } { break } - if { $arg($i) == "-h" } { - send_user "\n" - send_user "'buildTester' executes a set of DVM test on a specifed system and\n" - send_user "send the results via email or outputs results to a log file.\n" - send_user "It has the option of installing a released\n" - send_user "build or generating a new build when release of 'Latest' is specified\n" - send_user "and installing that build on the specified system.\n" - send_user "\n" - send_user "Usage: buildTester -b 'build-type' -r 'release' -v 'svn-branch' -s 'system' -sv 'server' -u 'database-user' -p 'password' -d -e -t 'test-names'\n" - send_user " build-type - optional: RHEL5 or FC6\n" - send_user " release - Required when build-type is entered: Calpont release number or 'Latest'\n" - send_user " svn-branch - SVN Branch built againest, default to genii\n" - send_user " system - Target install/test system\n" - send_user " server - Target query server hostname\n" - send_user " database-user - Database User, i.e. tpch1\n" - send_user " password - system password, default to 'qcalpont!'\n" - send_user " -d - Debug mode, will output additional install and test data\n" - send_user " -e - email results\n" - send_user " test-names - Test name list seperated by spaces (sanity tpch)\n" - exit - } - if { $arg($i) == "-b" } { - incr i - set BUILD $arg($i) - } elseif { $arg($i) == "-r" } { - incr i - set RELEASE $arg($i) - } elseif { $arg($i) == "-s" } { - incr i - set SYSTEM $arg($i) - } elseif { $arg($i) == "-v" } { - incr i - set SVN $arg($i) - } elseif { $arg($i) == "-u" } { - incr i - set USER $arg($i) - } elseif { $arg($i) == "-p" } { - incr i - set PASSWORD $arg($i) - } elseif { $arg($i) == "-t" } { - incr i - if { $i == [llength $argv] } { - puts "no Test Name entered, enter ./buildTester.sh -h for additional info"; exit -1 - } - set TESTNUMBER 0 - while true { - set TEST($TESTNUMBER) $arg($i) - incr i - incr TESTNUMBER - if { $i == [llength $argv] } { - incr i -1 - break - } - } - } elseif { $arg($i) == "-e" } { - if { $SYSTEM == "qaftest2" } { - set EMAIL dhill@calpont.com,wweeks@calpont.com,dcathey@calpont.com,bpaul@calpont.com - } elseif { $SYSTEM == "qaftest2" } { - set EMAIL dhill@calpont.com,wweeks@calpont.com,dcathey@calpont.com,bpaul@calpont.com - } elseif { $SYSTEM == "caldev02" } { - set EMAIL dhill@calpont.com,wweeks@calpont.com,pleblanc@calpont.com,chao@calpont.com,xlou@calpont.com,dcathey@calpont.com - } elseif { $SYSTEM == "srvswdev11" } { - set EMAIL dhill@calpont.com,wweeks@calpont.com,pleblanc@calpont.com,chao@calpont.com,xlou@calpont.com,dcathey@calpont.com - } elseif { $SYSTEM == "devint2" } { - set EMAIL dhill@calpont.com,wweeks@calpont.com,pleblanc@calpont.com - } elseif { $SYSTEM == "devint3" } { - set EMAIL dhill@calpont.com,wweeks@calpont.com,pleblanc@calpont.com - } elseif { $SYSTEM == "ss2" } { - set EMAIL dhill@calpont.com,wweeks@calpont.com,pleblanc@calpont.com,chao@calpont.com,dcathey@calpont.com - } elseif { $SYSTEM == "ss2ImportSSB100" } { - set EMAIL dhill@calpont.com,wweeks@calpont.com,dcathey@calpont.com,pleblanc@calpont.com - } elseif { $SYSTEM == "demo01" } { - set EMAIL dhill@calpont.com,wweeks@calpont.com,pleblanc@calpont.com,chao@calpont.com - } elseif { $SYSTEM == "qperfd01" } { - set EMAIL dhill@calpont.com,wweeks@calpont.com,bpaul@calpont.com,dcathey@calpont.com,pleblanc@calpont.com - } elseif { $SYSTEM == "qperfd01" } { - set EMAIL dhill@calpont.com,wweeks@calpont.com,bpaul@calpont.com,dcathey@calpont.com - } elseif { $SYSTEM == "qcald02a" } { - set EMAIL dhill@calpont.com,wweeks@calpont.com,mroberts@calpont.com - } else { - set EMAIL dhill@calpont.com,wweeks@calpont.com - } - } elseif { $arg($i) == "-d" } { - set DEBUG " " - } elseif { $arg($i) == "-sv" } { - incr i - set SERVER $arg($i) - } - incr i -} - -if { $SYSTEM == "noSystem" } { - set SYSTEM $BUILD -} - -#cleanup -set RUN_LOG_FILE /tmp/$SYSTEM-$SVN.log -exec rm -f /tmp/test.log $RUN_LOG_FILE -# open log file -log_file $RUN_LOG_FILE - -#get current date -exec date >/tmp/datesync.tmp -exec cat /tmp/datesync.tmp -set newtime [exec cat /tmp/datesync.tmp] -# -send_user "\n\n#####################################################################################################\n" -send_user " Automated Build Tester Report $newtime\n" -send_user " BUILD=$BUILD RELEASE=$RELEASE SVN-BRANCH=$SVN SYSTEM=$SYSTEM\n" -send_user "\n#####################################################################################################\n\n" -# build request -log_user 1 -set timeout 30 -if { $BUILD != " " } { - set timeout 6060 - - send_user "******************* Generate Build $BUILD / $RELEASE ****************************\n\n" - - log_user 0 - send "./autoBuilder -o $BUILD -r $RELEASE -s $SVN\n" - log_user 1 - expect { - -re "Calpont RPM Build successfully completed" { } abort - -re "Build Failed" { send_user "\nBuild Failed\n" ; puts [exec mail -s "$SYSTEM/$SVN Automated Build Tester Results" $EMAIL < $RUN_LOG_FILE] ; exit -1 } - } - #get current date - exec date >/tmp/datesync.tmp - exec cat /tmp/datesync.tmp - set newtime [exec cat /tmp/datesync.tmp] - - send_user "\nBuild successfully completed $newtime\n\n" -} -set timeout 30 -#expect -re "#" -if { $DEBUG == " " } { - log_user 1 -} else { - log_user 0 -} -if { $SYSTEM != $BUILD } { - set timeout 1500 - if { $RELEASE != " " } { - # install request - send_user "\n\n******************* Install Build $RELEASE on $SYSTEM *******************************\n\n" - send "./autoInstaller -s $SYSTEM -r $RELEASE -n -d\n" - expect { - -re "Install Successfully completed" { send_user "\nInstall successfully completed\n\n" } abort - -re "Installation Failed" { send_user "\nInstallation Failed\n\n" - puts [exec mail -s "$SYSTEM/$SVN Automated Build Tester Results" $EMAIL < $RUN_LOG_FILE] ; exit -1 } - timeout { send_user "\nInstallation Failed - Timeout error\n\n" - puts [exec mail -s "$SYSTEM/$SVN Automated Build Tester Results" $EMAIL < $RUN_LOG_FILE] ; exit -1 } - - } - } -} -#get install RPM info -#log_user 1 -#send_user "\n\n******************* Calpont RPM Install Information *******************************\n\n" -#exec ./remote_command_test.sh $SERVER $PASSWORD "rpm -iq calpont | grep Version -A 2" " " "No such file" 60 1 -#exec ./remote_command.sh $SERVER $PASSWORD 'rpm -iq calpont' tools not 30 1 -#expect { -# -re " " { abort } -# -re "FAILED" { -# puts "\nCalpont RPM not installed\n"; -# exec echo "Test Failed, Calpont RPM not installed" >> $RUN_LOG_FILE -# puts [exec mail -s "$SYSTEM/$SVN Automated Build Tester Results" $EMAIL < $RUN_LOG_FILE] ; exit -1 -# } -#} -set timeout 30 - -if { $TEST(0) != " " } { - set timeout 600 - set t 0 - while true { - if { $t == $TESTNUMBER } { - break - } - set TESTCASE $TEST($t) - incr t - - #get current date - exec date >/tmp/datesync.tmp - exec cat /tmp/datesync.tmp - set newtime [exec cat /tmp/datesync.tmp] - - log_user 1 - send_user "\n\n******************* Run Test $TESTCASE start at $newtime **********************************\n\n" - #log_user 0 - - set TESTTYPE [exec expr substr $TESTCASE 1 5] - if { $TESTTYPE == "mysql" } { - set TESTCOMMAND [exec expr substr $TESTCASE 7 80] - } else { - # Oracle test case - set TESTCOMMAND [exec expr substr $TESTCASE 8 80] - } - - if { $TESTTYPE == "oracl" } { - if { [catch { open "/usr/local/lib/python2.4/site-packages/dvm_app/$USER\_$SYSTEM\_brefd01.cfg" "r"} handle ] } { - exec echo "\nTest Failed, DVM config file $USER\_$SYSTEM\_brefd01.cfg not found\n"; - exec echo "Test Failed, DVM config file $USER\_$SYSTEM\_brefd01.cfg not found" >> $RUN_LOG_FILE - puts [exec mail -s "$SYSTEM/$SVN Automated Build Tester Results" $EMAIL < $RUN_LOG_FILE] ; exit -1 - } - - if { $TESTCOMMAND == "tpch" } { - exec su - oracle -c "python /usr/local/lib/python2.4/site-packages/dvm_app/dvm.py -c /usr/local/lib/python2.4/site-packages/dvm_app/$USER\\_$SYSTEM\_brefd01.cfg -e1 -sS -rB $DEBUG -l2 -t Perf_Tpch > /tmp/test.log " - expect { - -re "Traceback" { - exec echo "\nTest Failed, Database instance is down\n"; - exec echo "Test Failed, Database instance is down" >> $RUN_LOG_FILE - puts [exec mail -s "$SYSTEM/$SVN Automated Build Tester Results" $EMAIL < $RUN_LOG_FILE] ; exit -1 } - -re "$" { if { [catch { open "/tmp/test.log" "r"} handle ] } { - exec echo "\nTest Failed, /tmp/test.log not found\n"; - exec echo "Test Failed, /tmp/test.log not found" >> $RUN_LOG_FILE - puts [exec mail -s "$SYSTEM/$SVN Automated Build Tester Results" $EMAIL < $RUN_LOG_FILE] ; exit -1 } - } - } - exec cat /tmp/test.log >> $RUN_LOG_FILE - } else { - if { $TESTCOMMAND == "dml" } { - exec su - oracle -c "python /usr/local/lib/python2.4/site-packages/dvm_app/dvm.py -c /usr/local/lib/python2.4/site-packages/dvm_app/$USER\\_$SYSTEM\_brefd01.cfg -sS -rB -l2 -t Iter16_TableNameLengths $DEBUG > /tmp/test.log " - expect { - -re "Traceback" { - exec echo "\nTest Failed, Database instance is down\n"; - exec echo "Test Failed, Database instance is down" >> $RUN_LOG_FILE - puts [exec mail -s "$SYSTEM/$SVN Automated Build Tester Results" $EMAIL < $RUN_LOG_FILE] ; exit -1 } - -re "$" { if { [catch { open "/tmp/test.log" "r"} handle ] } { - exec echo "\nTest Failed, /tmp/test.log not found\n"; - exec echo "Test Failed, /tmp/test.log not found" >> $RUN_LOG_FILE - puts [exec mail -s "$SYSTEM/$SVN Automated Build Tester Results" $EMAIL < $RUN_LOG_FILE] ; exit -1 } - } - } - exec cat /tmp/test.log >> $RUN_LOG_FILE - - exec su - oracle -c "python /usr/local/lib/python2.4/site-packages/dvm_app/dvm.py -c /usr/local/lib/python2.4/site-packages/dvm_app/$USER\\_$SYSTEM\_brefd01.cfg -sS -rB -l2 -t Iter16_Datatypes_Ext $DEBUG > /tmp/test.log " - expect { - -re "Traceback" { - exec echo "\nTest Failed, Database instance is down\n"; - exec echo "Test Failed, Database instance is down" >> $RUN_LOG_FILE - puts [exec mail -s "$SYSTEM/$SVN Automated Build Tester Results" $EMAIL < $RUN_LOG_FILE] ; exit -1 } - -re "$" { if { [catch { open "/tmp/test.log" "r"} handle ] } { - exec echo "\nTest Failed, /tmp/test.log not found\n"; - exec echo "Test Failed, /tmp/test.log not found" >> $RUN_LOG_FILE - puts [exec mail -s "$SYSTEM/$SVN Automated Build Tester Results" $EMAIL < $RUN_LOG_FILE] ; exit -1 } - } - } - exec cat /tmp/test.log >> $RUN_LOG_FILE - } else { - # default to a test-command of a file name - exec su - oracle -c "python /usr/local/lib/python2.4/site-packages/dvm_app/dvm.py -c /usr/local/lib/python2.4/site-packages/dvm_app/$USER\\_$SYSTEM\_brefd01.cfg -e2 -sS -rT $DEBUG -t /home/qa/bldqry/$TESTCOMMAND.txt -q /home/qa/bldqry > /tmp/test.log " - expect { - -re "Traceback" { - exec echo "\nTest Failed, Database instance is down\n"; - exec echo "Test Failed, Database instance is down" >> $RUN_LOG_FILE - puts [exec mail -s "$SYSTEM/$SVN Automated Build Tester Results" $EMAIL < $RUN_LOG_FILE] ; exit -1 } - -re "$" { if { [catch { open "/tmp/test.log" "r"} handle ] } { - exec echo "\nTest Failed, /tmp/test.log not found\n"; - exec echo "Test Failed, /tmp/test.log not found" >> $RUN_LOG_FILE - puts [exec mail -s "$SYSTEM/$SVN Automated Build Tester Results" $EMAIL < $RUN_LOG_FILE] ; exit -1 } - } - } - exec cat /tmp/test.log >> $RUN_LOG_FILE - } - } - } else { # run mysql test commands - if { $TESTTYPE == "mysql" } { - if { $TESTCOMMAND == "query" } { - set timeout 72000 - log_user 1 - exec ./remote_command_test.sh $SERVER $PASSWORD "./nightly/runQueryTestAll $SVN" "runQueryTestAll completed" "No such file" $timeout - expect { - -re "FAILED" { exec echo "\nFailed to run runQueryTestAll\n" >> $RUN_LOG_FILE} abort; - -re "TIMEOUT" { exec echo "\nTimeout on run runQueryTestAll\n" >> $RUN_LOG_FILE} abort; - -re " " { exec ./remote_scp_get.sh $SERVER $PASSWORD "/root/$SVN/mysql/queries/nightly/srvswdev11/go.log" - exec cat go.log >> $RUN_LOG_FILE - exec rm -f go.log - } abort; - } - } elseif { $TESTCOMMAND == "querySSB" } { - set timeout 1200 - log_user 1 - exec ./remote_command_test.sh $SERVER $PASSWORD "./nightly/startQueryTesterSSB $SVN" "startQueryTester completed" "No such file" 1200 - expect { - -re " " { exec ./remote_scp_get.sh $SERVER $PASSWORD "/root/$SVN/mysql/queries/queryTesterSSB.report" - exec cat queryTesterSSB.report >> $RUN_LOG_FILE - exec rm -f queryTesterSSB.report - } abort; - -re "FAILED" { exec echo "\nFailed to run queryTester\n" >> $RUN_LOG_FILE} abort; - -re "TIMEOUT" { exec echo "\nTimeout on run queryTester\n" >> $RUN_LOG_FILE} abort; - } - } elseif { $TESTCOMMAND == "concur" } { - set timeout 600 - log_user 1 - exec ./remote_command_test.sh $SERVER $PASSWORD "/root/nightly/startConcurTester 32" "Success" "Failed" 600 - expect { - -re " " { exec echo "Concurrance Test Passed\n\n" >> $RUN_LOG_FILE} abort; - -re "FAILED" { exec echo "\nConcurrance Test Failed\n" >> $RUN_LOG_FILE} abort; - -re "TIMEOUT" { exec echo "\nConcurrance Test Timeout\n" >> $RUN_LOG_FILE} abort; - timeout { exec echo "\nConcurrance Test Timeout\n" >> $RUN_LOG_FILE} abort; - } - } elseif { $TESTCOMMAND == "continueousConcur" } { - set timeout 30 - log_user 1 - exec ./remote_command_test.sh $SERVER $PASSWORD "/root/nightly/continueousConcurTester" "Started" "Failed" 30 - expect { - -re " " { exec echo "Continueous Concurrance Test Started \n\n" >> $RUN_LOG_FILE} abort; - -re "FAILED" { exec echo "\nContinueous Concurrance Test Failed\n" >> $RUN_LOG_FILE} abort; - -re "TIMEOUT" { exec echo "\nContinueous Concurrance Test Timeout\n" >> $RUN_LOG_FILE} abort; - timeout { exec echo "\nContinueous Concurrance Test Timeout\n" >> $RUN_LOG_FILE} abort; - } - } elseif { $TESTCOMMAND == "queryCalpontOnly" } { - set timeout 1200 - log_user 1 - exec ./remote_command_test.sh $SERVER $PASSWORD "./nightly/startQueryTesterCalpontOnly $SVN" "startQueryTester completed" "No such file" 1200 - expect { - -re " " { exec ./remote_scp_get.sh $SERVER $PASSWORD "/root/$SVN/mysql/queries/queryTester_working_tpch1_calpontonly.report" - exec cat queryTester_working_tpch1_calpontonly.report >> $RUN_LOG_FILE - exec rm -f queryTester_working_tpch1_calpontonly.report} abort; - -re "FAILED" { exec echo "\nFailed to run queryTester\n" >> $RUN_LOG_FILE} abort; - -re "TIMEOUT" { exec echo "\nTimeout on run queryTester\n" >> $RUN_LOG_FILE} abort; - } - } elseif { $TESTCOMMAND == "DBimport" } { - set timeout 28800 - log_user 1 - exec ./remote_command_test.sh $SERVER $PASSWORD "./nightly/dbImport.sh $SVN" "dbImport completed" "No such file" $timeout - expect { - -re " " { exec ./remote_scp_get.sh $SERVER $PASSWORD "/root/$SVN/mysql/queries/nightly/qaftest2/go.log" - exec cat go.log >> $RUN_LOG_FILE - exec rm -f go.log} abort; - -re "FAILED" { exec echo "\nFailed to run dbImport\n" >> $RUN_LOG_FILE} abort; - -re "TIMEOUT" { exec echo "\nTimeout on run dbImport\n" >> $RUN_LOG_FILE} abort; - } - } - if { $TESTCOMMAND == "ImportSSB100" } { - set timeout 28800 - log_user 1 - exec ./remote_command_test.sh $SERVER $PASSWORD "./nightly/importSSB100.sh $SVN" "importSSB100 completed" "No such file" $timeout - expect { - -re " " { - exec ./remote_scp_get.sh $SERVER $PASSWORD "/root/$SVN/mysql/queries/nightly/srvalpha2/go.log" - exec cat go.log >> $RUN_LOG_FILE - exec rm -f go.log - } abort; - -re "FAILED" { - exec echo "\nFailed to run importSSB100\n" >> $RUN_LOG_FILE} abort; - -re "TIMEOUT" { exec echo "\nTimeout on run importSSB100\n" >> $RUN_LOG_FILE} abort; - } - } elseif { $TESTCOMMAND == "dml" } { - set timeout 60 - log_user 1 - exec ./remote_command_test.sh $SERVER $PASSWORD "./nightly/startQueryTesterDML $SVN" "startQueryTester completed" "No such file" 60 - expect { - -re "FAILED" { send_user "FAILED\n" - exec echo "\nFailed to run queryTesterDML\n" >> $RUN_LOG_FILE}; - -re "TIMEOUT" { send_user "TIMEOUT\n" - exec echo "\nTimeout on run queryTesterDML\n" >> $RUN_LOG_FILE}; - -re " " { send_user "PASSED\n" - exec ./remote_scp_get.sh $SERVER $PASSWORD "/root/$SVN/mysql/queries/queryTesterDML.report" - exec cat queryTesterDML.report >> $RUN_LOG_FILE - exec rm -f queryTesterDML.report; - }; - send_user "NOTHING\n" - } - } elseif { $TESTCOMMAND == "timings" } { - set timeout 60 - log_user 1 - exec ./remote_command_test.sh $SERVER $PASSWORD "/root/nightly/updateQueries $SVN" "updateQueries completed" "No such file" 60 1 - set timeout 22000 - exec ./remote_command_test.sh $SERVER $PASSWORD "/root/nightly/startTimingsTester $SVN" "startTimingsTester completed" "error" 22000 1 - expect { - -re " " { - set REPORT demo - exec ./remote_scp_get.sh $SERVER $PASSWORD "/root/$SVN/mysql/queries/nightly/$REPORT/go.log" - exec cat go.log >> $RUN_LOG_FILE} abort; - -re "FAILED" { exec echo "\nFailed to run timings\n" >> $RUN_LOG_FILE} abort; - -re "TIMEOUT" { exec echo "\nTimeout on run timings\n" >> $RUN_LOG_FILE} abort; - } - } elseif { $TESTCOMMAND == "perfTests" } { - set timeout 22000 - exec ./remote_command_test.sh $SERVER $PASSWORD "/root/nightly/startPerfTests $SVN" "startPerfTests completed" "error" 22000 1 - expect { - -re " " { - set REPORT perf - exec ./remote_scp_get.sh $SERVER $PASSWORD "/root/$SVN/mysql/queries/nightly/$REPORT/go.log" - exec cat go.log >> $RUN_LOG_FILE} abort; - -re "FAILED" { echo "\nFailed to run timings\n" >> $RUN_LOG_FILE} abort; - -re "TIMEOUT" { exec echo "\nTimeout on run timings\n" >> $RUN_LOG_FILE} abort; - } - } elseif { $TESTCOMMAND == "dataWarehouse" } { - set timeout 5000000 - exec ./remote_command_test.sh $SERVER $PASSWORD "/root/nightly/startDataWarehouseTests $SVN" "startDataWarehouseTests completed" "error" 5000000 1 - expect { - -re " " { - set REPORT dataWarehouse - exec ./remote_scp_get.sh $SERVER $PASSWORD "/root/$SVN/mysql/queries/nightly/$REPORT/go.log" - exec cat go.log >> $RUN_LOG_FILE} abort; - -re "FAILED" { echo "\nFailed to run dataWarehouse\n" >> $RUN_LOG_FILE} abort; - -re "TIMEOUT" { exec echo "\nTimeout on dataWarehouse\n" >> $RUN_LOG_FILE} abort; - } - } elseif { $TESTCOMMAND == "calbench" } { - set timeout 22000 - log_user 1 - exec ./remote_command.sh $SERVER $PASSWORD "/home/calbench/AutomatedCalBench.sh " "EndAutomatedCalBench" "No such file" 22000 1 - expect { - -re " " { exec echo "\n\nAutomatedCalBench.sh successfully started\n" >> $RUN_LOG_FILE} abort; - -re "FAILED" { exec echo "\nFailed to run AutomatedCalBench.sh\n" >> $RUN_LOG_FILE} abort; - -re "TIMEOUT" { exec echo "\nTimeout on run AutomatedCalBench.sh\n" >> $RUN_LOG_FILE} abort; - } - } - } else { - send_user "Test Failed, Testcase $TESTCASE not supported\n" - exec echo "Test Failed, Testcase $TESTCASE not supported" >> $RUN_LOG_FILE - } - } - #get current date - exec date >/tmp/datesync.tmp - exec cat /tmp/datesync.tmp - set newtime [exec cat /tmp/datesync.tmp] - exec echo "\n\n******************* Run Test $TESTCASE ended at $newtime **********************************\n\n" >> $RUN_LOG_FILE - sleep 10 - } -} -set timeout 30 - -#get current date -exec date >/tmp/datesync.tmp -exec cat /tmp/datesync.tmp -set newtime [exec cat /tmp/datesync.tmp] - -exec echo "\nBuild Test Successfully Completed $newtime\n\n" >> $RUN_LOG_FILE - -#send report -log_user 0 -if { $EMAIL != " " } { - puts [exec mail -s "$SYSTEM/$SVN Automated Build/Test Results" $EMAIL < $RUN_LOG_FILE] - send_user "email report sent\n" -} else { - log_user 1 - send_user "Report located here: $RUN_LOG_FILE\n" - exec cat $RUN_LOG_FILE -} - -send_user "\nBuild Test Completed\n" - -exit diff --git a/tools/configMgt/svnQuery.cpp b/tools/configMgt/svnQuery.cpp deleted file mode 100644 index 05aef02fb..000000000 --- a/tools/configMgt/svnQuery.cpp +++ /dev/null @@ -1,215 +0,0 @@ -/* Copyright (C) 2014 InfiniDB, Inc. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; version 2 of - the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - MA 02110-1301, USA. */ - -/****************************************************************************************** -* $Id: svnQuery.cpp 64 2006-10-12 22:21:51Z dhill $ -* -* -* -******************************************************************************************/ -/** - * @file - */ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "stdio.h" -#include "ctype.h" -#include -#include -#include -#include "liboamcpp.h" - -using namespace std; -using namespace oam; - -int main(int argc, char* argv[]) -{ - Oam oam; - vector queryDirectory; - vector queryID; - - // get latest set of svn queries -// system("rm -rf /root/genii/ > /dev/null 2>&1"); - system("updateGenii.pl > /dev/null 2>&1"); - - system("rm -rf /home/qa/bldqry/mysql/* > /dev/null 2>&1"); - - string cronFile = "/root/calpontBuildTest"; - unlink(cronFile.c_str()); - - // get query directory list - string topQueryfileName = "/tmp/topQuerydirs"; - string secondQueryfileName = "/tmp/secondQuerydirs"; - string queryfileName = "/home/qa/bldqry/mysql/querydirs"; - - string cmd = "ls /root/genii/mysql/queries/. > " + topQueryfileName; - system(cmd.c_str()); - - ifstream file (topQueryfileName.c_str()); - - if (!file) - { - cout << " Error: can't open " + topQueryfileName << endl; - exit (-1); - } - - char line[200]; - string topQueryDir; - - while (file.getline(line, 200)) - { - topQueryDir = line; - - if ( topQueryDir.find("queryTester", 0) != string::npos || topQueryDir == "Makefile" ) - continue; - - // only do working queries for now - if ( topQueryDir.find("working", 0) == string::npos) - continue; - - string cmd = "ls /root/genii/mysql/queries/" + topQueryDir + "/. > " + secondQueryfileName; - system(cmd.c_str()); - - ifstream file (secondQueryfileName.c_str()); - - if (file) - { - char line[200]; - string buf; - - while (file.getline(line, 200)) - { - buf = line; - - if ( buf.empty() ) - continue; - - string tempdir = topQueryDir + "/" + buf; - queryDirectory.push_back(tempdir); - } - } - - file.close(); - } - - file.close(); - - if ( queryDirectory.size() == 0 ) - { - cout << endl << "Error: no query sub-directories located" << endl; - exit (-1); - } - - // get query list for each query directory - int test = 1; - std::vector::iterator pt1 = queryDirectory.begin(); - - for ( ; pt1 != queryDirectory.end() ; pt1++) - { - string directory = *pt1; - string::size_type pos = directory.find("/", 0); - - if (pos != string::npos) - { - string setName; - setName = directory.substr(0, pos); - setName = setName + "-"; - setName = setName + directory.substr(pos + 1, 200); - - string cmd = "cd /home/qa/bldqry/mysql/;echo " + setName + ".sql > " + oam.itoa(test) + ".txt"; - system(cmd.c_str()); - queryID.push_back(oam.itoa(test)); - test++; - - cmd = "rm -f /home/qa/bldqry/mysql/" + setName + ".sql"; - system(cmd.c_str()); - - cmd = "cat /root/genii/mysql/queries/" + directory + "/*.sql >> /home/qa/bldqry/mysql/" + setName + ".sql"; - system(cmd.c_str()); - } - } - - // setup calpontBuildTest cron job with directories - string cronFileTemplate = "/root/calpontBuildTest.template"; - - ifstream cfile (cronFileTemplate.c_str()); - - if (!cfile) - { - cout << endl << "Error: " + cronFileTemplate + " not found" << endl; - exit (-1); - } - - vector lines; - string newLine; - string buf; - - while (cfile.getline(line, 200)) - { - buf = line; - string::size_type pos = buf.find("buildTester", 0); - - if (pos != string::npos) - { - newLine = buf; - - pt1 = queryID.begin(); - - for ( ; pt1 != queryID.end() ; pt1++) - { - newLine.append(" mysql-"); - newLine.append(*pt1); - } - - newLine.append(" mysql-queryTester"); - - buf = newLine; - } - - //output to temp file - lines.push_back(buf); - } - - cfile.close(); - - ofstream newFile (cronFile.c_str()); - - //create new file - int fd = open(cronFile.c_str(), O_RDWR | O_CREAT, 0777); - - copy(lines.begin(), lines.end(), ostream_iterator(newFile, "\n")); - newFile.close(); - close(fd); - - cmd = "chmod 777 " + cronFile; - system(cmd.c_str()); - - -} diff --git a/tools/reserveStacks/create.sql b/tools/reserveStacks/create.sql deleted file mode 100644 index f1851d0a4..000000000 --- a/tools/reserveStacks/create.sql +++ /dev/null @@ -1,73 +0,0 @@ -/* -Creates the stacks table used to track availability / usage of our development stacks. -*/ - -create database if not exists stacks; -use stacks; - -drop table if exists stacks; -drop table if exists stacksLog; -drop table if exists users; - -CREATE TABLE `stacks` ( - `stack` varchar(20) DEFAULT NULL, - `status` varchar(20) DEFAULT NULL, - `user` varchar(20) DEFAULT NULL, - `checkedout` datetime DEFAULT NULL, - `userModule` varchar(20) DEFAULT NULL, - `notes` varchar(200) default null, - `version` char(8) -) ENGINE=MyISAM; - -insert into stacks values -('demo', 'Available', null, null, 'srvdemo1', '1 UM x 3 PMs', null), -('srvswdev11', 'Available', null, null, 'srvswdev11', '1 UM/PM', null), -('qaftest2', 'Available', null, null, 'qaftest2', '1 UM/PM', null), -('devint1', 'Available', null, null, 'srvperf7', '2 UM/PMs', null), -('devint2', 'Available', null, null, 'srvperf2', '1 UM x 3 PMs (Shared Nothing)', null), -('devint3', 'Available', null, null, 'srvperf3', '1 UM/PM (Shared Nothing)', null), -('devsn1', 'Available', null, null, 'srvdevsn1', '1 UM x 3 PMs (Shared Nothing)', null), -('devsn2', 'Available', null, null, 'srvdevsn5', '1 UM x 2 PMs (Shared Nothing)', null), -('devsn3', 'Available', null, null, 'srvdevsn8', '2 UM/PMs (Shared Nothing)', null), -('srvalpha2', 'Available', null, null, 'srvalpha2', '1 UM/PM', null), -('alphad03', 'Available', null, null, 'srvalpha4', '1 UM x 4 PMs', null), -('qperfd01', 'Available', null, null, 'qaftest7', '1 UM X 5 PMs', null), -('srvprodtest1', 'Available', null, null, 'srvprodtest1', '1 UM/PM',null, null); - -CREATE TABLE stacksLog ( - stack varchar(20), - user varchar(20), - checkedOut datetime, - checkedIn datetime, - source varchar(20) /* php or commandLine */ -) ENGINE=MyISAM; - -CREATE TABLE `users` ( - `user` varchar(20) DEFAULT NULL, - `mailOnCheckouts` tinyint(1) DEFAULT NULL, - `mailOnCheckins` tinyint(1) DEFAULT NULL -) ENGINE=MyISAM; - -insert into users values -('bpaul', false, false), -('chao', false, false), -('dcathey', false, false), -('dhill', false, false), -('pleblanc', false, false), -('rdempsey', false, false), -('wweeks', false, false), -('xlou', false, false), -('zzhu', false, false); - -create table testResults ( - test varchar(20), - stack varchar(20), - version varchar(10), - rel varchar(10), - start datetime, - stop datetime, - buildDtm varchar(30), - total int, - status varchar(8), - failedTests varchar(1000) -) engine=MyISAM; diff --git a/tools/reserveStacks/index.html b/tools/reserveStacks/index.html deleted file mode 100644 index 6ee9dd2ca..000000000 --- a/tools/reserveStacks/index.html +++ /dev/null @@ -1,38 +0,0 @@ - - -Automated Nightly Testing Logs - - -

Automated Nightly Testing Logs

-Auto OAM Results
-Nightly Results
-
-2.2 Build Results
-3.0 Build Results
-3.5 Build Results
-3.6 Build Results
-Trunk (4.0) Build Results
-
-3.5 Nightly Regression Test - devint3
-3.5 Performance Test - demo
-3.5 Nightly Regression Test - demo
-3.5 Perf Stack Tests - qaftest7 (Mon, Wed, Fri, Sat night builds)
-
-3.6 Nightly Regression Test - devint2
-3.6 Regression Test - srvalpha2
-3.6 ssb100 Import Validation - srvalpha2
-3.6 Nightly Regression Test - qaftest2
-3.6 TPCH Import Test - qaftest2
-3.6 Windows Regression Test - srvbldwin1
-
-Trunk (4.0) Nightly Regression Test - srvswdev11
-Trunk (4.0) Nightly Regression Test - srvalpha4 (Cloudera)
-Trunk (4.0) Nightly Regression Test - devint1 (Cloudera)
-Trunk (4.0) ssb100 Import Validation - devint1 (Cloudera)
-Trunk (4.0) Perf Stack Tests - qaftest7 (Sun, Tue, Thu, Fri, Sat night builds)
-Trunk (4.0) Nightly Regression Test - qaftest7
-Trunk Performance Test - demo (Sat, Sun)
-Trunk TPCH Import Test - qaftest2
-Trunk (4.0) Windows Regression Test - srvbldwin1
- - diff --git a/tools/reserveStacks/procs.sql b/tools/reserveStacks/procs.sql deleted file mode 100644 index f6f8fefc5..000000000 --- a/tools/reserveStacks/procs.sql +++ /dev/null @@ -1,184 +0,0 @@ -/* -Creates stored procedures used to track availability and usage of our development stacks. -*/ - -use stacks; - -drop procedure if exists list_stacks; -drop procedure if exists list_users; -drop procedure if exists reserve_stack; -drop procedure if exists reserve_stack2; -drop procedure if exists release_stack; -drop procedure if exists subscribe_checkins; -drop procedure if exists subscribe_checkouts; - -DELIMITER // - -/* Lists the stacks and their availability. */ -create procedure list_stacks() -begin - select stack as Stack, - userModule as 'User Module', - status as Status, - ifnull(user, '') User, - ifnull(checkedout, '') 'Checked Out', - ifnull(timediff(now(), checkedout), '') Time, - ifnull(notes, '') Notes, - version Version - from stacks - order by stack; -end // - -/* Lists the users. */ -create procedure list_users() -begin - select * from users order by 1; -end // - -create procedure reserve_stack(in inStack varchar(20), in inUser varchar(20)) -begin - call reserve_stack2(inStack, inUser, 'commandLine'); -end // - -/* Reserves the given stack on behalf of the given user. */ -create procedure reserve_stack2(in inStack varchar(20), in inUser varchar(20), in inSource varchar(20)) -begin - declare cnt int default 0; - declare err varchar(100) default ''; - - /* Validate the stack exists. */ - select count(*) into cnt from stacks where upper(stack) = upper(inStack); - if cnt <> 1 then - set err = concat(inStack, ' is not a valid stack.'); - end if; - - /* Validate that the stack is not already checked out unless the user is nightly in which case he gets it regardless of it */ - /* being checked out. */ - if lower(inUser) <> 'nightly' and err = '' then - select count(*) into cnt from stacks where status='Available' and upper(stack) = upper(inStack); - if cnt <> 1 then - set err = concat(inStack, ' is not available.'); - end if; - end if; - - /* Do the check out. */ - if err = '' then - - update stacks - set status='Checked Out', user=inUser, checkedout=now() - where upper(stack)=upper(inStack) and (status='Available' or lower(inUser)='nightly'); - - insert into stacksLog values (inStack, inUser, now(), null, inSource); - - end if; - - if err <> '' then - select err Status; - else - select concat(inStack, ' successfully checked out by ', inUser, '.') Status; - end if; -end // - -/* Releases the given stack. Requires the passed user to be the one holding the reservation. */ -create procedure release_stack(in inStack varchar(20), in inUser varchar(20)) -begin - declare cnt int default 0; - declare err varchar(100) default ''; - - /* Validate the stack exists. */ - select count(*) into cnt from stacks where upper(stack) = upper(inStack); - if cnt <> 1 then - set err = concat(inStack, ' is not a valid stack.'); - end if; - - /* Validate that the stack is checked out by the user. */ - if err = '' then - select count(*) into cnt - from stacks - where status='Checked Out' and upper(stack) = upper(inStack) and upper(user) = upper(inUser); - - if cnt <> 1 then - set err = concat(inStack, ' is not checked out by ', inUser, '.'); - end if; - end if; - - /* Update the row to release_stack the stack. */ - if err = '' then - update stacks - set status='Available', user=null, checkedout=null - where upper(stack)=upper(inStack); - - update stacksLog - set checkedIn=now() - where upper(stack) = upper(inStack) and checkedIn is null and upper(user) = upper(inUser); - end if; - - if err <> '' then - select err Status; - else - select concat(inStack, ' successfully released.') Status; - end if; -end // - -create procedure subscribe_checkins(in inUser varchar(20), in inSubscribe bool) -begin - declare cnt int default 0; - declare err varchar(100) default ''; - - /* Validate user. */ - select count(*) into cnt from users where upper(user)=upper(inUser); - if cnt <> 1 then - set err = concat(inUser, ' is not a valid user.'); - end if; - - if err = '' then - if inSubscribe then - update users - set mailOnCheckins = true - where upper(user) = upper(inUser); - else - update users - set mailOnCheckins = false - where upper(user) = upper(inUser); - end if; - end if; - - if err <> '' then - select err Status; - else - select concat(inUser, ' checkin mail setting successfully set.') Status; - end if; -end // - -create procedure subscribe_checkouts(in inUser varchar(20), in inSubscribe bool) -begin - declare cnt int default 0; - declare err varchar(100) default ''; - - /* Validate user. */ - select count(*) into cnt from users where upper(user)=upper(inUser); - if cnt < 1 then - set err = concat(inUser, ' is not a valid user.'); - end if; - - if err = '' then - if inSubscribe then - update users - set mailOnCheckouts = true - where upper(user) = upper(inUser); - else - update users - set mailOnCheckouts= false - where upper(user) = upper(inUser); - end if; - end if; - - if err <> '' then - select err Status; - else - select concat(inUser, ' checkout mail setting successfully set.') Status; - end if; -end // - -DELIMITER ; - diff --git a/tools/reserveStacks/results.php b/tools/reserveStacks/results.php deleted file mode 100644 index f6720ce28..000000000 --- a/tools/reserveStacks/results.php +++ /dev/null @@ -1,21 +0,0 @@ - -<?php echo $_GET["title"]; ?> - -\n"; -$file = fopen($_GET["logFile"], "r") or exit("Unable to open file!"); -//Output a line of the file until the end is reached -while(!feof($file)) -{ - $line = fgets($file); - if (!preg_match('/ Failed *= 0/', $line)) - $line = preg_replace('/ Failed/', ' Failed', $line); - $line = preg_replace('/ Passed/', ' Passed', $line); - $line = preg_replace('/ Yellow/', ' Yellow', $line); - echo $line; -} -fclose($file); -echo "\n"; -?> - - diff --git a/tools/reserveStacks/stack b/tools/reserveStacks/stack deleted file mode 100755 index ee6544d1f..000000000 --- a/tools/reserveStacks/stack +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/bash - -# BP 09/16/2011 13:43 -# This script will give user to -# list all the calpont stacks -# reserve a calpont stack -# release a calpont stack -# Help to use a test stack without stepping each other. -# - -DB=stacks - -usage() -{ - echo "Usage:" >&2 - echo " ${0##*/} list" >&2 - echo " ${0##*/} reserve stackname who" >&2 - echo " ${0##*/} release stackname who" >&2 -} - -cmd="$1" -argc=$# - -if [ -z "$cmd" -o "$cmd" = "-h" ]; then - usage - exit 1 -fi - -if [ $(expr 'list' : "$cmd") -gt 0 ]; then - cmd=list - INST=$2 -elif [ $(expr 'reserve' : "$cmd") -gt 2 ]; then - cmd=reserve - INST=$4 -elif [ $(expr 'release' : "$cmd") -gt 2 ]; then - cmd=release - INST=$4 -fi -if [ -z "$INSTALLDIR" ]; then - INSTALLDIR="/usr/local/mariadb/columnstore" - if [ $INST ]; then - INSTALLDIR=$INST - fi - export INSTALLDIR -fi - -if [ -z "$MYSQLCMD" ]; then - if [ -d "$INSTALLDIR/mysql" ]; then - # Linux. - MYSQLCMD="$INSTALLDIR/mysql/bin/mysql -h 10.100.4.51 -u root --database=$DB" - else - # Windows. - MYSQLCMD="$INSTALLDIR/bin/mysql -h 10.100.4.51 -u root --database=$DB" - fi - export MYSQLCMD -fi - -good=0 - -if [ "$cmd" = "list" ]; then - sql="call list_stacks()" - $MYSQLCMD -e "$sql" - good=1 -fi - -if [ "$cmd" = "reserve" -a $argc -ge 3 ]; then - sql="call reserve_stack('$2', '$3')" - $MYSQLCMD -e "$sql" - good=1 -fi - -if [ "$cmd" = "release" -a $argc -ge 3 ]; then - sql="call release_stack('$2', '$3')" - $MYSQLCMD -e "$sql" - good=1 -fi - -if [ $good -eq 0 ]; then - usage - exit 1 -fi - diff --git a/tools/reserveStacks/stack.php b/tools/reserveStacks/stack.php deleted file mode 100644 index a4182411a..000000000 --- a/tools/reserveStacks/stack.php +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - -User: " />  -
- - -"/> -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  StackUser ModuleStatusUserChecked OutTimeStack NotesVersion
                              
-
- - diff --git a/tools/reserveStacks/stackReservationResult.php b/tools/reserveStacks/stackReservationResult.php deleted file mode 100644 index 157404118..000000000 --- a/tools/reserveStacks/stackReservationResult.php +++ /dev/null @@ -1,45 +0,0 @@ - - - - -'; - } - else { - echo ''; - } - echo $line; - echo '

'; - } -} -mysql_close(); -echo 'Return to Stacks'; -?> - - - - diff --git a/tools/setConfig/configxml.sh.in b/tools/setConfig/configxml.sh.in index 789a9f3af..6aa2fb450 100755 --- a/tools/setConfig/configxml.sh.in +++ b/tools/setConfig/configxml.sh.in @@ -17,8 +17,8 @@ export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR InstallDir=$COLUMNSTORE_INSTALL_DIR if [ $InstallDir != "/usr/local/mariadb/columnstore" ]; then - export PATH=$InstallDir/bin:$InstallDir/mysql/bin:/bin:/usr/bin - export LD_LIBRARY_PATH=$InstallDir/lib:$InstallDir/mysql/lib + export PATH=$InstallDir/bin:/bin:/usr/bin + export LD_LIBRARY_PATH=$InstallDir/lib fi case "$1" in diff --git a/utils/threadpool/tp.vpw b/utils/threadpool/tp.vpw deleted file mode 100644 index c15af49c7..000000000 --- a/utils/threadpool/tp.vpw +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/utils/udfsdk/CMakeLists.txt b/utils/udfsdk/CMakeLists.txt index 417ccb7ed..053725698 100755 --- a/utils/udfsdk/CMakeLists.txt +++ b/utils/udfsdk/CMakeLists.txt @@ -22,5 +22,5 @@ add_library(udf_mysql SHARED ${udf_mysql_LIB_SRCS}) set_target_properties(udf_mysql PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS udf_mysql DESTINATION ${ENGINE_LIBDIR} COMPONENT storage-engine) +install(TARGETS udf_mysql DESTINATION ${MARIADB_PLUGINDIR} COMPONENT storage-engine)