From bea47cc657f3f46ac359a11f32b1ac1e25f3d19e Mon Sep 17 00:00:00 2001 From: Roman Nozdrin Date: Tue, 12 Dec 2017 22:53:33 +0300 Subject: [PATCH] MCOL-939 Moved columnstore version information to columnstoreversion.h for 1.1.X --- CMakeLists.txt | 5 +- build/BuildCalpontVersion.bat | 18 -- build/bootstrap | 60 ----- build/bootstrap.4.5 | 2 +- build/build_rpms | 143 ------------ build/genVersion.sh | 49 ---- build/make_src_tar | 135 ----------- build/releasenum.in | 4 +- columnstoreversion.h.in | 7 + dbcon/mysql/ha_calpont.cpp | 6 +- dbcon/mysql/ha_calpont_impl.cpp | 4 +- oam/install_scripts/softwareReport.sh | 9 - oam/oamcpp/liboamcpp.cpp | 68 +----- oamapps/calpontConsole/calpontConsole.cpp | 21 +- oamapps/calpontSupport/softwareReport.sh | 53 ----- oamapps/columnstoreSupport/softwareReport.sh | 9 +- oamapps/mcsadmin/mcsadmin.cpp | 15 +- oamapps/postConfigure/amazonInstaller.cpp | 11 +- oamapps/postConfigure/postConfigure.cpp | 1 + oamapps/serverMonitor/diskMonitor.cpp | 2 +- procmgr/main.cpp | 20 +- procmgr/processmanager.cpp | 7 +- procmon/processmonitor.cpp | 15 +- tools/configMgt/buildCalpontPackages.sh | 48 ---- tools/configMgt/calpont-build | 102 --------- tools/configMgt/dm_parent_installer.sh | 194 ---------------- tools/configMgt/dm_parent_installer_v3.sh | 191 ---------------- tools/configMgt/parent_binary_installer.sh | 215 ------------------ tools/configMgt/parent_binary_installer_v3.sh | 212 ----------------- tools/configMgt/pm_parent_installer.sh | 188 --------------- tools/configMgt/pm_parent_installer_v3.sh | 179 --------------- tools/configMgt/stackReleaseChecker.cpp | 177 -------------- utils/configcpp/libconfigcpp.vcxproj | 4 +- utils/configcpp/libconfigcpp.vcxproj.filters | 4 +- 34 files changed, 53 insertions(+), 2125 deletions(-) delete mode 100644 build/BuildCalpontVersion.bat delete mode 100755 build/bootstrap delete mode 100755 build/build_rpms delete mode 100755 build/genVersion.sh delete mode 100755 build/make_src_tar create mode 100644 columnstoreversion.h.in delete mode 100755 oamapps/calpontSupport/softwareReport.sh delete mode 100755 tools/configMgt/buildCalpontPackages.sh delete mode 100755 tools/configMgt/calpont-build delete mode 100755 tools/configMgt/dm_parent_installer.sh delete mode 100755 tools/configMgt/dm_parent_installer_v3.sh delete mode 100755 tools/configMgt/parent_binary_installer.sh delete mode 100755 tools/configMgt/parent_binary_installer_v3.sh delete mode 100755 tools/configMgt/pm_parent_installer.sh delete mode 100755 tools/configMgt/pm_parent_installer_v3.sh delete mode 100644 tools/configMgt/stackReleaseChecker.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 51d2e7a8a..1e46e2ad3 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,6 +37,8 @@ ENDIF(NOT CMAKE_BUILD_TYPE) #set( CMAKE_VERBOSE_MAKEFILE on ) INCLUDE(columnstore_version.cmake) +CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/columnstoreversion.h.in ${CMAKE_CURRENT_SOURCE_DIR}/columnstoreversion.h) + SET (PACKAGE columnstore) SET (PACKAGE_NAME columnstore) @@ -76,8 +78,7 @@ ENDIF("${isSystemDir}" STREQUAL "-1") INCLUDE (configureEngine.cmake) -CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/build/releasenum.in ${CMAKE_CURRENT_BINARY_DIR}/build/releasenum @ONLY IMMEDIATE) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/build/releasenum DESTINATION ${INSTALL_ENGINE} COMPONENT platform) +CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/columnstoreversion.h.in ${CMAKE_CURRENT_SOURCE_DIR}/columnstoreversion.h) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) INCLUDE(bison.cmake) diff --git a/build/BuildCalpontVersion.bat b/build/BuildCalpontVersion.bat deleted file mode 100644 index b2e8c62dd..000000000 --- a/build/BuildCalpontVersion.bat +++ /dev/null @@ -1,18 +0,0 @@ -for /f "delims= skip=1" %%x in (releasenum) do (set "%%x") -set packager="%USERNAME% <%USERNAME%@calpont.com>" -echo %packager% -set builddate="%DATE:~10,4%-%DATE:~4,2%-%DATE:~7,2% %TIME:~0,2%:%TIME:~3,2%:%TIME:~6,2%" -set buildmachine=%computername% -copy /Y .\CalpontVersion.txt.in ..\utils\winport\CalpontVersion.txt -sed -i -e s/@@PACKAGER@@/%packager%/ ..\utils\winport\CalpontVersion.txt -sed -i -e s/@@BUILDDATE@@/%builddate%/ ..\utils\winport\CalpontVersion.txt -sed -i -e s/@@VERSION@@/%version%/ ..\utils\winport\CalpontVersion.txt -sed -i -e s/@@RELEASE@@/%release%/ ..\utils\winport\CalpontVersion.txt -sed -i -e s/@@BUILDMACHINE@@/%buildmachine%/ ..\utils\winport\CalpontVersion.txt -:: For some unknown reason, sed removes permissions. Put them back. -icacls ..\utils\winport\CalpontVersion.txt /grant SYSTEM:F administrators:F -cd .. -git status | grep "On branch" >> utils\winport\CalpontVersion.txt -git log -1 | head -3 | egrep "^(commit|Date)" >> utils\winport\CalpontVersion.txt - -cd build diff --git a/build/bootstrap b/build/bootstrap deleted file mode 100755 index e7dfc1f97..000000000 --- a/build/bootstrap +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash -# -# $Id: bootstrap 1333 2011-01-18 17:25:26Z rdempsey $ -# -# This script is responsible for setting up a fresh development tree -# following a git checkout. It copies static files and shared include -# files to the export tree prior to building the software. - -set -e - -mkdir -p export/mysql -#FIXME rename this -cp dbcon/mysql/install_calpont_mysql.sh export/mysql/ - -#TODO: see if this my.cnf is necessary -cp dbcon/mysql/my.cnf export/mysql/. - -#TODO: the init.d service file should not be mixed case -#TODO: the init.d service file should not contain calpont -cp dbcon/mysql/mysql-Columnstore export/mysql/ && \ -cp build/files.lst export/mysql/ && \ -cp dbcon/mysql/install_calpont_mysql.sh export/mysql/ && \ -cp dbcon/mysql/my.cnf export/mysql/ && \ -cp dbcon/mysql/mysql-Columnstore export/mysql/ - -#FIXME: -#This is not going to update the version in configure.ac -echo Generating version header -./build/genVersion.sh -if [ $? -ne 0 ]; then - echo Could not generate version header - exit $? -fi - -echo Running GNU autotools to generate build environment -aclocal && \ -autoconf && \ -autoheader && \ -libtoolize && \ -automake --add-missing && \ -autoreconf - -if [ $? -ne 0 ]; then - echo GNU autotools generation failed - exit $? -fi - - -echo GNU autotools environment generation completed successfully - -#cd net-snmp/net-snmp -# ./configure --prefix=$PREFIX --with-mib-modules=disman/event-mib --with-cc=gcc \ -# --with-logfile=$PREFIX/log/snmpd.log \ -# --with-sys-location=Unknown \ -# --with-sys-contact=root@localhost.localdomain \ -# --with-default-snmp-version=3 \ -# --with-persistent-directory=$PREFIX/var/net-snmp \ -# --without-openssl \ -# --with-ldflags="-Wl,-rpath -Wl,$PREFIX/lib" - diff --git a/build/bootstrap.4.5 b/build/bootstrap.4.5 index b8be8a899..ac400b225 100755 --- a/build/bootstrap.4.5 +++ b/build/bootstrap.4.5 @@ -49,7 +49,7 @@ for lib in libnetsnmpagent.so libnetsnmphelpers.so libnetsnmpmibs.so libnetsnmp. done popd >/dev/null -./build/genVersion.sh +#./build/genVersion.sh for x in \ $(find . -name '[mM]akefile' \ diff --git a/build/build_rpms b/build/build_rpms deleted file mode 100755 index 7af7e689b..000000000 --- a/build/build_rpms +++ /dev/null @@ -1,143 +0,0 @@ -#!/bin/bash -# -# $Id: build_rpms 1734 2012-10-25 18:07:16Z dlhill $ -# - -verbose=0 - -prefix=/usr/local/mariadb/columnstore -#mysqldir=$prefix/mariadb-columnstore/mysql -columnstoredir=$prefix - -# set default as community -community=true - -usage() -{ -cat <&2 - fi -done - -#try to find project root -while [ ! -d dbcon ]; do - cd .. - curdir=$(pwd) - if [ $curdir = / -o $curdir = $HOME ]; then - echo "I could not find the project root directory: I can't continue!" - exit 1 - fi -done - -if [ ! -f ./build/releasenum ]; then - echo "I could not find the file 'releasesum' in the build directory: I can't continue!" - exit 1 -fi - -. ./build/releasenum - -# make the install package -buildroot=$HOME/rpm/BUILD/mariadb-columnstore-$version.$release - -sudo rm -rf $buildroot -mkdir -p $buildroot -mkdir -p $buildroot/mariadb/columnstore -echo -n "Writing binary files to $buildroot..." -sudo chown -R builder:builder $columnstoredir -/bin/cp -f -r $columnstoredir/* $buildroot/mariadb/columnstore/. - -/bin/cp -r build/releasenum $buildroot/mariadb/columnstore/. - -#get mysql server files -#pushd $mysqldir > /dev/null -#mkdir -p $buildroot/mariadb/columnstore/mysql -#cpio -pdmu --quiet $buildroot/mariadb/columnstore/mysql < files.lst -#popd >/dev/null - -#clean up some files from buildroot -rm -f $buildroot/mariadb/columnstore/etc/Doxyfile -for file in $buildroot/mariadb/columnstore/lib/*; do - if [ -h $file ]; then - rm -f $file - fi -done - -#temporarily clean up these BRM thingies -for file in dbrm script-fcns; do - rm -f $buildroot/mariadb/columnstore/bin/$file -done - -#clean up these bulkload scripts -for file in bulkload.sh cleanup.sh dbbuilder.sh dbload.sh cpimport.sh bulkloadp.sh; do - rm -f $buildroot/mariadb/columnstore/bin/$file -done - -rm -f $buildroot/mariadb/columnstore/lib/libidbboot.a -rm -f $buildroot/mariadb/columnstore/lib/libiberty.a - -mkdir -p $HOME/rpm/BUILD $HOME/rpm/RPMS $HOME/rpm/SRPMS $HOME/rpm/SPECS $HOME/rpm/tmp - -if [ ! -f $HOME/.rpmmacros ]; then - cat > $HOME/.rpmmacros < /tmp/rpmbuild.out.$$ 2>&1 - -rc=$? -echo done. -if [ $verbose -gt 0 -o $rc -ne 0 ]; then - cat /tmp/rpmbuild.out.$$ -fi - -rm -f /tmp/*.$$ - -exit $rc - diff --git a/build/genVersion.sh b/build/genVersion.sh deleted file mode 100755 index 4d6c2eefd..000000000 --- a/build/genVersion.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash -# -# $Id: genVersion.sh 1019 2009-12-18 14:42:35Z rdempsey $ -# - -#prefix=export -#for arg in "$@"; do -# if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then -# prefix="`echo $arg | awk -F= '{print $2}'`" -# else -# echo "ignoring unknown argument: $arg" 1>&2 -# fi -#done -# -##try to find project root -#while [ ! -d dbcon ]; do -# cd .. -# curdir=$(pwd) -# if [ $curdir = / -o $curdir = $HOME ]; then -# echo "I could not find the project root directory: I can't continue!" -# exit 1 -# fi -#done -# -#if [ ! -f ./build/releasenum ]; then -# echo "I could not find the file 'releasesum' in the build directory: I can't continue!" -# exit 1 -#fi - -. ./build/releasenum - -#mkdir -p ${prefix}/include - -echo " -#ifndef VERSIONNUMBER_H_ -#define VERSIONNUMBER_H_ -#include -const std::string idb_version(\"$version\"); -const std::string idb_release(\"$release\"); -#endif -" > dbcon/mysql/versionnumber.h.tmp - -diff -bBq dbcon/mysql/versionnumber.h.tmp dbcon/mysql/versionnumber.h >/dev/null 2>&1 -if [ $? -ne 0 ]; then - cp dbcon/mysql/versionnumber.h.tmp dbcon/mysql/versionnumber.h -fi - -rm -f dbcon/mysql/versionnumber.h.tmp - diff --git a/build/make_src_tar b/build/make_src_tar deleted file mode 100755 index 098d75ff7..000000000 --- a/build/make_src_tar +++ /dev/null @@ -1,135 +0,0 @@ -#!/bin/bash -# -# $Id: make_src_tar 1932 2013-06-20 18:26:27Z dhill $ -# - -# basedir is the working dir for all the activity -basedir=$HOME -# vname is the name of the top-level dir in the tar file -vname= -# ofile is the output tar file name and is relative to a hidden dir, so it should be absolute -ofile= -# branch is the branch to checkout (develop by default) -branch= -for arg in "$@"; do - if [ $(expr -- "$arg" : '--basedir=') -eq 10 ]; then - basedir="$(echo $arg | awk -F= '{print $2}')" - elif [ $(expr -- "$arg" : '--vname=') -eq 8 ]; then - vname="$(echo $arg | awk -F= '{print $2}')" - elif [ $(expr -- "$arg" : '--ofile=') -eq 8 ]; then - ofile="$(echo $arg | awk -F= '{print $2}')" - elif [ $(expr -- "$arg" : '--branch=') -eq 9 ]; then - branch="$(echo $arg | awk -F= '{print $2}')" - else - echo "ignoring unknown argument: $arg" 1>&2 - fi -done - -if [ -f releasenum ]; then - . releasenum -elif [ -f build/releasenum ]; then - . build/releasenum -else - echo "Couldn't locate 'releasenum' file in the build dir, make sure running in top-level dir" -fi - -if [ -z "$version" ]; then - echo "Version defaulting to 4.0-develop" - version=4.0 - release=develop -fi - -if [ -z "$release" ]; then - release=0 -fi - -blddir=bld.$$ -if [ -z "$vname" ]; then - vname=infinidb-${version} -fi -if [ -z "$ofile" ]; then - ofile=${basedir}/${vname}-${release}.src.tar.gz -fi -co_dir=$blddir/$vname - -trap "{ echo; cd ${basedir}; rm -rf $blddir; exit 1; }" TERM INT ERR - -cd ${basedir} -rm -rf $blddir -mkdir -p $co_dir - -cd $co_dir - -branch_arg= -if [ ! -z "$branch" ]; then - branch_arg="-b $branch" -else - branch=develop -fi - -echo -n "getting git source from $branch..." -git clone http://srvengcm1.calpont.com/repos/infinidb.git infinidb -cd infinidb -git checkout $branch -echo "done." - -test -d build || exit 1 - -echo -n "cleaning git source for " -echo -n "release..." -rm -rf .git .gitignore -rm -rf qa export -rm -f rules.mak -find . -name Makefile | xargs rm -f -find . -name \*.xmi | xargs rm -f -rm -f dbcon/joblist/bandeddl.h.set dbcon/joblist/bandeddl.h.vector primitives/blockcache/iomanager.cpp.single-read \ - primitives/udf/Makefile.sdk -rm -rf utils/scenarios -cd mysql -rm -rf scripts queries storage/maria -cd .. -rm -rf writeengine/test/* -rm -rf utils/net-snmp-built-libs -rm -rf utils/multicast -rm -rf utils/openpgm -rm -rf tools/reserveStacks -rm -rf dbcon/doc dbcon/ingres dbcon/plsql -cd tools -rm -rf brmtest dataPump evalidx fixdate nettest pgm pingproc rebuildEM snconvert updateGenii valprint -rm -rf cfread dbgen dbgen-ssb ddldriver dmldriver idb_comp sendPlan vbgen -cd .. -rm -rf utils/libstatgrab utils/libxml utils/testbc utils/configcpp/md5 -echo "done." - -cd .. - -echo -n "getting MySQL..." -git clone https://github.com/infinidb/mysql mysql -cd mysql -git checkout $branch -echo "done." - -cd .. - -echo -n "building tarball..." -cd infinidb -cp -r utils/autoconf/* . -cp INSTALL INSTALL.keep -cp install-sh install-sh.keep -rm -rf utils/autoconf -autoreconf --force --install -rm -f INSTALL install-sh -mv INSTALL.keep INSTALL -mv install-sh.keep install-sh -cd .. -ln -s infinidb/INSTALL -ln -s infinidb/README -cd .. -tar -zcf $ofile $vname -echo "done." - -echo "tarball left in $ofile" - -cd ${basedir} -rm -rf $blddir - diff --git a/build/releasenum.in b/build/releasenum.in index 1f5e4b4dc..7461afcf3 100644 --- a/build/releasenum.in +++ b/build/releasenum.in @@ -1,2 +1,2 @@ -version=@PACKAGE_VERSION@ -release=@PACKAGE_RELEASE@ \ No newline at end of file +version=${PACKAGE_VERSION} +release=${PACKAGE_RELEASE} diff --git a/columnstoreversion.h.in b/columnstoreversion.h.in new file mode 100644 index 000000000..ec642aa92 --- /dev/null +++ b/columnstoreversion.h.in @@ -0,0 +1,7 @@ +#ifndef VERSIONNUMBER_H_ +#define VERSIONNUMBER_H_ +#include +const std::string columnstore_version("${VERSION}"); +const std::string columnstore_release("${PACKAGE_RELEASE}"); +#endif + diff --git a/dbcon/mysql/ha_calpont.cpp b/dbcon/mysql/ha_calpont.cpp index 16e1e0def..2cdc093f3 100755 --- a/dbcon/mysql/ha_calpont.cpp +++ b/dbcon/mysql/ha_calpont.cpp @@ -108,7 +108,7 @@ */ #include "ha_calpont.h" -#include "versionnumber.h" +#include "columnstoreversion.h" #define NEED_CALPONT_EXTERNS #include "ha_calpont_impl.h" @@ -201,7 +201,7 @@ static int columnstore_init_func(void *p) tm.tm_year % 100, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec); - fprintf(stderr, "Columnstore: Started; Version: %s-%s\n", idb_version.c_str(), idb_release.c_str()); + fprintf(stderr, "Columnstore: Started; Version: %s-%s\n", columnstore_version.c_str(), columnstore_release.c_str()); calpont_hton= (handlerton *)p; #ifndef _MSC_VER @@ -234,7 +234,7 @@ static int infinidb_init_func(void *p) tm.tm_year % 100, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec); - fprintf(stderr, "InfiniDB: Started; Version: %s-%s\n", idb_version.c_str(), idb_release.c_str()); + fprintf(stderr, "Columnstore: Started; Version: %s-%s\n", columnstore_version.c_str(), columnstore_release.c_str()); calpont_hton= (handlerton *)p; diff --git a/dbcon/mysql/ha_calpont_impl.cpp b/dbcon/mysql/ha_calpont_impl.cpp index 781047106..d4669c8d5 100755 --- a/dbcon/mysql/ha_calpont_impl.cpp +++ b/dbcon/mysql/ha_calpont_impl.cpp @@ -141,7 +141,7 @@ using namespace logging; using namespace funcexp; #include "installdir.h" -#include "versionnumber.h" +#include "columnstoreversion.h" namespace cal_impl_if { @@ -2286,7 +2286,7 @@ const char* calgetversion(UDF_INIT* initid, UDF_ARGS* args, char* result, unsigned long* length, char* is_null, char* error) { - string version(idb_version); + string version(columnstore_version); *length = version.size(); memcpy(result, version.c_str(), *length); return result; diff --git a/oam/install_scripts/softwareReport.sh b/oam/install_scripts/softwareReport.sh index ee65f7332..09fcb4db6 100755 --- a/oam/install_scripts/softwareReport.sh +++ b/oam/install_scripts/softwareReport.sh @@ -36,15 +36,6 @@ echo "################# mcsadmin getcolumnstoresoftwareinfo #################" echo " " $INSTALLDIR/bin/mcsadmin getsoftwareinfo -if [ -e $INSTALLDIR/releasenum ];then - echo " " - echo "-- Columnstore Release Number file --" - echo " " - echo "################# cat $INSTALLDIR/releasenum #################" - echo " " - cat $INSTALLDIR/releasenum -fi - echo " " echo "-- Columnstore Storage Configuration --" echo " " diff --git a/oam/oamcpp/liboamcpp.cpp b/oam/oamcpp/liboamcpp.cpp index e28e21aa6..7bdfb27b8 100644 --- a/oam/oamcpp/liboamcpp.cpp +++ b/oam/oamcpp/liboamcpp.cpp @@ -46,6 +46,7 @@ #include #include +#include "columnstoreversion.h" #include "ddlpkg.h" #include "../../dbcon/dmlpackage/dmlpkg.h" #define LIBOAM_DLLEXPORT @@ -148,74 +149,13 @@ namespace oam /******************************************************************** * * get System Software information - * + * (for backward compatibility only) ********************************************************************/ void Oam::getSystemSoftware(SystemSoftware& systemsoftware) { - // parse releasenum file - - string rn = InstallDir + "/releasenum"; - ifstream File(rn.c_str()); - if (!File) - // Open File error - return; - - char line[400]; - string buf; - while (File.getline(line, 400)) - { - buf = line; - for ( unsigned int i = 0;; i++) - { - if ( SoftwareData[i] == "") - //end of list - break; - - string data = ""; - string::size_type pos = buf.find(SoftwareData[i],0); - if (pos != string::npos) - { - string::size_type pos1 = buf.find("=",pos); - if (pos1 != string::npos) - { - data = buf.substr(pos1+1, 80); - } - else - // parse error - exceptionControl("getSystemSoftware", API_FAILURE); - - //strip off any leading or trailing spaces - for(;;) - { - string::size_type pos = data.find(' ',0); - if (pos == string::npos) - // no more found - break; - // strip leading - if (pos == 0) { - data = data.substr(pos+1,10000); - } - else - { // strip trailing - data = data.substr(0, pos); - } - } - - switch(i) - { - case(0): // line up with SoftwareData[] - systemsoftware.Version = data; - break; - case(1): - systemsoftware.Release = data; - break; - } - } - } //end of for loop - } //end of while - - File.close(); + systemsoftware.Version = columnstore_version; + systemsoftware.Release = columnstore_release; } /******************************************************************** * diff --git a/oamapps/calpontConsole/calpontConsole.cpp b/oamapps/calpontConsole/calpontConsole.cpp index 74c8e633a..7838284b1 100644 --- a/oamapps/calpontConsole/calpontConsole.cpp +++ b/oamapps/calpontConsole/calpontConsole.cpp @@ -25,6 +25,7 @@ #include extern int h_errno; +#include "columnstoreversion.h" #include "calpontConsole.h" #include "boost/filesystem/operations.hpp" #include "boost/filesystem/path.hpp" @@ -703,7 +704,6 @@ int processCommand(string* arguments) case 4: // getSystemConfig { - SystemSoftware systemsoftware; SystemConfig systemconfig; string returnValue; @@ -714,14 +714,13 @@ int processCommand(string* arguments) try { - oam.getSystemSoftware(systemsoftware); oam.getSystemConfig(systemconfig); cout << endl << "System Configuration" << endl << endl; cout << "SystemName = " << systemconfig.SystemName << endl; - cout << "SoftwareVersion = " << systemsoftware.Version << endl; - cout << "SoftwareRelease = " << systemsoftware.Release << endl; + cout << "SoftwareVersion = " << columnstore_version << endl; + cout << "SoftwareRelease = " << columnstore_release << endl; cout << "ParentOAMModuleName = " << systemconfig.ParentOAMModule << endl; cout << "StandbyOAMModuleName = " << systemconfig.StandbyOAMModule << endl; @@ -4836,21 +4835,15 @@ int processCommand(string* arguments) if (oam.checkLogStatus("/tmp/calpont.txt", "Status: install")) system("cat /tmp/calpont.txt"); else { - SystemSoftware systemsoftware; - oam.getSystemSoftware(systemsoftware); - - cout << "SoftwareVersion = " << systemsoftware.Version << endl; - cout << "SoftwareRelease = " << systemsoftware.Release << endl; + cout << "SoftwareVersion = " << columnstore_version << endl; + cout << "SoftwareRelease = " << columnstore_release << endl; } } } else { - SystemSoftware systemsoftware; - oam.getSystemSoftware(systemsoftware); - - cout << "SoftwareVersion = " << systemsoftware.Version << endl; - cout << "SoftwareRelease = " << systemsoftware.Release << endl; + cout << "SoftwareVersion = " << columnstore_version << endl; + cout << "SoftwareRelease = " << columnstore_release << endl; } cout << endl; break; diff --git a/oamapps/calpontSupport/softwareReport.sh b/oamapps/calpontSupport/softwareReport.sh deleted file mode 100755 index 81c57c715..000000000 --- a/oamapps/calpontSupport/softwareReport.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -# -# $Id: hardwareReport.sh 421 2007-04-05 15:46:55Z dhill $ -# -if [ $1 ] ; then - MODULE=$1 -else - MODULE="pm1" -fi - -if [ $2 ] ; then - INSTALLDIR=$2 -else - INSTALLDIR="/usr/local/mariadb/columnstore" -fi - -if [ $USER = "root" ]; then - SUDO=" " -else - SUDO="sudo" -fi - -$SUDO rm -f /tmp/${MODULE}_softwareReport.txt - -{ -echo " " -echo "******************** Software Report for ${MODULE} ********************" -echo " " - -echo " " -echo "-- Calpont Package Details --" -echo " " -echo "################# mcsadmin getcalpontsoftwareinfo #################" -echo " " -$INSTALLDIR/bin/mcsadmin getcalpontsoftwareinfo - -echo " " -echo "-- Calpont Release Number file --" -echo " " -echo "################# cat $INSTALLDIR/releasenum #################" -echo " " -cat $INSTALLDIR/releasenum - -echo " " -echo "-- Calpont Storage Configuration --" -echo " " -echo "################# mcsadmin getStorageConfig #################" -echo " " -$INSTALLDIR/bin/mcsadmin getStorageConfig - -} > /tmp/${MODULE}_softwareReport.txt - -exit 0 \ No newline at end of file diff --git a/oamapps/columnstoreSupport/softwareReport.sh b/oamapps/columnstoreSupport/softwareReport.sh index cb1468813..b7a6e90b0 100755 --- a/oamapps/columnstoreSupport/softwareReport.sh +++ b/oamapps/columnstoreSupport/softwareReport.sh @@ -33,14 +33,7 @@ echo "-- Columnstore Package Details --" echo " " echo "################# mcsadmin getcolumnstoresoftwareinfo #################" echo " " -$INSTALLDIR/bin/mcsadmin getcolumnstoresoftwareinfo - -echo " " -echo "-- Columnstore Release Number file --" -echo " " -echo "################# cat $INSTALLDIR/releasenum #################" -echo " " -cat $INSTALLDIR/releasenum +$INSTALLDIR/bin/mcsadmin getsoftwareinfo echo " " echo "-- Columnstore Storage Configuration --" diff --git a/oamapps/mcsadmin/mcsadmin.cpp b/oamapps/mcsadmin/mcsadmin.cpp index 93dd701df..9c436a3a6 100644 --- a/oamapps/mcsadmin/mcsadmin.cpp +++ b/oamapps/mcsadmin/mcsadmin.cpp @@ -26,6 +26,7 @@ #include extern int h_errno; +#include "columnstoreversion.h" #include "mcsadmin.h" #include "boost/filesystem/operations.hpp" #include "boost/filesystem/path.hpp" @@ -5046,21 +5047,15 @@ int processCommand(string* arguments) if (WEXITSTATUS(rtnCode) == 0) system("cat /tmp/columnstore.txt"); else { - SystemSoftware systemsoftware; - oam.getSystemSoftware(systemsoftware); - - cout << "SoftwareVersion = " << systemsoftware.Version << endl; - cout << "SoftwareRelease = " << systemsoftware.Release << endl; + cout << "SoftwareVersion = " << columnstore_version << endl; + cout << "SoftwareRelease = " << columnstore_release << endl; } } } else { - SystemSoftware systemsoftware; - oam.getSystemSoftware(systemsoftware); - - cout << "SoftwareVersion = " << systemsoftware.Version << endl; - cout << "SoftwareRelease = " << systemsoftware.Release << endl; + cout << "SoftwareVersion = " << columnstore_version << endl; + cout << "SoftwareRelease = " << columnstore_release << endl; } cout << endl; break; diff --git a/oamapps/postConfigure/amazonInstaller.cpp b/oamapps/postConfigure/amazonInstaller.cpp index 9268d0f28..48f5f3899 100644 --- a/oamapps/postConfigure/amazonInstaller.cpp +++ b/oamapps/postConfigure/amazonInstaller.cpp @@ -46,6 +46,7 @@ #include #include +#include "columnstoreversion.h" #include "liboamcpp.h" #include "configcpp.h" #include "alarmmanager.h" @@ -220,10 +221,7 @@ int main(int argc, char *argv[]) postConfigureLog = true; } else if( string("-v") == argv[i] ) { - SystemSoftware systemsoftware; - oam.getSystemSoftware(systemsoftware); - - cout << endl << "columnstore Version: " << systemsoftware.Version << "-" << systemsoftware.Release << endl; + cout << "columnstore Version: " << columnstore_version << "-" << columnstore_release << endl; exit (0); } else if( string("-pc") == argv[i] ) { @@ -1289,10 +1287,7 @@ int main(int argc, char *argv[]) cout << "===== Setting up system '" + systemName + "' based on these settings ===== " << endl << endl; - SystemSoftware systemsoftware; - oam.getSystemSoftware(systemsoftware); - - cout << "columnstore Version = " << systemsoftware.Version << "-" << systemsoftware.Release << endl; + cout << "columnstore Version = " << columnstore_version << "-" << columnstore_release << endl; cout << "System Type = " << systemType << endl; if ( subnetID != oam::UnassignedName ) { diff --git a/oamapps/postConfigure/postConfigure.cpp b/oamapps/postConfigure/postConfigure.cpp index 8a543f82b..9f7505f6b 100644 --- a/oamapps/postConfigure/postConfigure.cpp +++ b/oamapps/postConfigure/postConfigure.cpp @@ -69,6 +69,7 @@ #include "boost/filesystem/path.hpp" #include "boost/tokenizer.hpp" +#include "columnstoreversion.h" #include "liboamcpp.h" #include "configcpp.h" diff --git a/oamapps/serverMonitor/diskMonitor.cpp b/oamapps/serverMonitor/diskMonitor.cpp index af55b4172..2edcaa2f6 100644 --- a/oamapps/serverMonitor/diskMonitor.cpp +++ b/oamapps/serverMonitor/diskMonitor.cpp @@ -223,7 +223,7 @@ void diskMonitor() string fileName; // check local if ( deviceName == "/") { - fileName = deviceName + "usr/local/mariadb/columnstore/releasenum"; + fileName = deviceName + "usr/local/mariadb/columnstore/"; } else { diff --git a/procmgr/main.cpp b/procmgr/main.cpp index b6f51a609..860775780 100644 --- a/procmgr/main.cpp +++ b/procmgr/main.cpp @@ -27,6 +27,7 @@ #include +#include "columnstoreversion.h" #include "processmanager.h" #include "installdir.h" @@ -507,24 +508,7 @@ static void startMgrProcessThread() log.writeLog(__LINE__, "startMgrProcessThread launched", LOG_TYPE_DEBUG); //get calpont software version and release - SystemSoftware systemsoftware; - string softwareVersion; - string softwareRelease; - - try - { - oam.getSystemSoftware(systemsoftware); - - softwareVersion = systemsoftware.Version; - softwareRelease = systemsoftware.Release; - } - catch (exception& e) { - cout << endl << "ProcMon Construct Error reading getSystemSoftware = " << e.what() << endl; - exit(-1); - } - - string localSoftwareInfo = softwareVersion + softwareRelease; - + string localSoftwareInfo = columnstore_version + columnstore_release; //get systemStartupOffline string systemStartupOffline = "n"; try { diff --git a/procmgr/processmanager.cpp b/procmgr/processmanager.cpp index 403bbbdda..118591c09 100755 --- a/procmgr/processmanager.cpp +++ b/procmgr/processmanager.cpp @@ -24,6 +24,7 @@ //#define NDEBUG #include +#include "columnstoreversion.h" #include "processmanager.h" #include "installdir.h" #include "dbrm.h" @@ -4565,12 +4566,12 @@ int ProcessManager::addModule(oam::DeviceNetworkList devicenetworklist, std::str } if ( packageType == "rpm") - calpontPackage = homedir + "/mariadb-columnstore*" + systemsoftware.Version + "-" + systemsoftware.Release + "*.rpm.tar.gz"; + calpontPackage = homedir + "/mariadb-columnstore*" + columnstore_version + "-" + columnstore_release + "*.rpm.tar.gz"; else if ( packageType == "deb") - calpontPackage = homedir + "/mariadb-columnstore*" + systemsoftware.Version + "-" + systemsoftware.Release + "*.deb.tar.gz"; + calpontPackage = homedir + "/mariadb-columnstore*" + columnstore_version + "-" + columnstore_release + "*.deb.tar.gz"; else - calpontPackage = homedir + "/mariadb-columnstore*" + systemsoftware.Version + "-" + systemsoftware.Release + "*.bin.tar.gz"; + calpontPackage = homedir + "/mariadb-columnstore*" + columnstore_version + "-" + columnstore_release + "*.bin.tar.gz"; if ( DistributedInstall == "y" ) { diff --git a/procmon/processmonitor.cpp b/procmon/processmonitor.cpp index 90679ee28..148546a72 100644 --- a/procmon/processmonitor.cpp +++ b/procmon/processmonitor.cpp @@ -23,6 +23,7 @@ #include +#include "columnstoreversion.h" #include "IDBDataFile.h" #include "IDBPolicy.h" #include "processmonitor.h" @@ -110,18 +111,8 @@ MonitorConfig::MonitorConfig() // } //get calpont software version and release - SystemSoftware systemsoftware; - - try - { - oam.getSystemSoftware(systemsoftware); - - fsoftwareVersion = systemsoftware.Version; - fsoftwareRelease = systemsoftware.Release; - } - catch (exception& e) { - cout << endl << "ProcMon Construct Error reading getSystemSoftware = " << e.what() << endl; - } + fsoftwareVersion = columnstore_version; + fsoftwareRelease = columnstore_release; } diff --git a/tools/configMgt/buildCalpontPackages.sh b/tools/configMgt/buildCalpontPackages.sh deleted file mode 100755 index 4ed8ebe51..000000000 --- a/tools/configMgt/buildCalpontPackages.sh +++ /dev/null @@ -1,48 +0,0 @@ -#! /bin/sh -# -# $1 - release number or 'Latest' (default 'Latest') -# -if [ "$1" = "" ] ; then - DIR=Latest - REL="3.6-0" -elif [ "$1" = "Latest" ] ; then - DIR=Latest - REL="3.6-0" -elif [ "$2" = "" ] ; then - DIR=$1 - REL=$1 -else - DIR=$1 - REL=$2 -fi -# -if [[ $REL != *-* ]] ; then - REL=$REL"-0" -fi -# -{ -cd /root/autoOAM/ -rpm -e infinidb-libs infinidb-platform infinidb-enterprise --nodeps -rpm -e infinidb-storage-engine infinidb-mysql --nodeps -rpm -e infinidb-mysql --nodeps -rm -rf /usr/local/Calpont -rm -rf calpont* -rm -f *gz -# -smbclient //srvhill01/shared -WMARIADB -Uroot%Calpont1 -c "cd packages/$DIR;prompt OFF;mget *.rpm" -rpm -ivh calpont*.x86_64.rpm --nodeps -rpm -iq calpont >> /usr/local/Calpont/releasenum -cd /usr/local/ -tar -zcvf calpont-infinidb-ent-$REL.x86_64.bin.tar.gz Calpont -mv calpont-infinidb-ent-$REL.x86_64.bin.tar.gz /root/autoOAM/ -cd /root/autoOAM/ -alien -ck calpont*.x86_64.rpm -tar -zcvf calpont-infinidb-ent-$REL.x86_64.rpm.tar.gz *$REL*.rpm -tar -zcvf calpont-infinidb-ent-$REL.amd64.deb.tar.gz *$REL*.deb - -smbclient //srvhill01/shared -WMARIADB -Uroot%Calpont1 -c "cd packages/$DIR;mkdir packages;cd packages;prompt OFF;del calpont-infinidb-ent*gz;mput *gz" -} > /root/autoOAM/buildCalpontPackages-$DIR.log 2>&1 -# -echo "Calpont Packages Build Successfully Completed" -exit 0 - diff --git a/tools/configMgt/calpont-build b/tools/configMgt/calpont-build deleted file mode 100755 index 6b0408e15..000000000 --- a/tools/configMgt/calpont-build +++ /dev/null @@ -1,102 +0,0 @@ -#! /bin/sh -# -# $Id: calpont-build 421 2007-14-15 15:46:55Z dhill $ -# -# build calpont rpm and install on call6500 -# $1 - release number or 'Latest' -# $2 - svn branch -# -if [ "$2" = "" ] ; then - echo "enter release and svn-branch arguments" - exit 0 -fi -# !!! set for OS type 32 or 64 bit !!! - -OS=x86_64 - -# -REL=$1 -DIR=$2 - -#remove mysqld before new one is built -#prevents old version from being packaged in new build -rm -f /usr/local/Calpont/mysql/libexec/* - -if [ $DIR = "genii" ] ; then - ./mysql-build-genii > mysql-build-genii.log & -else - ./mysql-build-branch $DIR > mysql-build-$DIR.log & -fi -# -HOME=/home/nightly/$DIR -rm -rf $HOME -rm -fr /home/nightly/rpm/ -# - -if [ $DIR = "genii" ] ; then - su - nightly -c "export CXXFLAGS='-O3 -fno-strict-aliasing ';mkdir $DIR;updateGenii.pl > ~/$DIR/updateGenii.log 2>&1;cd ~/$DIR;make clean;make > ~/$DIR/make.log 2>&1;make > ~/$DIR/make1.log 2>&1;./build/build_rpms > ~/$DIR/build_rpms.log 2>&1" -else - su - nightly -c "export CXXFLAGS='-O3 -fno-strict-aliasing ';mkdir $DIR;updateGenii.pl -b $DIR > ~/$DIR/updateGenii.log 2>&1;cd ~/$DIR;make clean;make > ~/$DIR/make.log 2>&1;make > ~/$DIR/make1.log 2>&1;./build/build_rpms > ~/$DIR/build_rpms.log 2>&1" -fi - -# -# generate rpm info text files - -if [ ! -f $HOME/build/releasenum ]; then - #default - version=3.0 -else - . $HOME/build/releasenum -fi - -cd /home/nightly/rpm/ > /dev/null 2>&1 -cd RPMS/$OS/ > /dev/null 2>&1 -test -f infinidb-platform-$version*.rpm || echo "no rpm" -test -f infinidb-platform-$version*.rpm || exit -1 -rpm -qi -p infinidb-platform-$version*.rpm > infinidb-platform-$OS-rpm-info.txt -echo " " >> infinidb-platform-$OS-rpm-info.txt -echo "MD5SUM" >> infinidb-platform-$OS-rpm-info.txt -md5sum infinidb-platform-$version*.rpm >> infinidb-platform-$OS-rpm-info.txt -echo " " >> infinidb-platform-$OS-rpm-info.txt -# -test -f infinidb-storage-engine-*.rpm || echo "no rpm" -test -f infinidb-storage-engine-*.rpm || exit -1 -rpm -qi -p infinidb-storage-engine-*.rpm > infinidb-storage-engine-$OS-rpm-info.txt -echo " " >> infinidb-storage-engine-$OS-rpm-info.txt -echo "MD5SUM" >> infinidb-storage-engine-$OS-rpm-info.txt -md5sum infinidb-storage-engine-*.rpm >> infinidb-storage-engine-$OS-rpm-info.txt -echo " " >> infinidb-storage-engine-$OS-rpm-info.txt -# -test -f infinidb-mysql-*.rpm || echo "no rpm" -test -f infinidb-mysql-*.rpm || exit -1 -rpm -qi -p infinidb-mysql-*.rpm > infinidb-mysql-$OS-rpm-info.txt -echo " " >> infinidb-mysql-$OS-rpm-info.txt -echo "MD5SUM" >> infinidb-mysql-$OS-rpm-info.txt -md5sum infinidb-mysql-*.rpm >> infinidb-mysql-$OS-rpm-info.txt -echo " " >> infinidb-mysql-$OS-rpm-info.txt -# -{ -if [ $REL != "Latest" ] ; then - # copy rpms to calweb - DATE=`date +%F` - cd /home/nightly/rpm/RPMS/$OS/ - smbclient //calweb/shared -Wcalpont -Uoamuser%Calpont1 -c "cd Iterations;mkdir $REL;cd $REL;rm *.$OS.rpm;prompt OFF;mput *" - smbclient //calweb/shared -Wcalpont -Uoamuser%Calpont1 -c "cd Iterations/nightly;mkdir $REL-$DATE;cd $REL-$DATE;rm *.$OS.rpm;prompt OFF;mput *" - cd /home/nightly/$DIR/export/etc/ - smbclient //calweb/shared -Wcalpont -Uoamuser%Calpont1 -c "cd Iterations/$REL;rm Columnstore.xml;prompt OFF;mput Columnstore.xml" - smbclient //calweb/shared -Wcalpont -Uoamuser%Calpont1 -c "cd Iterations/nightly/$REL-$DATE;rm Columnstore.xml;prompt OFF;mput Columnstore.xml" - -else - # copy nightly on calweb - DATE=`date +%F` - cd /home/nightly/rpm/RPMS/$OS/ - smbclient //calweb/shared -Wcalpont -Uoamuser%Calpont1 -c "cd Iterations/Latest;rm *.$OS.rpm;prompt OFF;mput *" - smbclient //calweb/shared -Wcalpont -Uoamuser%Calpont1 -c "cd Iterations/nightly;mkdir genii-$DATE;cd genii-$DATE;prompt OFF;mput *" - cd /home/nightly/$DIR/export/etc/ - smbclient //calweb/shared -Wcalpont -Uoamuser%Calpont1 -c "cd Iterations/Latest;rm Columnstore.xml;prompt OFF;mput Columnstore.xml" - smbclient //calweb/shared -Wcalpont -Uoamuser%Calpont1 -c "cd Iterations/nightly/genii-$DATE;prompt OFF;mput Columnstore.xml" -fi -} 2> /root/infinidb-build-$REL-$DIR.log -# -echo "Build Successfully Completed" -exit 0 diff --git a/tools/configMgt/dm_parent_installer.sh b/tools/configMgt/dm_parent_installer.sh deleted file mode 100755 index 57498924c..000000000 --- a/tools/configMgt/dm_parent_installer.sh +++ /dev/null @@ -1,194 +0,0 @@ -#!/usr/bin/expect -# -# $Id$ -# -# Parent OAM Installer, copy RPM's and custom OS files from postConfigure script -# Argument 0 - Parent OAM IP address -# Argument 1 - Root Password of Parent OAM Module -# Argument 2 - Calpont Config File -# Argument 3 - Debug flag 1 for on, 0 for off - -set SERVER [lindex $argv 0] -set PASSWORD [lindex $argv 1] -#set PACKAGE [lindex $argv 2] -set PACKAGE *.rpm -set RELEASE [lindex $argv 3] -set CONFIGFILE [lindex $argv 4] -set USERNAME [lindex $argv 5] -set CEFLAG [lindex $argv 6] -set PACKAGENAME [lindex $argv 7] -set INSTALLLOCATION [lindex $argv 8] -set DEBUG [lindex $argv 9] - -set INSTALLDIR "/usr/local" - -set SHARED "//srvhill01/shared" - -log_user $DEBUG -spawn -noecho /bin/bash - -set CONFIG "Calpont" -if { $PACKAGENAME != "columnstore"} { - set CONFIG "Calpont" -} - - -set timeout 10 -send "ssh $USERNAME@$SERVER 'rm -f /root/Calpont-*.rpm /root/$PACKAGENAME*.rpm'\n" -expect { - -re "authenticity" { send "yes\n" - expect { - -re "word: " { send "$PASSWORD\n" } - } - } - -re "service not known" { send_user "FAILED: Invalid Host\n" ; exit -1 } - -re "word: " { send "$PASSWORD\n" } -} -expect { - -re {[$#] } { } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } -} -# -# erase InfiniDB packages -# -set timeout 60 -send_user "Erase Old InfiniDB Packages " -send "ssh $USERNAME@$SERVER 'pkill -9 mysqld'\n" -expect -re "word: " -# password for ssh -send "$PASSWORD\n" -# check return -expect { - -re {[$#] } { } -} -send "ssh $USERNAME@$SERVER 'rpm -e --nodeps \$(rpm -qa | grep '^mariadb-columnstore') >/dev/null 2>&1; rpm -e --nodeps \$(rpm -qa | grep '^infinidb-')'\n" -expect -re "word: " -# password for ssh -send "$PASSWORD\n" -# check return -expect { - -re "uninstall completed" { } - -re {[$#] } { } - -re "not installed" { } - -re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ; exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } -} -sleep 10 -send "ssh $USERNAME@$SERVER 'rm -f $INSTALLDIR/$INSTALLLOCATION/releasenum >/dev/null 2>&1; test -x $INSTALLDIR/$INSTALLLOCATION/bin/pre-uninstall && $INSTALLDIR/$INSTALLLOCATION/bin/pre-uninstall'\n" -expect -re "word: " -# password for ssh -send "$PASSWORD\n" -# check return -expect { - -re {[$#] } { send_user "DONE" } - -re "uninstall completed" { send_user "DONE" } - -re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ; exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } -} -send_user "\n" -sleep 5 -# -# get the InfiniDB package -# -send_user "Get InfiniDB Packages " -send "smbclient $SHARED -WMARIADB -Uroot%Calpont1 -c 'cd packages/$RELEASE/;prompt OFF;mget $PACKAGE'\n" -expect { - -re "NT_STATUS_NO_SUCH_FILE" { send_user "FAILED: $PACKAGE not found\n" ; exit -1 } - -re "getting" { send_user "DONE" } -} -send_user "\n" -# -# send the InfiniDB package -# -set timeout 120 -send_user "Copy InfiniDB Packages " -send "scp -q $PACKAGE $USERNAME@$SERVER:/root/.\n" -expect -re "word: " -# password for ssh -send "$PASSWORD\n" -expect { - -re {[$#] } { send_user "DONE" } - -re "scp" { send_user "FAILED: SCP failure\n" ; exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } - -re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 } -} -send_user "\n" -#send "rm -f $PACKAGE\n" -# -# install InfiniDB package -# -send_user "Install New InfiniDB Packages " -send "ssh $USERNAME@$SERVER ' rpm -iv --nodeps --force $PACKAGENAME-*'\n" -expect -re "word: " -# password for ssh -send "$PASSWORD\n" -# check return -expect { - -re "completed" { expect { - -re "completed" { expect { - -re "completed" { send_user "DONE" } - } - } - } - } - -re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ; - send_user "\n*** Installation Failed\n" ; - exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } -} -send_user "\n" -set timeout 120 -expect -re {[$#] } -# -if { $CONFIGFILE != "NULL"} { - # - # copy over Columnstore.xml file - # - send "scp $CONFIGFILE $USERNAME@$SERVER:/usr/local/$INSTALLLOCATION/etc/$CONFIG.xml\n" - expect -re "word: " - # send the password - send "$PASSWORD\n" - expect { - -re "100%" { } - -re "scp" { send_user "FAILED: SCP failure\n" ; exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } - -re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 } - } - send_user "Copy InfiniDB Configuration File " - send "scp $CONFIGFILE $USERNAME@$SERVER:/usr/local/$INSTALLLOCATION/etc/$CONFIG.xml.rpmsave\n" - expect -re "word: " - # send the password - send "$PASSWORD\n" - expect { - -re "100%" { send_user "DONE"} - -re "scp" { send_user "FAILED: SCP failure\n" ; exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } - -re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 } - } - #do a dummy scp command - send "scp $CONFIGFILE $USERNAME@$SERVER:/tmp/$CONFIG.xml\n" - expect -re "word: " - # send the password - send "$PASSWORD\n" - expect { - -re "100%" { send_user " " } - } -} else { - # - # rename previous installed config file - # - send_user "Copy RPM-saved InfiniDB Configuration File " - send "ssh $USERNAME@$SERVER 'cd /usr/local/$INSTALLLOCATION/etc/;mv -f Columnstore.xml Columnstore.xml.install;cp -v Columnstore.xml.rpmsave Columnstore.xml'\n" - expect -re "word: " - # password for ssh - send "$PASSWORD\n" - # check return - expect { - -re "Columnstore.xml" { send_user "DONE" } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } - } -} -send_user "\n" -# -exit - diff --git a/tools/configMgt/dm_parent_installer_v3.sh b/tools/configMgt/dm_parent_installer_v3.sh deleted file mode 100755 index 8bb899705..000000000 --- a/tools/configMgt/dm_parent_installer_v3.sh +++ /dev/null @@ -1,191 +0,0 @@ -#!/usr/bin/expect -# -# $Id: parent_installer.sh 421 2007-04-05 15:46:55Z dhill $ -# -# Parent OAM Installer, copy RPM's and custom OS files from postConfigure script -# Argument 0 - Parent OAM IP address -# Argument 1 - Root Password of Parent OAM Module -# Argument 2 - Calpont Config File -# Argument 3 - Debug flag 1 for on, 0 for off - -set SERVER [lindex $argv 0] -set PASSWORD [lindex $argv 1] -set PACKAGE [lindex $argv 2] -set RELEASE [lindex $argv 3] -set CONFIGFILE [lindex $argv 4] -set USERNAME [lindex $argv 5] -set CEFLAG [lindex $argv 6] -set DEBUG [lindex $argv 7] - -set CALPONTPACKAGE calpont-$PACKAGE -set MYSQLPACKAGE calpont-mysql-$PACKAGE -set MYSQLDPACKAGE calpont-mysqld-$PACKAGE -set INSTALLDIR "/usr/local" - -#set SHARED "//cal6500/shared" -set SHARED "//calweb/shared" - -log_user $DEBUG -spawn -noecho /bin/bash -send "rm -f $CALPONTPACKAGE\n" -# -# delete and erase all old packages from Director Module -# -set timeout 10 -send "ssh $USERNAME@$SERVER 'rm -f /root/$CALPONTPACKAGE'\n" -expect { - -re "authenticity" { send "yes\n" - expect { - -re "word: " { send "$PASSWORD\n" } abort - } - } - -re "service not known" { send_user "FAILED: Invalid Host\n" ; exit -1 } - -re "word: " { send "$PASSWORD\n" } abort -} -expect { - -re "#" { } abort - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } -} -# -# erase calpont packages -# -set timeout 60 -send_user "Erase Old Calpont Packages " -send "ssh $USERNAME@$SERVER 'pkill -9 mysqld'\n" -expect -re "word: " -# password for ssh -send "$PASSWORD\n" -# check return -expect { - -re "# " { } abort -} -send "ssh $USERNAME@$SERVER 'rpm -e --nodeps \$(rpm -qa | grep '^calpont') >/dev/null 2>&1; rpm -e --nodeps \$(rpm -qa | grep '^infinidb-')'\n" -expect -re "word: " -# password for ssh -send "$PASSWORD\n" -# check return -expect { - -re "uninstall completed" { } abort - -re "# " { } abort - -re "not installed" { } abort - -re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ; exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } -} -sleep 10 -send "ssh $USERNAME@$SERVER 'rm -f $INSTALLDIR/Calpont/releasenum >/dev/null 2>&1; test -x $INSTALLDIR/Calpont/bin/pre-uninstall && $INSTALLDIR/Calpont/bin/pre-uninstall'\n" -expect -re "word: " -# password for ssh -send "$PASSWORD\n" -# check return -expect { - -re "# " { send_user "DONE" } abort - -re "uninstall completed" { send_user "DONE" } abort - -re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ; exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } -} -send_user "\n" -sleep 5 -# -# get the calpont package -# -send_user "Get Calpont Packages " -send "smbclient $SHARED -Wcalpont -Uoamuser%Calpont1 -c 'cd Iterations/$RELEASE/;prompt OFF;mget $PACKAGE'\n" -expect { - -re "NT_STATUS_NO_SUCH_FILE" { send_user "FAILED: $PACKAGE not found\n" ; exit -1 } - -re "getting" { send_user "DONE" } abort -} -send_user "\n" -# -# send the calpont package -# -send_user "Copy Calpont Packages " -send "scp -q $PACKAGE $USERNAME@$SERVER:/root/.\n" -expect -re "word: " -# password for ssh -send "$PASSWORD\n" -expect { - -re "#" { send_user "DONE" } abort - -re "scp" { send_user "FAILED: SCP failure\n" ; exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } - -re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 } -} -send_user "\n" -#send "rm -f $PACKAGE\n" -# -# install calpont package -# -set timeout 120 -send_user "Install New Calpont Packages " -send "ssh $USERNAME@$SERVER ' rpm -iv --nodeps /root/$CALPONTPACKAGE'\n" -expect -re "word: " -# password for ssh -send "$PASSWORD\n" -# check return -expect { - -re "completed" { expect { - -re "completed" { expect { - -re "completed" { send_user "DONE" } abort - } - } - } - } - -re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ; - send_user "\n*** Installation Failed\n" ; - exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } -} -send_user "\n" -set timeout 120 -expect -re "# " -# -if { $CONFIGFILE != "NULL"} { - # - # copy over Columnstore.xml file - # - send_user "Copy Calpont Configuration File " - send "scp $CONFIGFILE $USERNAME@$SERVER:/usr/local/mariadb/columnstore/etc/Columnstore.xml.rpmsave\n" - expect -re "word: " - # send the password - send "$PASSWORD\n" - expect { - -re "100%" { } abort - -re "scp" { send_user "FAILED: SCP failure\n" ; exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } - -re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 } - } - send "scp $CONFIGFILE $USERNAME@$SERVER:/usr/local/mariadb/columnstore/etc/Columnstore.xml\n" - expect -re "word: " - # send the password - send "$PASSWORD\n" - expect { - -re "100%" { send_user "DONE" } abort - -re "scp" { send_user "FAILED: SCP failure\n" ; exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } - -re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 } - } - send "scp $CONFIGFILE $USERNAME@$SERVER:/tmp/Columnstore.xml\n" - expect -re "word: " - # send the password - send "$PASSWORD\n" - expect { - -re "100%" { send_user " " } abort - } -} else { - # - # rename previous installed config file - # - send_user "Copy RPM-saved Calpont Configuration File " - send "ssh $USERNAME@$SERVER 'cd /usr/local/mariadb/columnstore/etc/;mv -f Columnstore.xml Columnstore.xml.install;cp -v Columnstore.xml.rpmsave Columnstore.xml'\n" - expect -re "word: " - # password for ssh - send "$PASSWORD\n" - # check return - expect { - -re "Columnstore.xml" { send_user "DONE" } abort - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } - } -} -send_user "\n" -# -exit - diff --git a/tools/configMgt/parent_binary_installer.sh b/tools/configMgt/parent_binary_installer.sh deleted file mode 100755 index dc87420e6..000000000 --- a/tools/configMgt/parent_binary_installer.sh +++ /dev/null @@ -1,215 +0,0 @@ -#!/usr/bin/expect -# -# $Id: parent_installer.sh 421 2007-04-05 15:46:55Z dhill $ -# -# Parent OAM Installer, copy RPM's and custom OS files from postConfigure script -# Argument 0 - Parent OAM IP address -# Argument 1 - Root Password of Parent OAM Module -# Argument 2 - Calpont Config File -# Argument 3 - Debug flag 1 for on, 0 for off - -set SERVER [lindex $argv 0] -set PASSWORD [lindex $argv 1] -set PACKAGE [lindex $argv 2] -set RELEASE [lindex $argv 3] -set CONFIGFILE [lindex $argv 4] -set USERNAME [lindex $argv 5] -set INSTALLDIR [lindex $argv 6] -set PACKAGENAME [lindex $argv 7] -set INSTALLLOCATION [lindex $argv 8] -set DEBUG [lindex $argv 9] - -set CALPONTPACKAGE infinidb-ent-*$PACKAGE - -set SHARED "//srvhill01/shared" - -set INSTALLDIRARG " " -set HOME "/root" -if { $USERNAME != "root" } { - set INSTALLDIRARG "--installdir=$INSTALLDIR/$INSTALLLOCATION" - set HOME $INSTALLDIR -} - -log_user $DEBUG -spawn -noecho /bin/bash -send "rm -f $PACKAGE\n" -# -# delete binary package on Parent OAM Module -# -set timeout 30 -send_user "Remove Calpont Packages from System " -send "ssh $USERNAME@$SERVER 'rm -f $INSTALLDIR/$INSTALLLOCATION*.gz;rm -f /root/$INSTALLLOCATION*.rpm;rm -f /root/$INSTALLLOCATION*.gz'\n" -expect { - -re "authenticity" { send "yes\n" - expect { - -re "word: " { send "$PASSWORD\n" } abort - } - } - -re "service not known" { send_user "FAILED: Invalid Host\n" ; exit -1 } - -re "word: " { send "$PASSWORD\n" } abort -} -expect { - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } -} -send_user "DONE\n" -# -# get the calpont package -# -send_user "Get Calpont Packages " -send "smbclient $SHARED -WMARIADB -Uroot%Calpont1 -c 'cd packages/$RELEASE/packages;prompt OFF;mget $PACKAGE'\n" -expect { - -re "NT_STATUS_NO_SUCH_FILE" { send_user "FAILED: $PACKAGE not found\n" ; exit -1 } - -re "getting" { send_user "DONE" } abort -} -send_user "\n" -# -# send the calpont package -# -send_user "Copy Calpont Packages " -send "scp $PACKAGE $USERNAME@$SERVER:$HOME/.\n" -expect -re "word: " -# password for ssh -send "$PASSWORD\n" -expect { - -re "100%" { send_user "DONE" } abort - -re "scp" { send_user "FAILED\n" ; - send_user "\n*** Installation Failed\n" ; - exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } - -re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 } -} -send_user "\n" -# -# uninstall calpont package -# -send_user "Erase Old Calpont Package " -send "ssh $USERNAME@$SERVER 'pkill -9 mysqld'\n" -expect -re "word: " -# password for ssh -send "$PASSWORD\n" -# check return -expect { - -re "# " { } abort -} -send "ssh $USERNAME@$SERVER 'rpm -e --nodeps \$(rpm -qa | grep '^calpont') >/dev/null 2>&1; rpm -e --nodeps \$(rpm -qa | grep '^infinidb-')'\n" -expect -re "word: " -# password for ssh -send "$PASSWORD\n" -# check return -expect { - -re "uninstall completed" { } abort - -re "# " { } abort - -re "not installed" { } abort - -re "Failed dependencies" { } abort - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } -} -sleep 10 -send "ssh $USERNAME@$SERVER 'rm -f $INSTALLDIR/$INSTALLLOCATION/releasenum >/dev/null 2>&1; test -x $INSTALLDIR/$INSTALLLOCATION/bin/pre-uninstall && $INSTALLDIR/$INSTALLLOCATION/bin/pre-uninstall $INSTALLDIRARG'\n" -expect -re "word: " -# password for ssh -send "$PASSWORD\n" -# check return -expect { - -re "# " { send_user "DONE" } abort - -re "uninstall completed" { send_user "DONE" } abort - -re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ; exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } -} -send_user "\n" -sleep 5 -# -# install calpont package -# -set timeout 30 -send_user "Install New Calpont Package " -send "ssh $USERNAME@$SERVER 'tar -C $INSTALLDIR --exclude db -zxf $HOME/$CALPONTPACKAGE;cat $INSTALLDIR/$INSTALLLOCATION/releasenum'\n" -expect -re "word: " -# password for ssh -send "$PASSWORD\n" -# check return -expect { - -re "completed" { send_user "DONE" } abort - -re "release=" { send_user "DONE" } abort - -re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ; - send_user "\n*** Installation Failed\n" ; - exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } - -re "exiting now" { send_user "FAILED: Error in tar command\n" ; exit -1 } - -} -send_user "\n" -set timeout 30 -send "rm -f $PACKAGE\n" -# -send_user "Run post-install script " -send " \n" -send date\n -send "ssh $USERNAME@$SERVER '$INSTALLDIR/$INSTALLLOCATION/bin/post-install $INSTALLDIRARG'\n" -set timeout 10 -expect { - -re "word: " { send "$PASSWORD\n" } abort - -re "passphrase" { send "$PASSWORD\n" } abort -} -set timeout 60 -# check return -expect { - -re "InfiniDB syslog logging not working" { send_user "ERROR: InfiniDB System logging not setup\n" ; exit 1 } - -re "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 } - -re "Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1} - -re "Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 } - -re "closed" { send_user "ERROR: Connection closed\n" ; exit 1 } - -re "No route to host" { send_user "ERROR: No route to host\n" ; exit 1 } - -re "postConfigure" { send_user "DONE" } abort - -re "# " { send_user "DONE" } abort -} -send_user "\n" -sleep 10 -# -if { $CONFIGFILE != "NULL"} { - # - # copy over $CONFIG.xml file - # - send_user "Copy Calpont Configuration File " - send "scp $CONFIGFILE $USERNAME@$SERVER:$INSTALLDIR/$INSTALLLOCATION/etc/$CONFIG.xml.rpmsave\n" - expect -re "word: " - # send the password - send "$PASSWORD\n" - expect { - -re "100%" { } abort - -re "scp" { send_user "FAILED\n" ; - send_user "\n*** Installation Failed\n" ; - exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } - -re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 } - } - send "scp $CONFIGFILE $USERNAME@$SERVER:$INSTALLDIR/$INSTALLLOCATION/etc/$CONFIG.xml\n" - expect -re "word: " - # send the password - send "$PASSWORD\n" - expect { - -re "100%" { send_user "DONE" } abort - -re "scp" { send_user "FAILED\n" ; - send_user "\n*** Installation Failed\n" ; - exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } - -re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 } - } -} else { - # - # rename previous installed config file - # - send_user "Copy RPM-saved Calpont Configuration File " - send "ssh $USERNAME@$SERVER 'cd $INSTALLDIR/$INSTALLLOCATION/etc/;mv -f $CONFIG.xml $CONFIG.xml.install;cp -v $CONFIG.xml.rpmsave $CONFIG.xml'\n" - expect -re "word: " - # password for ssh - send "$PASSWORD\n" - # check return - expect { - -re "$CONFIG.xml" { send_user "DONE" } abort - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } - } -} -send_user "\n" -# -exit - diff --git a/tools/configMgt/parent_binary_installer_v3.sh b/tools/configMgt/parent_binary_installer_v3.sh deleted file mode 100755 index 155004a90..000000000 --- a/tools/configMgt/parent_binary_installer_v3.sh +++ /dev/null @@ -1,212 +0,0 @@ -#!/usr/bin/expect -# -# $Id: parent_installer.sh 421 2007-04-05 15:46:55Z dhill $ -# -# Parent OAM Installer, copy RPM's and custom OS files from postConfigure script -# Argument 0 - Parent OAM IP address -# Argument 1 - Root Password of Parent OAM Module -# Argument 2 - Calpont Config File -# Argument 3 - Debug flag 1 for on, 0 for off - -set SERVER [lindex $argv 0] -set PASSWORD [lindex $argv 1] -set PACKAGE [lindex $argv 2] -set RELEASE [lindex $argv 3] -set CONFIGFILE [lindex $argv 4] -set USERNAME [lindex $argv 5] -set INSTALLDIR [lindex $argv 6] -set DEBUG [lindex $argv 7] - -set CALPONTPACKAGE calpont-infinidb-ent-*$PACKAGE - -set SHARED "//calweb/shared" - -set INSTALLDIRARG " " -set HOME "/root" -if { $USERNAME != "root" } { - set INSTALLDIRARG "--installdir=$INSTALLDIR/Calpont" - set HOME $INSTALLDIR -} - -log_user $DEBUG -spawn -noecho /bin/bash -send "rm -f $PACKAGE\n" -# -# delete binary package on Parent OAM Module -# -set timeout 30 -send_user "Remove Calpont Packages from System " -send "ssh $USERNAME@$SERVER 'rm -f $INSTALLDIR/calpont*.gz;rm -f /root/calpont*.rpm;rm -f /root/calpont*.gz'\n" -expect { - -re "authenticity" { send "yes\n" - expect { - -re "word: " { send "$PASSWORD\n" } abort - } - } - -re "service not known" { send_user "FAILED: Invalid Host\n" ; exit -1 } - -re "word: " { send "$PASSWORD\n" } abort -} -expect { - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } -} -send_user "DONE\n" -# -# get the calpont package -# -send_user "Get Calpont Packages " -send "smbclient $SHARED -Wcalpont -Uoamuser%Calpont1 -c 'cd Iterations/$RELEASE/packages;prompt OFF;mget $PACKAGE'\n" -expect { - -re "NT_STATUS_NO_SUCH_FILE" { send_user "FAILED: $PACKAGE not found\n" ; exit -1 } - -re "getting" { send_user "DONE" } abort -} -send_user "\n" -# -# send the calpont package -# -send_user "Copy Calpont Packages " -send "scp $PACKAGE $USERNAME@$SERVER:$HOME/.\n" -expect -re "word: " -# password for ssh -send "$PASSWORD\n" -expect { - -re "100%" { send_user "DONE" } abort - -re "scp" { send_user "FAILED\n" ; - send_user "\n*** Installation Failed\n" ; - exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } - -re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 } -} -send_user "\n" -# -# uninstall calpont package -# -send_user "Erase Old Calpont Package " -send "ssh $USERNAME@$SERVER 'pkill -9 mysqld'\n" -expect -re "word: " -# password for ssh -send "$PASSWORD\n" -# check return -expect { - -re "# " { } abort -} -send "ssh $USERNAME@$SERVER 'rpm -e --nodeps \$(rpm -qa | grep '^calpont') >/dev/null 2>&1; rpm -e --nodeps \$(rpm -qa | grep '^infinidb-')'\n"expect -re "word: " -# password for ssh -send "$PASSWORD\n" -# check return -expect { - -re "uninstall completed" { } abort - -re "# " { } abort - -re "not installed" { } abort - -re "Failed dependencies" { } abort - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } -} -sleep 10 -send "ssh $USERNAME@$SERVER 'rm -f $INSTALLDIR/Calpont/releasenum >/dev/null 2>&1; test -x $INSTALLDIR/Calpont/bin/pre-uninstall && $INSTALLDIR/Calpont/bin/pre-uninstall $INSTALLDIRARG'\n" -expect -re "word: " -# password for ssh -send "$PASSWORD\n" -# check return -expect { - -re "# " { send_user "DONE" } abort - -re "uninstall completed" { send_user "DONE" } abort - -re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ; exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } -} -send_user "\n" -sleep 5 -# -# install calpont package -# -set timeout 30 -send_user "Install New Calpont Package " -send "ssh $USERNAME@$SERVER 'tar -C $INSTALLDIR --exclude db -zxf $HOME/$CALPONTPACKAGE;cat $INSTALLDIR/Calpont/releasenum'\n" -expect -re "word: " -# password for ssh -send "$PASSWORD\n" -# check return -expect { - -re "completed" { send_user "DONE" } abort - -re "release=" { send_user "DONE" } abort - -re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ; - send_user "\n*** Installation Failed\n" ; - exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } - -re "exiting now" { send_user "FAILED: Error in tar command\n" ; exit -1 } - -} -send_user "\n" -set timeout 30 -send "rm -f $PACKAGE\n" -# -send_user "Run post-install script " -send " \n" -send date\n -send "ssh $USERNAME@$SERVER '$INSTALLDIR/Calpont/bin/post-install $INSTALLDIRARG'\n" -set timeout 10 -expect { - -re "word: " { send "$PASSWORD\n" } abort - -re "passphrase" { send "$PASSWORD\n" } abort -} -set timeout 60 -# check return -expect { - -re "InfiniDB syslog logging not working" { send_user "ERROR: InfiniDB System logging not setup\n" ; exit 1 } - -re "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 } - -re "Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1} - -re "Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 } - -re "closed" { send_user "ERROR: Connection closed\n" ; exit 1 } - -re "No route to host" { send_user "ERROR: No route to host\n" ; exit 1 } - -re "postConfigure" { send_user "DONE" } abort - -re "# " { send_user "DONE" } abort -} -send_user "\n" -sleep 10 -# -if { $CONFIGFILE != "NULL"} { - # - # copy over Columnstore.xml file - # - send_user "Copy Calpont Configuration File " - send "scp $CONFIGFILE $USERNAME@$SERVER:$INSTALLDIR/Calpont/etc/Columnstore.xml.rpmsave\n" - expect -re "word: " - # send the password - send "$PASSWORD\n" - expect { - -re "100%" { } abort - -re "scp" { send_user "FAILED\n" ; - send_user "\n*** Installation Failed\n" ; - exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } - -re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 } - } - send "scp $CONFIGFILE $USERNAME@$SERVER:$INSTALLDIR/Calpont/etc/Columnstore.xml\n" - expect -re "word: " - # send the password - send "$PASSWORD\n" - expect { - -re "100%" { send_user "DONE" } abort - -re "scp" { send_user "FAILED\n" ; - send_user "\n*** Installation Failed\n" ; - exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } - -re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 } - } -} else { - # - # rename previous installed config file - # - send_user "Copy RPM-saved Calpont Configuration File " - send "ssh $USERNAME@$SERVER 'cd $INSTALLDIR/Calpont/etc/;mv -f Columnstore.xml Columnstore.xml.install;cp -v Columnstore.xml.rpmsave Columnstore.xml'\n" - expect -re "word: " - # password for ssh - send "$PASSWORD\n" - # check return - expect { - -re "Columnstore.xml" { send_user "DONE" } abort - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } - } -} -send_user "\n" -# -exit - diff --git a/tools/configMgt/pm_parent_installer.sh b/tools/configMgt/pm_parent_installer.sh deleted file mode 100755 index c8e135b9b..000000000 --- a/tools/configMgt/pm_parent_installer.sh +++ /dev/null @@ -1,188 +0,0 @@ -#!/usr/bin/expect -# -# $Id: parent_installer.sh 421 2007-04-05 15:46:55Z dhill $ -# -# Parent OAM Installer, copy RPM's and custom OS files from postConfigure script -# Argument 0 - Parent OAM IP address -# Argument 1 - Root Password of Parent OAM Module -# Argument 2 - Calpont Config File -# Argument 3 - Debug flag 1 for on, 0 for off - -set USERNAME root -set SERVER [lindex $argv 0] -set PASSWORD [lindex $argv 1] -#set PACKAGE [lindex $argv 2] -set PACKAGE *.rpm -set RELEASE [lindex $argv 3] -set CONFIGFILE [lindex $argv 4] -set PREFIX [lindex $argv 5] -set USERNAME [lindex $argv 6] -set PACKAGENAME [lindex $argv 7] -set INSTALLLOCATION [lindex $argv 8] -set DEBUG [lindex $argv 9] - -set SHARED "//srvhill01/shared" -set INSTALLDIR "/usr/local" - -log_user $DEBUG -spawn -noecho /bin/bash - -set CONFIG "Calpont" -if { $PACKAGENAME != "columnstore"} { - set CONFIG "Calpont" -} - -send "rm -f $PACKAGE\n" -# -# delete and erase all old packages from Parent OAM Module -# -set timeout 30 -send "ssh $USERNAME@$SERVER 'rm -f /root/Calpont-*.rpm /root/$PACKAGENAME*.rpm /root/mariadb*.rpm '\n" -expect { - -re "authenticity" { send "yes\n" - expect { - -re "word: " { send "$PASSWORD\n" } - } - } - -re "service not known" { send_user "FAILED: Invalid Host\n" ; exit -1 } - -re "word: " { send "$PASSWORD\n" } -} -expect { - -re {[$#] } { } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } -} -# -# get the InfiniDB package -# -expect -re {[$#] } -send_user "Get InfiniDB Packages " -send "smbclient $SHARED -WMARIADB -Uroot%Calpont1 -c 'cd packages/$RELEASE/;prompt OFF;mget $PACKAGE'\n" -expect { - -re "NT_STATUS_NO_SUCH_FILE" { send_user "FAILED: $PACKAGE not found\n" ; exit -1 } - -re "getting" { send_user "DONE" } -} -send_user "\n" -# -# send the InfiniDB package -# -set timeout 120 -send_user "Copy InfiniDB Packages " -send "scp -q $PACKAGE $USERNAME@$SERVER:/root/.\n" -expect -re "word: " -# password for ssh -send "$PASSWORD\n" -expect { - -re {[$#] } { send_user "DONE" } - -re "scp" { send_user "FAILED: SCP failure\n" ; exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } - -re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 } -} -send_user "\n" -#send "rm -f $PACKAGE\n" -# -# erase InfiniDB package -# -set timeout 60 -expect -re {[$#] } -send_user "Erase Old InfiniDB Package " -send "ssh $USERNAME@$SERVER 'rpm -e --nodeps \$(rpm -qa | grep '^mariadb-columnstore') >/dev/null 2>&1; rpm -e --nodeps \$(rpm -qa | grep '^infinidb-')'\n" -expect -re "word: " -# password for ssh -send "$PASSWORD\n" -# check return -expect { - -re "uninstall completed" { } - -re {[$#] } { } - -re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ; exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } -} -sleep 10 -send "ssh $USERNAME@$SERVER 'rm -f $INSTALLDIR/$INSTALLLOCATION/releasenum >/dev/null 2>&1; test -x $INSTALLDIR/$INSTALLLOCATION/bin/pre-uninstall && $INSTALLDIR/$INSTALLLOCATION/bin/pre-uninstall'\n" -expect -re "word: " -# password for ssh -send "$PASSWORD\n" -# check return -expect { - -re {[$#] } { send_user "DONE" } - -re "uninstall completed" { send_user "DONE" } - -re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ; exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } -} -send_user "\n" -sleep 5 -# -# install InfiniDB package -# -set timeout 160 -send_user "Install New InfiniDB Packages " -send "ssh $USERNAME@$SERVER ' rpm -ivh --nodeps --force $PACKAGENAME-*'\n" -expect -re "word: " -# password for ssh -send "$PASSWORD\n" -# check return -expect { - -re "completed" { send_user "DONE" } - -re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ; - send_user "\n*** Installation Failed\n" ; - exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } - -re "File not found" { send_user "FAILED: File not found\n" ; exit -1 } -} -send_user "\n" -set timeout 120 -expect -re {[$#] } -send "rm -f $PACKAGE\n" -# -if { $CONFIGFILE != "NULL"} { - send "scp $CONFIGFILE $USERNAME@$SERVER:/usr/local/$INSTALLLOCATION/etc/$CONFIG.xml\n" - expect -re "word: " - # send the password - send "$PASSWORD\n" - expect { - -re "100%" { } - -re "scp" { send_user "FAILED: SCP failure\n" ; exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } - -re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 } - } - # - # copy over $CONFIG.xml file - # - send_user "Copy InfiniDB Configuration File " - send "scp $CONFIGFILE $USERNAME@$SERVER:/usr/local/$INSTALLLOCATION/etc/$CONFIG.xml.rpmsave\n" - expect -re "word: " - # send the password - send "$PASSWORD\n" - expect { - -re "100%" { send_user "DONE" } - -re "scp" { send_user "FAILED: SCP failure\n" ; exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } - -re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 } - } - #do a dummy scp command - send "scp $CONFIGFILE $USERNAME@$SERVER:/tmp/$CONFIG.xml\n" - expect -re "word: " - # send the password - send "$PASSWORD\n" - expect { - -re "100%" { send_user " " } - } -} else { - # - # rename previous installed config file - # - send_user "Copy RPM-saved InfiniDB Configuration File " - send "ssh $USERNAME@$SERVER 'cd /usr/local/$INSTALLLOCATION/etc/;mv -f $CONFIG.xml $CONFIG.xml.install;cp -v $CONFIG.xml.rpmsave $CONFIG.xml'\n" - expect -re "word: " - # password for ssh - send "$PASSWORD\n" - # check return - expect { - -re "$CONFIG.xml" { send_user "DONE" } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } - } -} -send_user "\n" -expect -re {[$#] } -# -exit - diff --git a/tools/configMgt/pm_parent_installer_v3.sh b/tools/configMgt/pm_parent_installer_v3.sh deleted file mode 100755 index 88931ba38..000000000 --- a/tools/configMgt/pm_parent_installer_v3.sh +++ /dev/null @@ -1,179 +0,0 @@ -#!/usr/bin/expect -# -# $Id: parent_installer.sh 421 2007-04-05 15:46:55Z dhill $ -# -# Parent OAM Installer, copy RPM's and custom OS files from postConfigure script -# Argument 0 - Parent OAM IP address -# Argument 1 - Root Password of Parent OAM Module -# Argument 2 - Calpont Config File -# Argument 3 - Debug flag 1 for on, 0 for off - -set USERNAME root -set SERVER [lindex $argv 0] -set PASSWORD [lindex $argv 1] -set PACKAGE [lindex $argv 2] -set RELEASE [lindex $argv 3] -set CONFIGFILE [lindex $argv 4] -set PREFIX [lindex $argv 5] -set USERNAME [lindex $argv 6] -set DEBUG [lindex $argv 7] - -set CALPONTPACKAGE calpont-$PREFIX$PACKAGE -set MYSQLPACKAGE calpont-mysql-$PACKAGE -set MYSQLDPACKAGE calpont-mysqld-$PACKAGE -#set SHARED "//cal6500/shared" -set SHARED "//calweb/shared" -set INSTALLDIR "/usr/local" - -log_user $DEBUG -spawn -noecho /bin/bash -send "rm -f $PACKAGE\n" -# -# delete and erase all old packages from Parent OAM Module -# -set timeout 30 -send "ssh $USERNAME@$SERVER 'rm -f /root/calpont*.rpm /root/infinidb*.rpm'\n" -expect { - -re "authenticity" { send "yes\n" - expect { - -re "word: " { send "$PASSWORD\n" } abort - } - } - -re "service not known" { send_user "FAILED: Invalid Host\n" ; exit -1 } - -re "word: " { send "$PASSWORD\n" } abort -} -expect { - -re "#" { } abort - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } -} -# -# get the calpont package -# -expect -re "# " -send_user "Get Calpont Packages " -send "smbclient $SHARED -Wcalpont -Uoamuser%Calpont1 -c 'cd Iterations/$RELEASE/;prompt OFF;mget $PACKAGE'\n" -expect { - -re "NT_STATUS_NO_SUCH_FILE" { send_user "FAILED: $PACKAGE not found\n" ; exit -1 } - -re "getting" { send_user "DONE" } abort -} -send_user "\n" -# -# send the calpont package -# -send_user "Copy Calpont Packages " -send "scp -q $PACKAGE $USERNAME@$SERVER:/root/.\n" -expect -re "word: " -# password for ssh -send "$PASSWORD\n" -expect { - -re "#" { send_user "DONE" } abort - -re "scp" { send_user "FAILED: SCP failure\n" ; exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } - -re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 } -} -send_user "\n" -#send "rm -f $PACKAGE\n" -# -# erase calpont package -# -expect -re "# " -send_user "Erase Old Calpont Package " -send "ssh $USERNAME@$SERVER 'rpm -e --nodeps \$(rpm -qa | grep '^calpont') >/dev/null 2>&1; rpm -e --nodeps \$(rpm -qa | grep '^infinidb-')'\n" -expect -re "word: " -# password for ssh -send "$PASSWORD\n" -# check return -expect { - -re "uninstall completed" { } abort - -re "# " { } abort - -re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ; exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } -} -sleep 10 -send "ssh $USERNAME@$SERVER 'rm -f $INSTALLDIR/Calpont/releasenum >/dev/null 2>&1; test -x $INSTALLDIR/Calpont/bin/pre-uninstall && $INSTALLDIR/Calpont/bin/pre-uninstall'\n" -expect -re "word: " -# password for ssh -send "$PASSWORD\n" -# check return -expect { - -re "# " { send_user "DONE" } abort - -re "uninstall completed" { send_user "DONE" } abort - -re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ; exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } -} -send_user "\n" -sleep 5 -# -# install calpont package -# -set timeout 160 -send_user "Install New Calpont Package " -send "ssh $USERNAME@$SERVER ' rpm -ivh --nodeps /root/$CALPONTPACKAGE'\n" -expect -re "word: " -# password for ssh -send "$PASSWORD\n" -# check return -expect { - -re "completed" { send_user "DONE" } abort - -re "Failed dependencies" { send_user "FAILED: Failed dependencies\n" ; - send_user "\n*** Installation Failed\n" ; - exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } -} -send_user "\n" -set timeout 120 -expect -re "# " -send "rm -f $PACKAGE\n" -# -if { $CONFIGFILE != "NULL"} { - # - # copy over Columnstore.xml file - # - send_user "Copy Calpont Configuration File " - send "scp $CONFIGFILE $USERNAME@$SERVER:/usr/local/mariadb/columnstore/etc/Columnstore.xml.rpmsave\n" - expect -re "word: " - # send the password - send "$PASSWORD\n" - expect { - -re "100%" { } abort - -re "scp" { send_user "FAILED: SCP failure\n" ; exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } - -re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 } - } - send "scp $CONFIGFILE $USERNAME@$SERVER:/usr/local/mariadb/columnstore/etc/Columnstore.xml\n" - expect -re "word: " - # send the password - send "$PASSWORD\n" - expect { - -re "100%" { send_user "DONE" } abort - -re "scp" { send_user "FAILED: SCP failure\n" ; exit -1 } - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } - -re "No such file or directory" { send_user "FAILED: Invalid package\n" ; exit -1 } - } - send "scp $CONFIGFILE $USERNAME@$SERVER:/tmp/Columnstore.xml\n" - expect -re "word: " - # send the password - send "$PASSWORD\n" - expect { - -re "100%" { send_user " " } abort - } -} else { - # - # rename previous installed config file - # - send_user "Copy RPM-saved Calpont Configuration File " - send "ssh $USERNAME@$SERVER 'cd /usr/local/mariadb/columnstore/etc/;mv -f Columnstore.xml Columnstore.xml.install;cp -v Columnstore.xml.rpmsave Columnstore.xml'\n" - expect -re "word: " - # password for ssh - send "$PASSWORD\n" - # check return - expect { - -re "Columnstore.xml" { send_user "DONE" } abort - -re "Permission denied, please try again" { send_user "FAILED: Invalid password\n" ; exit -1 } - } -} -send_user "\n" -expect -re "# " -# -exit - diff --git a/tools/configMgt/stackReleaseChecker.cpp b/tools/configMgt/stackReleaseChecker.cpp deleted file mode 100644 index 404aff92a..000000000 --- a/tools/configMgt/stackReleaseChecker.cpp +++ /dev/null @@ -1,177 +0,0 @@ -/* Copyright (C) 2014 InfiniDB, Inc. - Copyright (C) 2016 MariaDB Corporaton - - 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: stackReleaseChecker.cpp 64 2006-10-12 22:21:51Z dhill $ -* -* -* List of files being updated by configure: -* Calpont/etc/Columnstore.xml -* -* -******************************************************************************************/ -/** - * @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" -#include "configcpp.h" - -using namespace std; -using namespace oam; -using namespace config; - -int main(int argc, char *argv[]) -{ - Oam oam; - string systemUser = "root"; - string installParentModuleHostName; - string password; - string debug_flag = "1"; - string systemName = "all"; - bool VERBOSE = false; - - Config* sysConfig = Config::makeConfig("./systems/CalpontSystems.xml"); - - for( int i = 1; i < argc; i++ ) - { - if( string("-h") == argv[i] ) { - cout << endl; - cout << "'stackReleaseChecker' retrieves and prints the release installed on a stack." << endl; - cout << endl; - cout << "The list of systems are located in './systems/CalpontSystems.xml" << endl; - cout << endl; - cout << "Usage: stackReleaseChecker [-h][-s system][-v]" << endl; - cout << " -s system-name or leave blank for all systems" << endl; - cout << " -v verbose will give the version numbers" << endl; - exit (0); - } - else if( string("-s") == argv[i] ) { - i++; - if ( argc == i ) { - cout << "ERROR: missing system argument" << endl; - exit(-1); - } - systemName = argv[i]; - } - else if( string("-v") == argv[i] ) - VERBOSE = true; - } - - int systemCount; - try { - systemCount = strtol(sysConfig->getConfig("NetworkConfig", "SystemCount").c_str(), 0, 0); - if ( systemCount == 0 ) { - cout << "ERROR: SystemCount in ./systems/CalpontSystems.xml equal to 0" << endl; - exit(-1); - } - } - catch(...) - { - cout << "ERROR: Problem getting SystemCount from ./systems/CalpontSystems.xml" << endl; - exit(-1); - } - - bool FOUND = false; - for ( int i = 1 ; i < systemCount+1 ; i++) - { - string SystemName = "SystemName" + oam.itoa(i); - string oamParentModule = "OAMParentModule" + oam.itoa(i); - string SystemPassword = "SystemPassword" + oam.itoa(i); - string SystemUser = "SystemUser" + oam.itoa(i); - - string tempSystem; - try { - tempSystem = sysConfig->getConfig("NetworkConfig", SystemName ); - } - catch(...) - { - cout << "ERROR: Problem getting SystemName from ./systems/CalpontSystems.xml" << endl; - exit(-1); - } - - if ( tempSystem == systemName || systemName == "all") { - try { - installParentModuleHostName = sysConfig->getConfig("NetworkConfig", oamParentModule ); - password = sysConfig->getConfig("NetworkConfig", SystemPassword ); - systemUser = sysConfig->getConfig("NetworkConfig", SystemUser ); - FOUND = true; - } - catch(...) - { - cout << "ERROR: Problem getting SystemName from ./systems/CalpontSystems.xml" << endl; - exit(-1); - } - - if ( tempSystem == "unassigned") - continue; - - //get if root or no-root user install - string installDir = "/usr/local"; - if ( systemUser != "root" ) - installDir = "/home/" + systemUser; - - installDir = installDir + "/Calpont"; - - string cmd; - if (!VERBOSE) - cmd = "./remote_command.sh " + installParentModuleHostName + " " + systemUser + " " + password + " 'cat " + installDir + "/releasenum' 'release=' cat: 10 " + debug_flag; - else - cmd = "./remote_command.sh " + installParentModuleHostName + " " + systemUser + " " + password + " '" + installDir + "/bin/mcsadmin getcalpontsoftware' 'tools' Error 10 " + debug_flag; - - cout << "***** Calpont InfiniDB Package Release Information for stack '" << tempSystem << "' *****" << endl << endl; - - system(cmd.c_str()); - - cout << endl; - - cout << "***** Status of stack '" << tempSystem << "' *****" << endl << endl; - - cmd = "./remote_command.sh " + installParentModuleHostName + " " + systemUser + " " + password + " '" + installDir + "/bin/mcsadmin getsystems' dummy Error 10 " + debug_flag; - - system(cmd.c_str()); - - cout << endl << endl; - } - } - - if ( !FOUND ) { - cout << "ERROR: System Name '" + systemName + "' not in ./systems/CalpontSystems.xml" << endl; - exit(-1); - } -} diff --git a/utils/configcpp/libconfigcpp.vcxproj b/utils/configcpp/libconfigcpp.vcxproj index 4856a76cd..4f7510e5f 100644 --- a/utils/configcpp/libconfigcpp.vcxproj +++ b/utils/configcpp/libconfigcpp.vcxproj @@ -272,7 +272,7 @@ - + @@ -300,4 +300,4 @@ - \ No newline at end of file + diff --git a/utils/configcpp/libconfigcpp.vcxproj.filters b/utils/configcpp/libconfigcpp.vcxproj.filters index 33ce5c88d..706be8841 100644 --- a/utils/configcpp/libconfigcpp.vcxproj.filters +++ b/utils/configcpp/libconfigcpp.vcxproj.filters @@ -41,7 +41,7 @@ Header Files - + Header Files @@ -56,4 +56,4 @@ Resource Files - \ No newline at end of file +