diff --git a/Makefile.tar b/Makefile.tar index 59bb67d34..4e6cff933 100644 Binary files a/Makefile.tar and b/Makefile.tar differ diff --git a/build/Doxyfile b/build/Doxyfile new file mode 100644 index 000000000..db68c3d8b --- /dev/null +++ b/build/Doxyfile @@ -0,0 +1,275 @@ +# Doxyfile 1.4.1-KDevelop + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +PROJECT_NAME = build.kdevelop +PROJECT_NUMBER = $VERSION$ +OUTPUT_DIRECTORY = +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English +USE_WINDOWS_ENCODING = NO +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = /home/dhill/InfiniDB_MariaDB/oam/install_scripts/ +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +DETAILS_AT_TOP = NO +INHERIT_DOCS = YES +DISTRIBUTE_GROUP_DOC = NO +TAB_SIZE = 8 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = NO +OPTIMIZE_OUTPUT_JAVA = NO +SUBGROUPING = YES +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = NO +EXTRACT_PRIVATE = NO +EXTRACT_STATIC = NO +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = YES +HIDE_SCOPE_NAMES = NO +SHOW_INCLUDE_FILES = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = NO +SORT_BY_SCOPE_NAME = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_DIRECTORIES = YES +FILE_VERSION_FILTER = +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = /home/dhill/InfiniDB_MariaDB/build +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.idl \ + *.odl \ + *.cs \ + *.php \ + *.php3 \ + *.inc \ + *.m \ + *.mm \ + *.dox \ + *.C \ + *.CC \ + *.C++ \ + *.II \ + *.I++ \ + *.H \ + *.HH \ + *.H++ \ + *.CS \ + *.PHP \ + *.PHP3 \ + *.M \ + *.MM \ + *.C \ + *.H \ + *.tlh \ + *.diff \ + *.patch \ + *.moc \ + *.xpm \ + *.dox +RECURSIVE = yes +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = * +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = NO +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES +VERBATIM_HEADERS = YES +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = NO +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +BINARY_TOC = NO +TOC_EXPAND = NO +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = NO +TREEVIEW_WIDTH = 250 +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = YES +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = NO +USE_PDFLATEX = NO +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = yes +XML_OUTPUT = xml +XML_SCHEMA = +XML_DTD = +XML_PROGRAMLISTING = YES +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = build.tag +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = NO +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +GROUP_GRAPHS = YES +UML_LOOK = NO +TEMPLATE_RELATIONS = NO +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +CALL_GRAPH = NO +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = png +DOT_PATH = +DOTFILE_DIRS = +MAX_DOT_GRAPH_WIDTH = 1024 +MAX_DOT_GRAPH_HEIGHT = 1024 +MAX_DOT_GRAPH_DEPTH = 1000 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO diff --git a/build/build.kdevelop b/build/build.kdevelop new file mode 100644 index 000000000..a4facc59e --- /dev/null +++ b/build/build.kdevelop @@ -0,0 +1,77 @@ + + + + + dhill@srvhill04.calpont.com + $VERSION$ + KDevCustomProject + C + + + + + + build + + + + + + + + + + ada + ada_bugs_gcc + bash + bash_bugs + clanlib + fortran_bugs_gcc + gnome1 + gnustep + gtk + gtk_bugs + haskell + haskell_bugs_ghc + java_bugs_gcc + java_bugs_sun + kde2book + libstdc++ + opengl + pascal_bugs_fp + php + php_bugs + perl + perl_bugs + python + python_bugs + qt-kdev3 + ruby + ruby_bugs + sdl + stl + sw + w3c-dom-level2-html + w3c-svg + w3c-uaag10 + wxwidgets_bugs + + + Guide to the Qt Translation Tools + Qt Assistant Manual + Qt Designer Manual + Qt Reference Documentation + qmake User Guide + + + KDE Libraries (Doxygen) + + + + + + + + + + diff --git a/build/build_rpms b/build/build_rpms index 4950f4582..c2e412612 100755 --- a/build/build_rpms +++ b/build/build_rpms @@ -18,7 +18,7 @@ for arg in "$@"; do if [ `expr -- "$arg" : '--verbose'` -eq 9 ]; then ((verbose++)) elif [ `expr -- "$arg" : '--local-mysql'` -eq 13 ]; then - mysqldir=../Calpont/mysql + mysqldir=../MariaDB/Columnstore/mysql elif [ `expr -- "$arg" : '--help'` -eq 6 ]; then usage exit 0 @@ -45,23 +45,23 @@ fi . ./build/releasenum # make the install package -buildroot=$HOME/rpm/BUILD/infinidb-$version-$release +buildroot=$HOME/rpm/BUILD/columnstore-$version-$release rm -rf $buildroot mkdir -p $buildroot echo -n "Writing binary files to $buildroot..." tar -cf - --exclude 'export/include' --exclude 'export/*.tar' export | tar -C $buildroot -xf - -mv $buildroot/export $buildroot/Calpont +mv $buildroot/export $buildroot/MariaDB/Columnstore #get mysql server files pushd $mysqldir > /dev/null -mkdir -p $buildroot/Calpont/mysql -cpio -pdmu --quiet $buildroot/Calpont/mysql < files.lst +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/Calpont/etc/Doxyfile -for file in $buildroot/Calpont/lib/*; do +rm -f $buildroot/MariaDB/Columnstore/etc/Doxyfile +for file in $buildroot/MariaDB/Columnstore/lib/*; do if [ -h $file ]; then rm -f $file fi @@ -69,16 +69,16 @@ done #temporarily clean up these BRM thingies for file in dbrm script-fcns; do - rm -f $buildroot/Calpont/bin/$file + 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/Calpont/bin/$file + rm -f $buildroot/MariaDB/Columnstore/bin/$file done -rm -f $buildroot/Calpont/lib/libidbboot.a -rm -f $buildroot/Calpont/lib/libiberty.a +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 @@ -103,16 +103,16 @@ b="$b\\n$l" done echo $b )` -cp ./build/infinidb.spec.in $HOME/rpm/SPECS/infinidb.spec +cp ./build/columnstore.spec.in $HOME/rpm/SPECS/columnstore.spec sed -i -e "s/@@PACKAGER@@/Packager: $packager/" \ -e "s/@@VERSION@@/Version: $version/" \ -e "s/@@RELEASE@@/Release: $release/" \ - -e "s?@@BUILDINFO@@?$buildinfo?" $HOME/rpm/SPECS/infinidb.spec + -e "s?@@BUILDINFO@@?$buildinfo?" $HOME/rpm/SPECS/columnstore.spec echo done. echo -n "Building rpms..." -rpmbuild -ba $HOME/rpm/SPECS/infinidb.spec >/tmp/rpmbuild.out.$$ 2>&1 +rpmbuild -ba $HOME/rpm/SPECS/columnstore.spec >/tmp/rpmbuild.out.$$ 2>&1 rc=$? echo done. if [ $verbose -gt 0 -o $rc -ne 0 ]; then diff --git a/build/build_rpms~ b/build/build_rpms~ new file mode 100755 index 000000000..4950f4582 --- /dev/null +++ b/build/build_rpms~ @@ -0,0 +1,125 @@ +#!/bin/bash +# +# $Id: build_rpms 1734 2012-10-25 18:07:16Z dhill $ +# + +verbose=0 +mysqldir=$HOME/MariaDB_InfiniDB/export/mysql + +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/infinidb-$version-$release + +rm -rf $buildroot +mkdir -p $buildroot +echo -n "Writing binary files to $buildroot..." +tar -cf - --exclude 'export/include' --exclude 'export/*.tar' export | tar -C $buildroot -xf - +mv $buildroot/export $buildroot/Calpont + +#get mysql server files +pushd $mysqldir > /dev/null +mkdir -p $buildroot/Calpont/mysql +cpio -pdmu --quiet $buildroot/Calpont/mysql < files.lst +popd >/dev/null + +#clean up some files from buildroot +rm -f $buildroot/Calpont/etc/Doxyfile +for file in $buildroot/Calpont/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/Calpont/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/Calpont/bin/$file +done + +rm -f $buildroot/Calpont/lib/libidbboot.a +rm -f $buildroot/Calpont/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/columnstore.spec.in b/build/columnstore.spec.in new file mode 100644 index 000000000..e2776558e --- /dev/null +++ b/build/columnstore.spec.in @@ -0,0 +1,465 @@ +# +# $Id$ +# +Summary: MariaDB-Columnstore software +Name: columnstore +@@VERSION@@ +@@RELEASE@@ +Vendor: MariaDB, Inc. +URL: http://www.mariadb.com/ +@@PACKAGER@@ +Group: Applications +License: Copyright (c) 2016 MariaDB, Inc., all rights reserved; redistributable under the terms of the GPL, see the file COPYING for details. +BuildRoot: %{_tmppath}/%{name}-%{release}-buildroot + +%description +MariaDB-Columnstore software meta-package + +%package platform +Summary: MariaDB-Columnstore software binaries +Group: Applications +Requires: expect, columnstore-libs + +%description platform +MariaDB-Columnstore binary files +@@BUILDINFO@@ + +%package libs +Summary: MariaDB-Columnstore software libraries +Group: Applications + +%description libs +MariaDB-Columnstore libraries + +%package enterprise +Summary: InfiniDB Enterprise software binaries +Group: Applications +Requires: columnstore-libs, columnstore-platform +License: Proprietary; Copyright (c) 2016 MariaDB, Inc., all rights reserved + +%description enterprise +InfiniDB Enterprise binary files + +%package storage-engine +Summary: MariaDB-Columnstore software MariaDB connector +Group: Applications +Obsoletes: columnstore-mysql +Requires: columnstore-libs + +%description storage-engine +MariaDB Columnstore connector binary files + +%prep +%define _use_internal_dependency_generator 0 +%define __find_requires %{nil} +%define __os_install_post %{nil} +%define debug_package %{nil} + +%build + +%install +mkdir -p %{buildroot}/usr/local +tar -C $RPM_BUILD_DIR/%{name}-%{version}-%{release} -cf - . | tar -C %{buildroot}/usr/local -xf - + +%clean +rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/%{name}-%{version}-%{release} + +%changelog + +%files platform +%defattr(-, root, root) + +/usr/local/MariaDB/Columnstore/bin/DDLProc +/usr/local/MariaDB/Columnstore/bin/ExeMgr +/usr/local/MariaDB/Columnstore/bin/ProcMgr +/usr/local/MariaDB/Columnstore/bin/ProcMon +/usr/local/MariaDB/Columnstore/bin/DMLProc +/usr/local/MariaDB/Columnstore/bin/WriteEngineServer +/usr/local/MariaDB/Columnstore/bin/cpimport +/usr/local/MariaDB/Columnstore/bin/post-install +/usr/local/MariaDB/Columnstore/bin/post-mysql-install +/usr/local/MariaDB/Columnstore/bin/post-mysqld-install +/usr/local/MariaDB/Columnstore/bin/pre-uninstall +/usr/local/MariaDB/Columnstore/bin/PrimProc +/usr/local/MariaDB/Columnstore/bin/DecomSvr +/usr/local/MariaDB/Columnstore/bin/upgrade-columnstore.sh +/usr/local/MariaDB/Columnstore/bin/run.sh +/usr/local/MariaDB/Columnstore/bin/columnstore +/usr/local/MariaDB/Columnstore/bin/columnstoreSyslog +/usr/local/MariaDB/Columnstore/bin/columnstoreSyslog7 +/usr/local/MariaDB/Columnstore/bin/columnstoreSyslog-ng +/usr/local/MariaDB/Columnstore/bin/syslogSetup.sh +/usr/local/MariaDB/Columnstore/bin/cplogger +/usr/local/MariaDB/Columnstore/bin/columnstore.def +/usr/local/MariaDB/Columnstore/bin/dbbuilder +/usr/local/MariaDB/Columnstore/bin/cpimport.bin +/usr/local/MariaDB/Columnstore/bin/load_brm +/usr/local/MariaDB/Columnstore/bin/save_brm +/usr/local/MariaDB/Columnstore/bin/dbrmctl +/usr/local/MariaDB/Columnstore/bin/controllernode +/usr/local/MariaDB/Columnstore/bin/reset_locks +/usr/local/MariaDB/Columnstore/bin/workernode +/usr/local/MariaDB/Columnstore/bin/colxml +/usr/local/MariaDB/Columnstore/bin/clearShm +/usr/local/MariaDB/Columnstore/bin/viewtablelock +/usr/local/MariaDB/Columnstore/bin/cleartablelock +/usr/local/MariaDB/Columnstore/bin/mcsadmin +/usr/local/MariaDB/Columnstore/bin/trapHandler +/usr/local/MariaDB/Columnstore/bin/remote_command.sh +/usr/local/MariaDB/Columnstore/bin/postConfigure +/usr/local/MariaDB/Columnstore/bin/columnstoreLogRotate +/usr/local/MariaDB/Columnstore/bin/transactionLog +/usr/local/MariaDB/Columnstore/bin/columnstoreDBWrite +/usr/local/MariaDB/Columnstore/bin/transactionLogArchiver.sh +/usr/local/MariaDB/Columnstore/bin/system_installer.sh +/usr/local/MariaDB/Columnstore/bin/installer +/usr/local/MariaDB/Columnstore/bin/module_installer.sh +/usr/local/MariaDB/Columnstore/bin/patchInstaller +/usr/local/MariaDB/Columnstore/bin/user_installer.sh +/usr/local/MariaDB/Columnstore/bin/performance_installer.sh +/usr/local/MariaDB/Columnstore/bin/startupTests.sh +/usr/local/MariaDB/Columnstore/bin/os_check.sh +/usr/local/MariaDB/Columnstore/bin/sendtrap +/usr/local/MariaDB/Columnstore/bin/remote_scp_put.sh +/usr/local/MariaDB/Columnstore/bin/remotessh.exp +/usr/local/MariaDB/Columnstore/bin/ServerMonitor +/usr/local/MariaDB/Columnstore/bin/master-rep-columnstore.sh +/usr/local/MariaDB/Columnstore/bin/slave-rep-columnstore.sh +/usr/local/MariaDB/Columnstore/bin/rsync.sh +/usr/local/MariaDB/Columnstore/bin/columnstoreSupport +/usr/local/MariaDB/Columnstore/bin/hardwareReport.sh +/usr/local/MariaDB/Columnstore/bin/softwareReport.sh +/usr/local/MariaDB/Columnstore/bin/configReport.sh +/usr/local/MariaDB/Columnstore/bin/logReport.sh +/usr/local/MariaDB/Columnstore/bin/bulklogReport.sh +/usr/local/MariaDB/Columnstore/bin/resourceReport.sh +/usr/local/MariaDB/Columnstore/bin/hadoopReport.sh +/usr/local/MariaDB/Columnstore/bin/alarmReport.sh +/usr/local/MariaDB/Columnstore/bin/amazonInstaller +/usr/local/MariaDB/Columnstore/bin/remote_command_verify.sh +/usr/local/MariaDB/Columnstore/bin/disable-rep-columnstore.sh + + +# +%config /usr/local/MariaDB/Columnstore/etc/Calpont.xml +%config /usr/local/MariaDB/Columnstore/etc/ConsoleCmds.xml +%config /usr/local/MariaDB/Columnstore/etc/ProcessConfig.xml +%config /usr/local/MariaDB/Columnstore/etc/snmpd.conf +%config /usr/local/MariaDB/Columnstore/etc/snmptrapd.conf +%config /usr/local/MariaDB/Columnstore/etc/Calpont.xml.singleserver +%config /usr/local/MariaDB/Columnstore/etc/ProcessConfig.xml.singleserver +%config /usr/local/MariaDB/Columnstore/etc/snmpd.conf.singleserver +%config /usr/local/MariaDB/Columnstore/etc/snmptrapd.conf.singleserver +# +/usr/local/MariaDB/Columnstore/etc/MessageFile.txt +/usr/local/MariaDB/Columnstore/etc/ErrorMessage.txt +# +%attr(0666, root, root) /usr/local/MariaDB/Columnstore/local/module +# +/usr/local/MariaDB/Columnstore/releasenum + +# Tools... +/usr/local/MariaDB/Columnstore/bin/rollback +/usr/local/MariaDB/Columnstore/bin/editem +/usr/local/MariaDB/Columnstore/bin/getConfig +/usr/local/MariaDB/Columnstore/bin/setConfig +/usr/local/MariaDB/Columnstore/bin/setenv-hdfs-12 +/usr/local/MariaDB/Columnstore/bin/setenv-hdfs-20 +/usr/local/MariaDB/Columnstore/bin/hdfsCheck +/usr/local/MariaDB/Columnstore/bin/configxml.sh +/usr/local/MariaDB/Columnstore/bin/remote_scp_get.sh +/usr/local/MariaDB/Columnstore/bin/columnstoreAlias +/usr/local/MariaDB/Columnstore/bin/autoConfigure +/usr/local/MariaDB/Columnstore/bin/ddlcleanup +/usr/local/MariaDB/Columnstore/bin/idbmeminfo +/usr/local/MariaDB/Columnstore/bin/IDBInstanceCmds.sh +/usr/local/MariaDB/Columnstore/bin/IDBVolumeCmds.sh +/usr/local/MariaDB/Columnstore/bin/binary_installer.sh +/usr/local/MariaDB/Columnstore/bin/myCnf-include-args.text +/usr/local/MariaDB/Columnstore/bin/myCnf-exclude-args.text +/usr/local/MariaDB/Columnstore/bin/mycnfUpgrade +/usr/local/MariaDB/Columnstore/bin/getMySQLpw +/usr/local/MariaDB/Columnstore/bin/columnstore.conf + +/usr/local/MariaDB/Columnstore/sbin/snmpd +/usr/local/MariaDB/Columnstore/sbin/snmptrapd +%config %attr(0666, root, root) /usr/local/MariaDB/Columnstore/etc/AlarmConfig.xml +# +%config /usr/local/MariaDB/Columnstore/local/snmpdx.conf +%config /usr/local/MariaDB/Columnstore/local/snmpdx.conf.singleserver +# +/usr/local/MariaDB/Columnstore/share/snmp/mibs/AGENTX-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/CALPONT-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/DISMAN-EVENT-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/DISMAN-SCHEDULE-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/DISMAN-SCRIPT-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/EtherLike-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/HCNUM-TC.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/HOST-RESOURCES-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/HOST-RESOURCES-TYPES.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IANAifType-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IANA-LANGUAGE-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IANA-RTPROTO-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IF-INVERTED-STACK-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IF-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/INET-ADDRESS-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IP-FORWARD-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IP-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IPV6-ICMP-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IPV6-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IPV6-TCP-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IPV6-TC.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IPV6-UDP-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/NET-SNMP-AGENT-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/NET-SNMP-EXAMPLES-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/NET-SNMP-EXTEND-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/NET-SNMP-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/NET-SNMP-TC.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/NOTIFICATION-LOG-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/RFC1155-SMI.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/RFC1213-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/RFC-1215.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/RMON-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SMUX-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-COMMUNITY-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-FRAMEWORK-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-MPD-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-NOTIFICATION-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-PROXY-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-TARGET-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-USER-BASED-SM-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-USM-AES-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-USM-DH-OBJECTS-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMPv2-CONF.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMPv2-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMPv2-SMI.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMPv2-TC.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMPv2-TM.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-VIEW-BASED-ACM-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/TCP-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/TRANSPORT-ADDRESS-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/UCD-DEMO-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/UCD-DISKIO-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/UCD-DLMOD-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/UCD-IPFWACC-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/UCD-SNMP-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/UDP-MIB.txt +# +/usr/local/MariaDB/Columnstore/post/functions +/usr/local/MariaDB/Columnstore/post/test-001.sh +/usr/local/MariaDB/Columnstore/post/test-002.sh +/usr/local/MariaDB/Columnstore/post/test-003.sh +/usr/local/MariaDB/Columnstore/post/test-004.sh + +%files enterprise +%defattr(-, root, root) +/usr/local/MariaDB/Columnstore/bin/displayJobGraph.sh +/usr/local/MariaDB/Columnstore/bin/dbhealth.sh +/usr/local/MariaDB/Columnstore/bin/dbhealth.sql + +# Tools... +/usr/local/MariaDB/Columnstore/bin/dumpcol +/usr/local/MariaDB/Columnstore/bin/oid2file +/usr/local/MariaDB/Columnstore/bin/evalcol +/usr/local/MariaDB/Columnstore/bin/SesMgr +/usr/local/MariaDB/Columnstore/bin/dumpVss +/usr/local/MariaDB/Columnstore/bin/editTxn +/usr/local/MariaDB/Columnstore/bin/dbprof.pl +/usr/local/MariaDB/Columnstore/bin/dumpobm +/usr/local/MariaDB/Columnstore/bin/file2oid.pl +/usr/local/MariaDB/Columnstore/bin/print_journal +/usr/local/MariaDB/Columnstore/bin/healthcheck +/usr/local/MariaDB/Columnstore/bin/glusterctl +/usr/local/MariaDB/Columnstore/bin/glusteradd +/usr/local/MariaDB/Columnstore/bin/glusterconf +/usr/local/MariaDB/Columnstore/bin/redistributeDB +/usr/local/MariaDB/Columnstore/bin/databaseSizeReport +/usr/local/MariaDB/Columnstore/bin/gdb +# +/usr/local/MariaDB/Columnstore/tools/copy2here.sh +/usr/local/MariaDB/Columnstore/tools/getlogs.sh +/usr/local/MariaDB/Columnstore/tools/getmodules.sh +/usr/local/MariaDB/Columnstore/tools/getps.sh +/usr/local/MariaDB/Columnstore/tools/getsar.sh +/usr/local/MariaDB/Columnstore/tools/getuserinput.sh +/usr/local/MariaDB/Columnstore/tools/prat +/usr/local/MariaDB/Columnstore/tools/prat.sh +/usr/local/MariaDB/Columnstore/tools/ps +/usr/local/MariaDB/Columnstore/tools/pscollect +/usr/local/MariaDB/Columnstore/tools/README +/usr/local/MariaDB/Columnstore/tools/tarfiles.sh +# +%files libs +%defattr(-, root, root) + +/usr/local/MariaDB/Columnstore/lib/libconfigcpp.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libddlpackageproc.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libddlpackage.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libdmlpackageproc.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libdmlpackage.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libexecplan.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libfuncexp.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libudfsdk.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libjoblist.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libjoiner.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libloggingcpp.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libmessageqcpp.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libnetsnmpagent.so.5.2.1 +/usr/local/MariaDB/Columnstore/lib/libnetsnmphelpers.so.5.2.1 +/usr/local/MariaDB/Columnstore/lib/libnetsnmpmibs.so.5.2.1 +/usr/local/MariaDB/Columnstore/lib/libnetsnmp.so.5.2.1 +/usr/local/MariaDB/Columnstore/lib/libnetsnmptrapd.so.5.2.1 +/usr/local/MariaDB/Columnstore/lib/liboamcpp.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libsnmpmanager.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libthreadpool.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libwindowfunction.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libwriteengine.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libwriteengineclient.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libbrm.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/librwlock.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libdataconvert.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/librowgroup.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libcacheutils.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libcommon.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libboost_idb.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libcompress.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libddlcleanuputil.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libbatchloader.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libmysqlcl_idb.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libquerystats.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libwriteengineredistribute.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libjemalloc.so.3.3.0 +/usr/local/MariaDB/Columnstore/lib/libidbdatafile.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/hdfs-20.so +/usr/local/MariaDB/Columnstore/lib/hdfs-12.so +/usr/local/MariaDB/Columnstore/lib/libgcc_s.so.1 +/usr/local/MariaDB/Columnstore/lib/libstdc++.so.6.0.14 +/usr/local/MariaDB/Columnstore/lib/libthrift.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libquerytele.so.1.0.0 + +%files storage-engine +/usr/local/MariaDB/Columnstore/lib/libcalmysql.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libudf_mysql.so.1.0.0 + +/usr/local/MariaDB/Columnstore/mysql/mysql-Calpont +/usr/local/MariaDB/Columnstore/mysql/install_calpont_mysql.sh +/usr/local/MariaDB/Columnstore/mysql/syscatalog_mysql.sql +/usr/local/MariaDB/Columnstore/mysql/dumpcat_mysql.sql +/usr/local/MariaDB/Columnstore/mysql/dumpcat.pl +/usr/local/MariaDB/Columnstore/mysql/calsetuserpriority.sql +/usr/local/MariaDB/Columnstore/mysql/calremoveuserpriority.sql +/usr/local/MariaDB/Columnstore/mysql/calshowprocesslist.sql + +%config /usr/local/MariaDB/Columnstore/mysql/my.cnf + +# +# Scriptlets +# for an install, pre & post run with $1 set to 1 +# for an erase, preun & postun run with $1 set to 0 +# for an upgrade, pre & post run first, with $1 set to 2 then the _old_ preun & postun run with $1 set to 1 + +%post platform +rpmmode=install +if [ "$1" -eq "$1" 2> /dev/null ]; then + if [ $1 -ne 1 ]; then + rpmmode=upgrade + fi +fi + +prefix=/usr/local + +test -x /usr/local/MariaDB/Columnstore/bin/post-install && /usr/local/MariaDB/Columnstore/bin/post-install --prefix=$prefix --rpmmode=$rpmmode + +echo "InfinIDB RPM install completed" + +%post libs +rpmmode=install +if [ "$1" -eq "$1" 2> /dev/null ]; then + if [ $1 -ne 1 ]; then + rpmmode=upgrade + fi +fi + +prefix=/usr/local + +echo "InfinIDB RPM install completed" + +%post storage-engine +rpmmode=install +if [ "$1" -eq "$1" 2> /dev/null ]; then + if [ $1 -ne 1 ]; then + rpmmode=upgrade + fi +fi + +prefix=/usr/local + +echo "InfinIDB RPM install completed" + + +%post enterprise +rpmmode=install +if [ "$1" -eq "$1" 2> /dev/null ]; then + if [ $1 -ne 1 ]; then + rpmmode=upgrade + fi +fi + +prefix=/usr/local + +echo "InfinIDB RPM install completed" + +%preun platform +rpmmode=upgrade +if [ "$1" -eq "$1" 2> /dev/null ]; then + if [ $1 -ne 1 ]; then + rpmmode=erase + fi +else + rpmmode=erase +fi + +if [ $rpmmode = erase ]; then + test -x /usr/local/MariaDB/Columnstore/bin/pre-uninstall && /usr/local/MariaDB/Columnstore/bin/pre-uninstall +fi + +exit 0 + +%preun libs +rpmmode=upgrade +if [ "$1" -eq "$1" 2> /dev/null ]; then + if [ $1 -ne 1 ]; then + rpmmode=erase + fi +else + rpmmode=erase +fi + +exit 0 + +%preun storage-engine +rpmmode=upgrade +if [ "$1" -eq "$1" 2> /dev/null ]; then + if [ $1 -ne 1 ]; then + rpmmode=erase + fi +else + rpmmode=erase +fi + +exit 0 + +%preun enterprise +rpmmode=upgrade +if [ "$1" -eq "$1" 2> /dev/null ]; then + if [ $1 -ne 1 ]; then + rpmmode=erase + fi +else + rpmmode=erase +fi + +exit 0 + + diff --git a/build/columnstore.spec.in~ b/build/columnstore.spec.in~ new file mode 100644 index 000000000..ae423ea09 --- /dev/null +++ b/build/columnstore.spec.in~ @@ -0,0 +1,472 @@ +# +# $Id$ +# +Summary: InfiniDB-MariaDB software +Name: infinidb +@@VERSION@@ +@@RELEASE@@ +Vendor: MariaDB, Inc. +URL: http://www.mariadb.com/ +@@PACKAGER@@ +Group: Applications +License: Copyright (c) 2016 MariaDB, Inc., all rights reserved; redistributable under the terms of the GPL, see the file COPYING for details. +BuildRoot: %{_tmppath}/%{name}-%{release}-buildroot + +%description +InfiniDB-MariaDB software meta-package + +%package platform +Summary: InfiniDB-MariaDB software binaries +Group: Applications +Obsoletes: calpont +Requires: expect, infinidb-libs + +%description platform +InfiniDB-MariaDB binary files +@@BUILDINFO@@ + +%package libs +Summary: InfiniDB-MariaDB software libraries +Group: Applications +Obsoletes: calpont + +%description libs +InfiniDB-MariaDB libraries + +%package enterprise +Summary: InfiniDB Enterprise software binaries +Group: Applications +Obsoletes: calpont +Requires: infinidb-libs, infinidb-platform +License: Proprietary; Copyright (c) 2014 InfiniDB, Inc., all rights reserved + +%description enterprise +InfiniDB Enterprise binary files + +%package storage-engine +Summary: InfiniDB-MariaDB software MariaDB connector +Group: Applications +Obsoletes: calpont-mysql +Requires: infinidb-libs + +%description storage-engine +InfiniDB MariaDB connector binary files + +%prep +%define _use_internal_dependency_generator 0 +%define __find_requires %{nil} +%define __os_install_post %{nil} +%define debug_package %{nil} + +%build + +%install +mkdir -p %{buildroot}/usr/local +tar -C $RPM_BUILD_DIR/%{name}-%{version}-%{release} -cf - . | tar -C %{buildroot}/usr/local -xf - + +%clean +rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/%{name}-%{version}-%{release} + +%changelog + +%files platform +%defattr(-, root, root) + +/usr/local/MariaDB/Columnstore/bin/DDLProc +/usr/local/MariaDB/Columnstore/bin/ExeMgr +/usr/local/MariaDB/Columnstore/bin/ProcMgr +/usr/local/MariaDB/Columnstore/bin/ProcMon +/usr/local/MariaDB/Columnstore/bin/DMLProc +/usr/local/MariaDB/Columnstore/bin/WriteEngineServer +/usr/local/MariaDB/Columnstore/bin/cpimport +/usr/local/MariaDB/Columnstore/bin/post-install +/usr/local/MariaDB/Columnstore/bin/post-mysql-install +/usr/local/MariaDB/Columnstore/bin/post-mysqld-install +/usr/local/MariaDB/Columnstore/bin/pre-uninstall +/usr/local/MariaDB/Columnstore/bin/PrimProc +/usr/local/MariaDB/Columnstore/bin/DecomSvr +/usr/local/MariaDB/Columnstore/bin/upgrade-infinidb.sh +/usr/local/MariaDB/Columnstore/bin/run.sh +/usr/local/MariaDB/Columnstore/bin/infinidb +/usr/local/MariaDB/Columnstore/bin/calpontSyslog +/usr/local/MariaDB/Columnstore/bin/calpontSyslog7 +/usr/local/MariaDB/Columnstore/bin/calpontSyslog-ng +/usr/local/MariaDB/Columnstore/bin/syslogSetup.sh +/usr/local/MariaDB/Columnstore/bin/cplogger +/usr/local/MariaDB/Columnstore/bin/infinidb.def +/usr/local/MariaDB/Columnstore/bin/dbbuilder +/usr/local/MariaDB/Columnstore/bin/cpimport.bin +/usr/local/MariaDB/Columnstore/bin/load_brm +/usr/local/MariaDB/Columnstore/bin/save_brm +/usr/local/MariaDB/Columnstore/bin/dbrmctl +/usr/local/MariaDB/Columnstore/bin/controllernode +/usr/local/MariaDB/Columnstore/bin/reset_locks +/usr/local/MariaDB/Columnstore/bin/workernode +/usr/local/MariaDB/Columnstore/bin/colxml +/usr/local/MariaDB/Columnstore/bin/clearShm +/usr/local/MariaDB/Columnstore/bin/viewtablelock +/usr/local/MariaDB/Columnstore/bin/cleartablelock +/usr/local/MariaDB/Columnstore/bin/mcsadmin +/usr/local/MariaDB/Columnstore/bin/trapHandler +/usr/local/MariaDB/Columnstore/bin/remote_command.sh +/usr/local/MariaDB/Columnstore/bin/postConfigure +/usr/local/MariaDB/Columnstore/bin/calpontLogRotate +/usr/local/MariaDB/Columnstore/bin/transactionLog +/usr/local/MariaDB/Columnstore/bin/calpontDBWrite +/usr/local/MariaDB/Columnstore/bin/transactionLogArchiver.sh +/usr/local/MariaDB/Columnstore/bin/system_installer.sh +/usr/local/MariaDB/Columnstore/bin/installer +/usr/local/MariaDB/Columnstore/bin/module_installer.sh +/usr/local/MariaDB/Columnstore/bin/patchInstaller +/usr/local/MariaDB/Columnstore/bin/patch_installer.sh +/usr/local/MariaDB/Columnstore/bin/xm_installer.sh +/usr/local/MariaDB/Columnstore/bin/calpontUninstall.sh +/usr/local/MariaDB/Columnstore/bin/director_installer.sh +/usr/local/MariaDB/Columnstore/bin/user_installer.sh +/usr/local/MariaDB/Columnstore/bin/performance_installer.sh +/usr/local/MariaDB/Columnstore/bin/startupTests.sh +/usr/local/MariaDB/Columnstore/bin/os_check.sh +/usr/local/MariaDB/Columnstore/bin/sendtrap +/usr/local/MariaDB/Columnstore/bin/remote_scp_put.sh +/usr/local/MariaDB/Columnstore/bin/remotessh.exp +/usr/local/MariaDB/Columnstore/bin/ServerMonitor +/usr/local/MariaDB/Columnstore/bin/master-rep-infinidb.sh +/usr/local/MariaDB/Columnstore/bin/slave-rep-infinidb.sh +/usr/local/MariaDB/Columnstore/bin/rsync.sh +/usr/local/MariaDB/Columnstore/bin/calpontSupport +/usr/local/MariaDB/Columnstore/bin/hardwareReport.sh +/usr/local/MariaDB/Columnstore/bin/softwareReport.sh +/usr/local/MariaDB/Columnstore/bin/configReport.sh +/usr/local/MariaDB/Columnstore/bin/logReport.sh +/usr/local/MariaDB/Columnstore/bin/bulklogReport.sh +/usr/local/MariaDB/Columnstore/bin/resourceReport.sh +/usr/local/MariaDB/Columnstore/bin/hadoopReport.sh +/usr/local/MariaDB/Columnstore/bin/alarmReport.sh +/usr/local/MariaDB/Columnstore/bin/amazonInstaller +/usr/local/MariaDB/Columnstore/bin/remote_command_verify.sh +/usr/local/MariaDB/Columnstore/bin/disable-rep-infinidb.sh + + +# +%config /usr/local/MariaDB/Columnstore/etc/Calpont.xml +%config /usr/local/MariaDB/Columnstore/etc/ConsoleCmds.xml +%config /usr/local/MariaDB/Columnstore/etc/ProcessConfig.xml +%config /usr/local/MariaDB/Columnstore/etc/snmpd.conf +%config /usr/local/MariaDB/Columnstore/etc/snmptrapd.conf +%config /usr/local/MariaDB/Columnstore/etc/Calpont.xml.singleserver +%config /usr/local/MariaDB/Columnstore/etc/ProcessConfig.xml.singleserver +%config /usr/local/MariaDB/Columnstore/etc/snmpd.conf.singleserver +%config /usr/local/MariaDB/Columnstore/etc/snmptrapd.conf.singleserver +# +/usr/local/MariaDB/Columnstore/etc/MessageFile.txt +/usr/local/MariaDB/Columnstore/etc/ErrorMessage.txt +# +%attr(0666, root, root) /usr/local/MariaDB/Columnstore/local/module +# +/usr/local/MariaDB/Columnstore/releasenum + +# Tools... +/usr/local/MariaDB/Columnstore/bin/rollback +/usr/local/MariaDB/Columnstore/bin/editem +/usr/local/MariaDB/Columnstore/bin/getConfig +/usr/local/MariaDB/Columnstore/bin/setConfig +/usr/local/MariaDB/Columnstore/bin/setenv-hdfs-12 +/usr/local/MariaDB/Columnstore/bin/setenv-hdfs-20 +/usr/local/MariaDB/Columnstore/bin/hdfsCheck +/usr/local/MariaDB/Columnstore/bin/configxml.sh +/usr/local/MariaDB/Columnstore/bin/remote_scp_get.sh +/usr/local/MariaDB/Columnstore/bin/calpontAlias +/usr/local/MariaDB/Columnstore/bin/autoConfigure +/usr/local/MariaDB/Columnstore/bin/ddlcleanup +/usr/local/MariaDB/Columnstore/bin/idbmeminfo +/usr/local/MariaDB/Columnstore/bin/IDBInstanceCmds.sh +/usr/local/MariaDB/Columnstore/bin/IDBVolumeCmds.sh +/usr/local/MariaDB/Columnstore/bin/binary_installer.sh +/usr/local/MariaDB/Columnstore/bin/myCnf-include-args.text +/usr/local/MariaDB/Columnstore/bin/myCnf-exclude-args.text +/usr/local/MariaDB/Columnstore/bin/mycnfUpgrade +/usr/local/MariaDB/Columnstore/bin/getMySQLpw +/usr/local/MariaDB/Columnstore/bin/infinidb.conf + +/usr/local/MariaDB/Columnstore/sbin/snmpd +/usr/local/MariaDB/Columnstore/sbin/snmptrapd +%config %attr(0666, root, root) /usr/local/MariaDB/Columnstore/etc/AlarmConfig.xml +# +%config /usr/local/MariaDB/Columnstore/local/snmpdx.conf +%config /usr/local/MariaDB/Columnstore/local/snmpdx.conf.singleserver +# +/usr/local/MariaDB/Columnstore/share/snmp/mibs/AGENTX-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/CALPONT-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/DISMAN-EVENT-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/DISMAN-SCHEDULE-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/DISMAN-SCRIPT-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/EtherLike-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/HCNUM-TC.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/HOST-RESOURCES-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/HOST-RESOURCES-TYPES.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IANAifType-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IANA-LANGUAGE-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IANA-RTPROTO-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IF-INVERTED-STACK-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IF-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/INET-ADDRESS-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IP-FORWARD-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IP-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IPV6-ICMP-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IPV6-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IPV6-TCP-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IPV6-TC.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IPV6-UDP-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/NET-SNMP-AGENT-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/NET-SNMP-EXAMPLES-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/NET-SNMP-EXTEND-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/NET-SNMP-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/NET-SNMP-TC.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/NOTIFICATION-LOG-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/RFC1155-SMI.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/RFC1213-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/RFC-1215.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/RMON-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SMUX-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-COMMUNITY-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-FRAMEWORK-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-MPD-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-NOTIFICATION-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-PROXY-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-TARGET-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-USER-BASED-SM-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-USM-AES-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-USM-DH-OBJECTS-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMPv2-CONF.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMPv2-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMPv2-SMI.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMPv2-TC.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMPv2-TM.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-VIEW-BASED-ACM-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/TCP-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/TRANSPORT-ADDRESS-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/UCD-DEMO-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/UCD-DISKIO-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/UCD-DLMOD-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/UCD-IPFWACC-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/UCD-SNMP-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/UDP-MIB.txt +# +/usr/local/MariaDB/Columnstore/post/functions +/usr/local/MariaDB/Columnstore/post/test-001.sh +/usr/local/MariaDB/Columnstore/post/test-002.sh +/usr/local/MariaDB/Columnstore/post/test-003.sh +/usr/local/MariaDB/Columnstore/post/test-004.sh + +%files enterprise +%defattr(-, root, root) +/usr/local/MariaDB/Columnstore/bin/displayJobGraph.sh +/usr/local/MariaDB/Columnstore/bin/dbhealth.sh +/usr/local/MariaDB/Columnstore/bin/dbhealth.sql + +# Tools... +/usr/local/MariaDB/Columnstore/bin/dumpcol +/usr/local/MariaDB/Columnstore/bin/oid2file +/usr/local/MariaDB/Columnstore/bin/evalcol +/usr/local/MariaDB/Columnstore/bin/SesMgr +/usr/local/MariaDB/Columnstore/bin/dumpVss +/usr/local/MariaDB/Columnstore/bin/editTxn +/usr/local/MariaDB/Columnstore/bin/dbprof.pl +/usr/local/MariaDB/Columnstore/bin/dumpobm +/usr/local/MariaDB/Columnstore/bin/file2oid.pl +/usr/local/MariaDB/Columnstore/bin/print_journal +/usr/local/MariaDB/Columnstore/bin/healthcheck +/usr/local/MariaDB/Columnstore/bin/glusterctl +/usr/local/MariaDB/Columnstore/bin/glusteradd +/usr/local/MariaDB/Columnstore/bin/glusterconf +/usr/local/MariaDB/Columnstore/bin/redistributeDB +/usr/local/MariaDB/Columnstore/bin/databaseSizeReport +/usr/local/MariaDB/Columnstore/bin/gdb +# +/usr/local/MariaDB/Columnstore/tools/copy2here.sh +/usr/local/MariaDB/Columnstore/tools/getlogs.sh +/usr/local/MariaDB/Columnstore/tools/getmodules.sh +/usr/local/MariaDB/Columnstore/tools/getps.sh +/usr/local/MariaDB/Columnstore/tools/getsar.sh +/usr/local/MariaDB/Columnstore/tools/getuserinput.sh +/usr/local/MariaDB/Columnstore/tools/prat +/usr/local/MariaDB/Columnstore/tools/prat.sh +/usr/local/MariaDB/Columnstore/tools/ps +/usr/local/MariaDB/Columnstore/tools/pscollect +/usr/local/MariaDB/Columnstore/tools/README +/usr/local/MariaDB/Columnstore/tools/tarfiles.sh +# +%files libs +%defattr(-, root, root) + +/usr/local/MariaDB/Columnstore/lib/libconfigcpp.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libddlpackageproc.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libddlpackage.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libdmlpackageproc.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libdmlpackage.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libexecplan.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libfuncexp.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libudfsdk.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libjoblist.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libjoiner.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libloggingcpp.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libmessageqcpp.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libnetsnmpagent.so.5.2.1 +/usr/local/MariaDB/Columnstore/lib/libnetsnmphelpers.so.5.2.1 +/usr/local/MariaDB/Columnstore/lib/libnetsnmpmibs.so.5.2.1 +/usr/local/MariaDB/Columnstore/lib/libnetsnmp.so.5.2.1 +/usr/local/MariaDB/Columnstore/lib/libnetsnmptrapd.so.5.2.1 +/usr/local/MariaDB/Columnstore/lib/liboamcpp.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libsnmpmanager.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libthreadpool.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libwindowfunction.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libwriteengine.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libwriteengineclient.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libbrm.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/librwlock.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libdataconvert.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/librowgroup.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libcacheutils.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libcommon.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libboost_idb.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libcompress.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libddlcleanuputil.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libbatchloader.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libmysqlcl_idb.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libquerystats.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libwriteengineredistribute.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libjemalloc.so.3.3.0 +/usr/local/MariaDB/Columnstore/lib/libidbdatafile.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/hdfs-20.so +/usr/local/MariaDB/Columnstore/lib/hdfs-12.so +/usr/local/MariaDB/Columnstore/lib/libgcc_s.so.1 +/usr/local/MariaDB/Columnstore/lib/libstdc++.so.6.0.14 +/usr/local/MariaDB/Columnstore/lib/libthrift.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libquerytele.so.1.0.0 + +%files storage-engine +/usr/local/MariaDB/Columnstore/lib/libcalmysql.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libudf_mysql.so.1.0.0 + +/usr/local/MariaDB/Columnstore/mysql/mysql-Calpont +/usr/local/MariaDB/Columnstore/mysql/install_calpont_mysql.sh +/usr/local/MariaDB/Columnstore/mysql/syscatalog_mysql.sql +/usr/local/MariaDB/Columnstore/mysql/dumpcat_mysql.sql +/usr/local/MariaDB/Columnstore/mysql/dumpcat.pl +/usr/local/MariaDB/Columnstore/mysql/calsetuserpriority.sql +/usr/local/MariaDB/Columnstore/mysql/calremoveuserpriority.sql +/usr/local/MariaDB/Columnstore/mysql/calshowprocesslist.sql + +%config /usr/local/MariaDB/Columnstore/mysql/my.cnf + +# +# Scriptlets +# for an install, pre & post run with $1 set to 1 +# for an erase, preun & postun run with $1 set to 0 +# for an upgrade, pre & post run first, with $1 set to 2 then the _old_ preun & postun run with $1 set to 1 + +%post platform +rpmmode=install +if [ "$1" -eq "$1" 2> /dev/null ]; then + if [ $1 -ne 1 ]; then + rpmmode=upgrade + fi +fi + +prefix=/usr/local + +test -x /usr/local/MariaDB/Columnstore/bin/post-install && /usr/local/MariaDB/Columnstore/bin/post-install --prefix=$prefix --rpmmode=$rpmmode + +echo "InfinIDB RPM install completed" + +%post libs +rpmmode=install +if [ "$1" -eq "$1" 2> /dev/null ]; then + if [ $1 -ne 1 ]; then + rpmmode=upgrade + fi +fi + +prefix=/usr/local + +echo "InfinIDB RPM install completed" + +%post storage-engine +rpmmode=install +if [ "$1" -eq "$1" 2> /dev/null ]; then + if [ $1 -ne 1 ]; then + rpmmode=upgrade + fi +fi + +prefix=/usr/local + +echo "InfinIDB RPM install completed" + + +%post enterprise +rpmmode=install +if [ "$1" -eq "$1" 2> /dev/null ]; then + if [ $1 -ne 1 ]; then + rpmmode=upgrade + fi +fi + +prefix=/usr/local + +echo "InfinIDB RPM install completed" + +%preun platform +rpmmode=upgrade +if [ "$1" -eq "$1" 2> /dev/null ]; then + if [ $1 -ne 1 ]; then + rpmmode=erase + fi +else + rpmmode=erase +fi + +if [ $rpmmode = erase ]; then + test -x /usr/local/MariaDB/Columnstore/bin/pre-uninstall && /usr/local/MariaDB/Columnstore/bin/pre-uninstall +fi + +exit 0 + +%preun libs +rpmmode=upgrade +if [ "$1" -eq "$1" 2> /dev/null ]; then + if [ $1 -ne 1 ]; then + rpmmode=erase + fi +else + rpmmode=erase +fi + +exit 0 + +%preun storage-engine +rpmmode=upgrade +if [ "$1" -eq "$1" 2> /dev/null ]; then + if [ $1 -ne 1 ]; then + rpmmode=erase + fi +else + rpmmode=erase +fi + +exit 0 + +%preun enterprise +rpmmode=upgrade +if [ "$1" -eq "$1" 2> /dev/null ]; then + if [ $1 -ne 1 ]; then + rpmmode=erase + fi +else + rpmmode=erase +fi + +exit 0 + + diff --git a/build/files.lst b/build/files.lst index 2a063ac54..45621bda5 100644 --- a/build/files.lst +++ b/build/files.lst @@ -1,3 +1,3 @@ ./my.cnf -./mysql-Calpont +./mysql-Columnstore ./install_calpont_mysql.sh diff --git a/build/files.lst~ b/build/files.lst~ new file mode 100644 index 000000000..2a063ac54 --- /dev/null +++ b/build/files.lst~ @@ -0,0 +1,3 @@ +./my.cnf +./mysql-Calpont +./install_calpont_mysql.sh diff --git a/build/infinidb.spec.in b/build/infinidb.spec.in index e85f95e08..ae423ea09 100644 --- a/build/infinidb.spec.in +++ b/build/infinidb.spec.in @@ -72,293 +72,293 @@ rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/%{name}-%{version}-%{release} %files platform %defattr(-, root, root) -/usr/local/Calpont/bin/DDLProc -/usr/local/Calpont/bin/ExeMgr -/usr/local/Calpont/bin/ProcMgr -/usr/local/Calpont/bin/ProcMon -/usr/local/Calpont/bin/DMLProc -/usr/local/Calpont/bin/WriteEngineServer -/usr/local/Calpont/bin/cpimport -/usr/local/Calpont/bin/post-install -/usr/local/Calpont/bin/post-mysql-install -/usr/local/Calpont/bin/post-mysqld-install -/usr/local/Calpont/bin/pre-uninstall -/usr/local/Calpont/bin/PrimProc -/usr/local/Calpont/bin/DecomSvr -/usr/local/Calpont/bin/upgrade-infinidb.sh -/usr/local/Calpont/bin/run.sh -/usr/local/Calpont/bin/infinidb -/usr/local/Calpont/bin/calpontSyslog -/usr/local/Calpont/bin/calpontSyslog7 -/usr/local/Calpont/bin/calpontSyslog-ng -/usr/local/Calpont/bin/syslogSetup.sh -/usr/local/Calpont/bin/cplogger -/usr/local/Calpont/bin/infinidb.def -/usr/local/Calpont/bin/dbbuilder -/usr/local/Calpont/bin/cpimport.bin -/usr/local/Calpont/bin/load_brm -/usr/local/Calpont/bin/save_brm -/usr/local/Calpont/bin/dbrmctl -/usr/local/Calpont/bin/controllernode -/usr/local/Calpont/bin/reset_locks -/usr/local/Calpont/bin/workernode -/usr/local/Calpont/bin/colxml -/usr/local/Calpont/bin/clearShm -/usr/local/Calpont/bin/viewtablelock -/usr/local/Calpont/bin/cleartablelock -/usr/local/Calpont/bin/mcsadmin -/usr/local/Calpont/bin/trapHandler -/usr/local/Calpont/bin/remote_command.sh -/usr/local/Calpont/bin/postConfigure -/usr/local/Calpont/bin/calpontLogRotate -/usr/local/Calpont/bin/transactionLog -/usr/local/Calpont/bin/calpontDBWrite -/usr/local/Calpont/bin/transactionLogArchiver.sh -/usr/local/Calpont/bin/system_installer.sh -/usr/local/Calpont/bin/installer -/usr/local/Calpont/bin/module_installer.sh -/usr/local/Calpont/bin/patchInstaller -/usr/local/Calpont/bin/patch_installer.sh -/usr/local/Calpont/bin/xm_installer.sh -/usr/local/Calpont/bin/calpontUninstall.sh -/usr/local/Calpont/bin/director_installer.sh -/usr/local/Calpont/bin/user_installer.sh -/usr/local/Calpont/bin/performance_installer.sh -/usr/local/Calpont/bin/startupTests.sh -/usr/local/Calpont/bin/os_check.sh -/usr/local/Calpont/bin/sendtrap -/usr/local/Calpont/bin/remote_scp_put.sh -/usr/local/Calpont/bin/remotessh.exp -/usr/local/Calpont/bin/ServerMonitor -/usr/local/Calpont/bin/master-rep-infinidb.sh -/usr/local/Calpont/bin/slave-rep-infinidb.sh -/usr/local/Calpont/bin/rsync.sh -/usr/local/Calpont/bin/calpontSupport -/usr/local/Calpont/bin/hardwareReport.sh -/usr/local/Calpont/bin/softwareReport.sh -/usr/local/Calpont/bin/configReport.sh -/usr/local/Calpont/bin/logReport.sh -/usr/local/Calpont/bin/bulklogReport.sh -/usr/local/Calpont/bin/resourceReport.sh -/usr/local/Calpont/bin/hadoopReport.sh -/usr/local/Calpont/bin/alarmReport.sh -/usr/local/Calpont/bin/amazonInstaller -/usr/local/Calpont/bin/remote_command_verify.sh -/usr/local/Calpont/bin/disable-rep-infinidb.sh +/usr/local/MariaDB/Columnstore/bin/DDLProc +/usr/local/MariaDB/Columnstore/bin/ExeMgr +/usr/local/MariaDB/Columnstore/bin/ProcMgr +/usr/local/MariaDB/Columnstore/bin/ProcMon +/usr/local/MariaDB/Columnstore/bin/DMLProc +/usr/local/MariaDB/Columnstore/bin/WriteEngineServer +/usr/local/MariaDB/Columnstore/bin/cpimport +/usr/local/MariaDB/Columnstore/bin/post-install +/usr/local/MariaDB/Columnstore/bin/post-mysql-install +/usr/local/MariaDB/Columnstore/bin/post-mysqld-install +/usr/local/MariaDB/Columnstore/bin/pre-uninstall +/usr/local/MariaDB/Columnstore/bin/PrimProc +/usr/local/MariaDB/Columnstore/bin/DecomSvr +/usr/local/MariaDB/Columnstore/bin/upgrade-infinidb.sh +/usr/local/MariaDB/Columnstore/bin/run.sh +/usr/local/MariaDB/Columnstore/bin/infinidb +/usr/local/MariaDB/Columnstore/bin/calpontSyslog +/usr/local/MariaDB/Columnstore/bin/calpontSyslog7 +/usr/local/MariaDB/Columnstore/bin/calpontSyslog-ng +/usr/local/MariaDB/Columnstore/bin/syslogSetup.sh +/usr/local/MariaDB/Columnstore/bin/cplogger +/usr/local/MariaDB/Columnstore/bin/infinidb.def +/usr/local/MariaDB/Columnstore/bin/dbbuilder +/usr/local/MariaDB/Columnstore/bin/cpimport.bin +/usr/local/MariaDB/Columnstore/bin/load_brm +/usr/local/MariaDB/Columnstore/bin/save_brm +/usr/local/MariaDB/Columnstore/bin/dbrmctl +/usr/local/MariaDB/Columnstore/bin/controllernode +/usr/local/MariaDB/Columnstore/bin/reset_locks +/usr/local/MariaDB/Columnstore/bin/workernode +/usr/local/MariaDB/Columnstore/bin/colxml +/usr/local/MariaDB/Columnstore/bin/clearShm +/usr/local/MariaDB/Columnstore/bin/viewtablelock +/usr/local/MariaDB/Columnstore/bin/cleartablelock +/usr/local/MariaDB/Columnstore/bin/mcsadmin +/usr/local/MariaDB/Columnstore/bin/trapHandler +/usr/local/MariaDB/Columnstore/bin/remote_command.sh +/usr/local/MariaDB/Columnstore/bin/postConfigure +/usr/local/MariaDB/Columnstore/bin/calpontLogRotate +/usr/local/MariaDB/Columnstore/bin/transactionLog +/usr/local/MariaDB/Columnstore/bin/calpontDBWrite +/usr/local/MariaDB/Columnstore/bin/transactionLogArchiver.sh +/usr/local/MariaDB/Columnstore/bin/system_installer.sh +/usr/local/MariaDB/Columnstore/bin/installer +/usr/local/MariaDB/Columnstore/bin/module_installer.sh +/usr/local/MariaDB/Columnstore/bin/patchInstaller +/usr/local/MariaDB/Columnstore/bin/patch_installer.sh +/usr/local/MariaDB/Columnstore/bin/xm_installer.sh +/usr/local/MariaDB/Columnstore/bin/calpontUninstall.sh +/usr/local/MariaDB/Columnstore/bin/director_installer.sh +/usr/local/MariaDB/Columnstore/bin/user_installer.sh +/usr/local/MariaDB/Columnstore/bin/performance_installer.sh +/usr/local/MariaDB/Columnstore/bin/startupTests.sh +/usr/local/MariaDB/Columnstore/bin/os_check.sh +/usr/local/MariaDB/Columnstore/bin/sendtrap +/usr/local/MariaDB/Columnstore/bin/remote_scp_put.sh +/usr/local/MariaDB/Columnstore/bin/remotessh.exp +/usr/local/MariaDB/Columnstore/bin/ServerMonitor +/usr/local/MariaDB/Columnstore/bin/master-rep-infinidb.sh +/usr/local/MariaDB/Columnstore/bin/slave-rep-infinidb.sh +/usr/local/MariaDB/Columnstore/bin/rsync.sh +/usr/local/MariaDB/Columnstore/bin/calpontSupport +/usr/local/MariaDB/Columnstore/bin/hardwareReport.sh +/usr/local/MariaDB/Columnstore/bin/softwareReport.sh +/usr/local/MariaDB/Columnstore/bin/configReport.sh +/usr/local/MariaDB/Columnstore/bin/logReport.sh +/usr/local/MariaDB/Columnstore/bin/bulklogReport.sh +/usr/local/MariaDB/Columnstore/bin/resourceReport.sh +/usr/local/MariaDB/Columnstore/bin/hadoopReport.sh +/usr/local/MariaDB/Columnstore/bin/alarmReport.sh +/usr/local/MariaDB/Columnstore/bin/amazonInstaller +/usr/local/MariaDB/Columnstore/bin/remote_command_verify.sh +/usr/local/MariaDB/Columnstore/bin/disable-rep-infinidb.sh # -%config /usr/local/Calpont/etc/Calpont.xml -%config /usr/local/Calpont/etc/ConsoleCmds.xml -%config /usr/local/Calpont/etc/ProcessConfig.xml -%config /usr/local/Calpont/etc/snmpd.conf -%config /usr/local/Calpont/etc/snmptrapd.conf -%config /usr/local/Calpont/etc/Calpont.xml.singleserver -%config /usr/local/Calpont/etc/ProcessConfig.xml.singleserver -%config /usr/local/Calpont/etc/snmpd.conf.singleserver -%config /usr/local/Calpont/etc/snmptrapd.conf.singleserver +%config /usr/local/MariaDB/Columnstore/etc/Calpont.xml +%config /usr/local/MariaDB/Columnstore/etc/ConsoleCmds.xml +%config /usr/local/MariaDB/Columnstore/etc/ProcessConfig.xml +%config /usr/local/MariaDB/Columnstore/etc/snmpd.conf +%config /usr/local/MariaDB/Columnstore/etc/snmptrapd.conf +%config /usr/local/MariaDB/Columnstore/etc/Calpont.xml.singleserver +%config /usr/local/MariaDB/Columnstore/etc/ProcessConfig.xml.singleserver +%config /usr/local/MariaDB/Columnstore/etc/snmpd.conf.singleserver +%config /usr/local/MariaDB/Columnstore/etc/snmptrapd.conf.singleserver # -/usr/local/Calpont/etc/MessageFile.txt -/usr/local/Calpont/etc/ErrorMessage.txt +/usr/local/MariaDB/Columnstore/etc/MessageFile.txt +/usr/local/MariaDB/Columnstore/etc/ErrorMessage.txt # -%attr(0666, root, root) /usr/local/Calpont/local/module +%attr(0666, root, root) /usr/local/MariaDB/Columnstore/local/module # -/usr/local/Calpont/releasenum +/usr/local/MariaDB/Columnstore/releasenum # Tools... -/usr/local/Calpont/bin/rollback -/usr/local/Calpont/bin/editem -/usr/local/Calpont/bin/getConfig -/usr/local/Calpont/bin/setConfig -/usr/local/Calpont/bin/setenv-hdfs-12 -/usr/local/Calpont/bin/setenv-hdfs-20 -/usr/local/Calpont/bin/hdfsCheck -/usr/local/Calpont/bin/configxml.sh -/usr/local/Calpont/bin/remote_scp_get.sh -/usr/local/Calpont/bin/calpontAlias -/usr/local/Calpont/bin/autoConfigure -/usr/local/Calpont/bin/ddlcleanup -/usr/local/Calpont/bin/idbmeminfo -/usr/local/Calpont/bin/IDBInstanceCmds.sh -/usr/local/Calpont/bin/IDBVolumeCmds.sh -/usr/local/Calpont/bin/binary_installer.sh -/usr/local/Calpont/bin/myCnf-include-args.text -/usr/local/Calpont/bin/myCnf-exclude-args.text -/usr/local/Calpont/bin/mycnfUpgrade -/usr/local/Calpont/bin/getMySQLpw -/usr/local/Calpont/bin/infinidb.conf +/usr/local/MariaDB/Columnstore/bin/rollback +/usr/local/MariaDB/Columnstore/bin/editem +/usr/local/MariaDB/Columnstore/bin/getConfig +/usr/local/MariaDB/Columnstore/bin/setConfig +/usr/local/MariaDB/Columnstore/bin/setenv-hdfs-12 +/usr/local/MariaDB/Columnstore/bin/setenv-hdfs-20 +/usr/local/MariaDB/Columnstore/bin/hdfsCheck +/usr/local/MariaDB/Columnstore/bin/configxml.sh +/usr/local/MariaDB/Columnstore/bin/remote_scp_get.sh +/usr/local/MariaDB/Columnstore/bin/calpontAlias +/usr/local/MariaDB/Columnstore/bin/autoConfigure +/usr/local/MariaDB/Columnstore/bin/ddlcleanup +/usr/local/MariaDB/Columnstore/bin/idbmeminfo +/usr/local/MariaDB/Columnstore/bin/IDBInstanceCmds.sh +/usr/local/MariaDB/Columnstore/bin/IDBVolumeCmds.sh +/usr/local/MariaDB/Columnstore/bin/binary_installer.sh +/usr/local/MariaDB/Columnstore/bin/myCnf-include-args.text +/usr/local/MariaDB/Columnstore/bin/myCnf-exclude-args.text +/usr/local/MariaDB/Columnstore/bin/mycnfUpgrade +/usr/local/MariaDB/Columnstore/bin/getMySQLpw +/usr/local/MariaDB/Columnstore/bin/infinidb.conf -/usr/local/Calpont/sbin/snmpd -/usr/local/Calpont/sbin/snmptrapd -%config %attr(0666, root, root) /usr/local/Calpont/etc/AlarmConfig.xml +/usr/local/MariaDB/Columnstore/sbin/snmpd +/usr/local/MariaDB/Columnstore/sbin/snmptrapd +%config %attr(0666, root, root) /usr/local/MariaDB/Columnstore/etc/AlarmConfig.xml # -%config /usr/local/Calpont/local/snmpdx.conf -%config /usr/local/Calpont/local/snmpdx.conf.singleserver +%config /usr/local/MariaDB/Columnstore/local/snmpdx.conf +%config /usr/local/MariaDB/Columnstore/local/snmpdx.conf.singleserver # -/usr/local/Calpont/share/snmp/mibs/AGENTX-MIB.txt -/usr/local/Calpont/share/snmp/mibs/CALPONT-MIB.txt -/usr/local/Calpont/share/snmp/mibs/DISMAN-EVENT-MIB.txt -/usr/local/Calpont/share/snmp/mibs/DISMAN-SCHEDULE-MIB.txt -/usr/local/Calpont/share/snmp/mibs/DISMAN-SCRIPT-MIB.txt -/usr/local/Calpont/share/snmp/mibs/EtherLike-MIB.txt -/usr/local/Calpont/share/snmp/mibs/HCNUM-TC.txt -/usr/local/Calpont/share/snmp/mibs/HOST-RESOURCES-MIB.txt -/usr/local/Calpont/share/snmp/mibs/HOST-RESOURCES-TYPES.txt -/usr/local/Calpont/share/snmp/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt -/usr/local/Calpont/share/snmp/mibs/IANAifType-MIB.txt -/usr/local/Calpont/share/snmp/mibs/IANA-LANGUAGE-MIB.txt -/usr/local/Calpont/share/snmp/mibs/IANA-RTPROTO-MIB.txt -/usr/local/Calpont/share/snmp/mibs/IF-INVERTED-STACK-MIB.txt -/usr/local/Calpont/share/snmp/mibs/IF-MIB.txt -/usr/local/Calpont/share/snmp/mibs/INET-ADDRESS-MIB.txt -/usr/local/Calpont/share/snmp/mibs/IP-FORWARD-MIB.txt -/usr/local/Calpont/share/snmp/mibs/IP-MIB.txt -/usr/local/Calpont/share/snmp/mibs/IPV6-ICMP-MIB.txt -/usr/local/Calpont/share/snmp/mibs/IPV6-MIB.txt -/usr/local/Calpont/share/snmp/mibs/IPV6-TCP-MIB.txt -/usr/local/Calpont/share/snmp/mibs/IPV6-TC.txt -/usr/local/Calpont/share/snmp/mibs/IPV6-UDP-MIB.txt -/usr/local/Calpont/share/snmp/mibs/NET-SNMP-AGENT-MIB.txt -/usr/local/Calpont/share/snmp/mibs/NET-SNMP-EXAMPLES-MIB.txt -/usr/local/Calpont/share/snmp/mibs/NET-SNMP-EXTEND-MIB.txt -/usr/local/Calpont/share/snmp/mibs/NET-SNMP-MIB.txt -/usr/local/Calpont/share/snmp/mibs/NET-SNMP-TC.txt -/usr/local/Calpont/share/snmp/mibs/NOTIFICATION-LOG-MIB.txt -/usr/local/Calpont/share/snmp/mibs/RFC1155-SMI.txt -/usr/local/Calpont/share/snmp/mibs/RFC1213-MIB.txt -/usr/local/Calpont/share/snmp/mibs/RFC-1215.txt -/usr/local/Calpont/share/snmp/mibs/RMON-MIB.txt -/usr/local/Calpont/share/snmp/mibs/SMUX-MIB.txt -/usr/local/Calpont/share/snmp/mibs/SNMP-COMMUNITY-MIB.txt -/usr/local/Calpont/share/snmp/mibs/SNMP-FRAMEWORK-MIB.txt -/usr/local/Calpont/share/snmp/mibs/SNMP-MPD-MIB.txt -/usr/local/Calpont/share/snmp/mibs/SNMP-NOTIFICATION-MIB.txt -/usr/local/Calpont/share/snmp/mibs/SNMP-PROXY-MIB.txt -/usr/local/Calpont/share/snmp/mibs/SNMP-TARGET-MIB.txt -/usr/local/Calpont/share/snmp/mibs/SNMP-USER-BASED-SM-MIB.txt -/usr/local/Calpont/share/snmp/mibs/SNMP-USM-AES-MIB.txt -/usr/local/Calpont/share/snmp/mibs/SNMP-USM-DH-OBJECTS-MIB.txt -/usr/local/Calpont/share/snmp/mibs/SNMPv2-CONF.txt -/usr/local/Calpont/share/snmp/mibs/SNMPv2-MIB.txt -/usr/local/Calpont/share/snmp/mibs/SNMPv2-SMI.txt -/usr/local/Calpont/share/snmp/mibs/SNMPv2-TC.txt -/usr/local/Calpont/share/snmp/mibs/SNMPv2-TM.txt -/usr/local/Calpont/share/snmp/mibs/SNMP-VIEW-BASED-ACM-MIB.txt -/usr/local/Calpont/share/snmp/mibs/TCP-MIB.txt -/usr/local/Calpont/share/snmp/mibs/TRANSPORT-ADDRESS-MIB.txt -/usr/local/Calpont/share/snmp/mibs/UCD-DEMO-MIB.txt -/usr/local/Calpont/share/snmp/mibs/UCD-DISKIO-MIB.txt -/usr/local/Calpont/share/snmp/mibs/UCD-DLMOD-MIB.txt -/usr/local/Calpont/share/snmp/mibs/UCD-IPFWACC-MIB.txt -/usr/local/Calpont/share/snmp/mibs/UCD-SNMP-MIB.txt -/usr/local/Calpont/share/snmp/mibs/UDP-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/AGENTX-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/CALPONT-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/DISMAN-EVENT-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/DISMAN-SCHEDULE-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/DISMAN-SCRIPT-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/EtherLike-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/HCNUM-TC.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/HOST-RESOURCES-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/HOST-RESOURCES-TYPES.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IANAifType-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IANA-LANGUAGE-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IANA-RTPROTO-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IF-INVERTED-STACK-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IF-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/INET-ADDRESS-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IP-FORWARD-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IP-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IPV6-ICMP-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IPV6-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IPV6-TCP-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IPV6-TC.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/IPV6-UDP-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/NET-SNMP-AGENT-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/NET-SNMP-EXAMPLES-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/NET-SNMP-EXTEND-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/NET-SNMP-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/NET-SNMP-TC.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/NOTIFICATION-LOG-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/RFC1155-SMI.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/RFC1213-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/RFC-1215.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/RMON-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SMUX-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-COMMUNITY-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-FRAMEWORK-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-MPD-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-NOTIFICATION-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-PROXY-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-TARGET-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-USER-BASED-SM-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-USM-AES-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-USM-DH-OBJECTS-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMPv2-CONF.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMPv2-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMPv2-SMI.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMPv2-TC.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMPv2-TM.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-VIEW-BASED-ACM-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/TCP-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/TRANSPORT-ADDRESS-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/UCD-DEMO-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/UCD-DISKIO-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/UCD-DLMOD-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/UCD-IPFWACC-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/UCD-SNMP-MIB.txt +/usr/local/MariaDB/Columnstore/share/snmp/mibs/UDP-MIB.txt # -/usr/local/Calpont/post/functions -/usr/local/Calpont/post/test-001.sh -/usr/local/Calpont/post/test-002.sh -/usr/local/Calpont/post/test-003.sh -/usr/local/Calpont/post/test-004.sh +/usr/local/MariaDB/Columnstore/post/functions +/usr/local/MariaDB/Columnstore/post/test-001.sh +/usr/local/MariaDB/Columnstore/post/test-002.sh +/usr/local/MariaDB/Columnstore/post/test-003.sh +/usr/local/MariaDB/Columnstore/post/test-004.sh %files enterprise %defattr(-, root, root) -/usr/local/Calpont/bin/displayJobGraph.sh -/usr/local/Calpont/bin/dbhealth.sh -/usr/local/Calpont/bin/dbhealth.sql +/usr/local/MariaDB/Columnstore/bin/displayJobGraph.sh +/usr/local/MariaDB/Columnstore/bin/dbhealth.sh +/usr/local/MariaDB/Columnstore/bin/dbhealth.sql # Tools... -/usr/local/Calpont/bin/dumpcol -/usr/local/Calpont/bin/oid2file -/usr/local/Calpont/bin/evalcol -/usr/local/Calpont/bin/SesMgr -/usr/local/Calpont/bin/dumpVss -/usr/local/Calpont/bin/editTxn -/usr/local/Calpont/bin/dbprof.pl -/usr/local/Calpont/bin/dumpobm -/usr/local/Calpont/bin/file2oid.pl -/usr/local/Calpont/bin/print_journal -/usr/local/Calpont/bin/healthcheck -/usr/local/Calpont/bin/glusterctl -/usr/local/Calpont/bin/glusteradd -/usr/local/Calpont/bin/glusterconf -/usr/local/Calpont/bin/redistributeDB -/usr/local/Calpont/bin/databaseSizeReport -/usr/local/Calpont/bin/gdb +/usr/local/MariaDB/Columnstore/bin/dumpcol +/usr/local/MariaDB/Columnstore/bin/oid2file +/usr/local/MariaDB/Columnstore/bin/evalcol +/usr/local/MariaDB/Columnstore/bin/SesMgr +/usr/local/MariaDB/Columnstore/bin/dumpVss +/usr/local/MariaDB/Columnstore/bin/editTxn +/usr/local/MariaDB/Columnstore/bin/dbprof.pl +/usr/local/MariaDB/Columnstore/bin/dumpobm +/usr/local/MariaDB/Columnstore/bin/file2oid.pl +/usr/local/MariaDB/Columnstore/bin/print_journal +/usr/local/MariaDB/Columnstore/bin/healthcheck +/usr/local/MariaDB/Columnstore/bin/glusterctl +/usr/local/MariaDB/Columnstore/bin/glusteradd +/usr/local/MariaDB/Columnstore/bin/glusterconf +/usr/local/MariaDB/Columnstore/bin/redistributeDB +/usr/local/MariaDB/Columnstore/bin/databaseSizeReport +/usr/local/MariaDB/Columnstore/bin/gdb # -/usr/local/Calpont/tools/copy2here.sh -/usr/local/Calpont/tools/getlogs.sh -/usr/local/Calpont/tools/getmodules.sh -/usr/local/Calpont/tools/getps.sh -/usr/local/Calpont/tools/getsar.sh -/usr/local/Calpont/tools/getuserinput.sh -/usr/local/Calpont/tools/prat -/usr/local/Calpont/tools/prat.sh -/usr/local/Calpont/tools/ps -/usr/local/Calpont/tools/pscollect -/usr/local/Calpont/tools/README -/usr/local/Calpont/tools/tarfiles.sh +/usr/local/MariaDB/Columnstore/tools/copy2here.sh +/usr/local/MariaDB/Columnstore/tools/getlogs.sh +/usr/local/MariaDB/Columnstore/tools/getmodules.sh +/usr/local/MariaDB/Columnstore/tools/getps.sh +/usr/local/MariaDB/Columnstore/tools/getsar.sh +/usr/local/MariaDB/Columnstore/tools/getuserinput.sh +/usr/local/MariaDB/Columnstore/tools/prat +/usr/local/MariaDB/Columnstore/tools/prat.sh +/usr/local/MariaDB/Columnstore/tools/ps +/usr/local/MariaDB/Columnstore/tools/pscollect +/usr/local/MariaDB/Columnstore/tools/README +/usr/local/MariaDB/Columnstore/tools/tarfiles.sh # %files libs %defattr(-, root, root) -/usr/local/Calpont/lib/libconfigcpp.so.1.0.0 -/usr/local/Calpont/lib/libddlpackageproc.so.1.0.0 -/usr/local/Calpont/lib/libddlpackage.so.1.0.0 -/usr/local/Calpont/lib/libdmlpackageproc.so.1.0.0 -/usr/local/Calpont/lib/libdmlpackage.so.1.0.0 -/usr/local/Calpont/lib/libexecplan.so.1.0.0 -/usr/local/Calpont/lib/libfuncexp.so.1.0.0 -/usr/local/Calpont/lib/libudfsdk.so.1.0.0 -/usr/local/Calpont/lib/libjoblist.so.1.0.0 -/usr/local/Calpont/lib/libjoiner.so.1.0.0 -/usr/local/Calpont/lib/libloggingcpp.so.1.0.0 -/usr/local/Calpont/lib/libmessageqcpp.so.1.0.0 -/usr/local/Calpont/lib/libnetsnmpagent.so.5.2.1 -/usr/local/Calpont/lib/libnetsnmphelpers.so.5.2.1 -/usr/local/Calpont/lib/libnetsnmpmibs.so.5.2.1 -/usr/local/Calpont/lib/libnetsnmp.so.5.2.1 -/usr/local/Calpont/lib/libnetsnmptrapd.so.5.2.1 -/usr/local/Calpont/lib/liboamcpp.so.1.0.0 -/usr/local/Calpont/lib/libsnmpmanager.so.1.0.0 -/usr/local/Calpont/lib/libthreadpool.so.1.0.0 -/usr/local/Calpont/lib/libwindowfunction.so.1.0.0 -/usr/local/Calpont/lib/libwriteengine.so.1.0.0 -/usr/local/Calpont/lib/libwriteengineclient.so.1.0.0 -/usr/local/Calpont/lib/libbrm.so.1.0.0 -/usr/local/Calpont/lib/librwlock.so.1.0.0 -/usr/local/Calpont/lib/libdataconvert.so.1.0.0 -/usr/local/Calpont/lib/librowgroup.so.1.0.0 -/usr/local/Calpont/lib/libcacheutils.so.1.0.0 -/usr/local/Calpont/lib/libcommon.so.1.0.0 -/usr/local/Calpont/lib/libboost_idb.so.1.0.0 -/usr/local/Calpont/lib/libcompress.so.1.0.0 -/usr/local/Calpont/lib/libddlcleanuputil.so.1.0.0 -/usr/local/Calpont/lib/libbatchloader.so.1.0.0 -/usr/local/Calpont/lib/libmysqlcl_idb.so.1.0.0 -/usr/local/Calpont/lib/libquerystats.so.1.0.0 -/usr/local/Calpont/lib/libwriteengineredistribute.so.1.0.0 -/usr/local/Calpont/lib/libjemalloc.so.3.3.0 -/usr/local/Calpont/lib/libidbdatafile.so.1.0.0 -/usr/local/Calpont/lib/hdfs-20.so -/usr/local/Calpont/lib/hdfs-12.so -/usr/local/Calpont/lib/libgcc_s.so.1 -/usr/local/Calpont/lib/libstdc++.so.6.0.14 -/usr/local/Calpont/lib/libthrift.so.1.0.0 -/usr/local/Calpont/lib/libquerytele.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libconfigcpp.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libddlpackageproc.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libddlpackage.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libdmlpackageproc.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libdmlpackage.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libexecplan.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libfuncexp.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libudfsdk.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libjoblist.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libjoiner.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libloggingcpp.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libmessageqcpp.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libnetsnmpagent.so.5.2.1 +/usr/local/MariaDB/Columnstore/lib/libnetsnmphelpers.so.5.2.1 +/usr/local/MariaDB/Columnstore/lib/libnetsnmpmibs.so.5.2.1 +/usr/local/MariaDB/Columnstore/lib/libnetsnmp.so.5.2.1 +/usr/local/MariaDB/Columnstore/lib/libnetsnmptrapd.so.5.2.1 +/usr/local/MariaDB/Columnstore/lib/liboamcpp.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libsnmpmanager.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libthreadpool.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libwindowfunction.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libwriteengine.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libwriteengineclient.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libbrm.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/librwlock.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libdataconvert.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/librowgroup.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libcacheutils.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libcommon.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libboost_idb.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libcompress.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libddlcleanuputil.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libbatchloader.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libmysqlcl_idb.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libquerystats.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libwriteengineredistribute.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libjemalloc.so.3.3.0 +/usr/local/MariaDB/Columnstore/lib/libidbdatafile.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/hdfs-20.so +/usr/local/MariaDB/Columnstore/lib/hdfs-12.so +/usr/local/MariaDB/Columnstore/lib/libgcc_s.so.1 +/usr/local/MariaDB/Columnstore/lib/libstdc++.so.6.0.14 +/usr/local/MariaDB/Columnstore/lib/libthrift.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libquerytele.so.1.0.0 %files storage-engine -/usr/local/Calpont/lib/libcalmysql.so.1.0.0 -/usr/local/Calpont/lib/libudf_mysql.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libcalmysql.so.1.0.0 +/usr/local/MariaDB/Columnstore/lib/libudf_mysql.so.1.0.0 -/usr/local/Calpont/mysql/mysql-Calpont -/usr/local/Calpont/mysql/install_calpont_mysql.sh -/usr/local/Calpont/mysql/syscatalog_mysql.sql -/usr/local/Calpont/mysql/dumpcat_mysql.sql -/usr/local/Calpont/mysql/dumpcat.pl -/usr/local/Calpont/mysql/calsetuserpriority.sql -/usr/local/Calpont/mysql/calremoveuserpriority.sql -/usr/local/Calpont/mysql/calshowprocesslist.sql +/usr/local/MariaDB/Columnstore/mysql/mysql-Calpont +/usr/local/MariaDB/Columnstore/mysql/install_calpont_mysql.sh +/usr/local/MariaDB/Columnstore/mysql/syscatalog_mysql.sql +/usr/local/MariaDB/Columnstore/mysql/dumpcat_mysql.sql +/usr/local/MariaDB/Columnstore/mysql/dumpcat.pl +/usr/local/MariaDB/Columnstore/mysql/calsetuserpriority.sql +/usr/local/MariaDB/Columnstore/mysql/calremoveuserpriority.sql +/usr/local/MariaDB/Columnstore/mysql/calshowprocesslist.sql -%config /usr/local/Calpont/mysql/my.cnf +%config /usr/local/MariaDB/Columnstore/mysql/my.cnf # # Scriptlets @@ -376,7 +376,7 @@ fi prefix=/usr/local -test -x /usr/local/Calpont/bin/post-install && /usr/local/Calpont/bin/post-install --prefix=$prefix --rpmmode=$rpmmode +test -x /usr/local/MariaDB/Columnstore/bin/post-install && /usr/local/MariaDB/Columnstore/bin/post-install --prefix=$prefix --rpmmode=$rpmmode echo "InfinIDB RPM install completed" @@ -428,7 +428,7 @@ else fi if [ $rpmmode = erase ]; then - test -x /usr/local/Calpont/bin/pre-uninstall && /usr/local/Calpont/bin/pre-uninstall + test -x /usr/local/MariaDB/Columnstore/bin/pre-uninstall && /usr/local/MariaDB/Columnstore/bin/pre-uninstall fi exit 0 diff --git a/build/releasenum b/build/releasenum index 159b11e89..77bcd0690 100644 --- a/build/releasenum +++ b/build/releasenum @@ -1,5 +1,5 @@ # -version=5.0 -release=0 +version=10.0 +release=1 diff --git a/build/releasenum~ b/build/releasenum~ new file mode 100644 index 000000000..159b11e89 --- /dev/null +++ b/build/releasenum~ @@ -0,0 +1,5 @@ +# + +version=5.0 +release=0 + diff --git a/dbcon/execplan/tdriver-sm.cpp b/dbcon/execplan/tdriver-sm.cpp index f7c5e54a8..817d41a77 100644 --- a/dbcon/execplan/tdriver-sm.cpp +++ b/dbcon/execplan/tdriver-sm.cpp @@ -148,7 +148,7 @@ public: void destroySemaphores() { key_t semkey; - char* semseed = "/usr/local/Calpont/etc/Calpont.xml"; + char* semseed = "/usr/local/MariaDB/Columnstore/etc/Calpont.xml"; int sems, err; // semkey = ftok(semseed, 0x2149bdd2); // these things must match in the SM constructor @@ -166,7 +166,7 @@ public: void destroyShmseg() { key_t shmkey; - char* shmseed = "/usr/local/Calpont/etc/Calpont.xml"; + char* shmseed = "/usr/local/MariaDB/Columnstore/etc/Calpont.xml"; int shms, err; // shmkey = ftok(shmseed, 0x2149bdd2); // these things much match in the SM constructor diff --git a/dbcon/execplan/tdriver.cpp b/dbcon/execplan/tdriver.cpp index 91a328ce6..b9da4e6ff 100644 --- a/dbcon/execplan/tdriver.cpp +++ b/dbcon/execplan/tdriver.cpp @@ -1082,7 +1082,7 @@ public: int oid, oidBase; // fake out the objmgr... - setenv("CALPONT_CONFIG_FILE", "/usr/local/Calpont/etc/Calpont.xml", 1); + setenv("CALPONT_CONFIG_FILE", "/usr/local/MariaDB/Columnstore/etc/Calpont.xml", 1); Config* cf = Config::makeConfig(); cf->setConfig("OIDManager", "OIDBitmapFile", "./oidbitmap"); diff --git a/dbcon/joblist/tdriver-agg.cpp b/dbcon/joblist/tdriver-agg.cpp index f25fd5018..7b3778b9f 100644 --- a/dbcon/joblist/tdriver-agg.cpp +++ b/dbcon/joblist/tdriver-agg.cpp @@ -65,7 +65,7 @@ const uint32_t MAX_SIZE = 0x100000; const uint32_t MAX_ELEMENTS = 0x20000; const uint32_t NUM_THREADS = 4; const string datapath="/home/zzhu/genii/tools/dbbuilder/lineitem.tbl"; -//const string datapath="/usr/local/Calpont/bin/lineitem.tbl"; +//const string datapath="/usr/local/MariaDB/Columnstore/bin/lineitem.tbl"; int numConsumers = 1; int numRuns = 1; int printInterval = numRuns * 100000; diff --git a/dbcon/mysql/install_calpont_mysql.sh b/dbcon/mysql/install_calpont_mysql.sh index 0f26a62b1..7f5fae72b 100755 --- a/dbcon/mysql/install_calpont_mysql.sh +++ b/dbcon/mysql/install_calpont_mysql.sh @@ -4,14 +4,14 @@ # prefix=/usr/local -installdir=$prefix/Calpont +installdir=$prefix/MariaDB/Columnstore rpmmode=install pwprompt=" " for arg in "$@"; do if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then prefix="`echo $arg | awk -F= '{print $2}'`" - installdir=$prefix/Calpont + installdir=$prefix/MariaDB/Columnstore elif [ `expr -- "$arg" : '--rpmmode='` -eq 10 ]; then rpmmode="`echo $arg | awk -F= '{print $2}'`" elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then diff --git a/ddlproc/Makefile b/ddlproc/Makefile index 0b8793b78..f28803fb5 100755 --- a/ddlproc/Makefile +++ b/ddlproc/Makefile @@ -21,7 +21,7 @@ CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2 CXXFLAGS+=$(DEBUG_FLAGS) -Wall # Linker flags -LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_WRITE_LIBS) $(IDB_COMMON_LIBS) -lthreadpool $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_WRITE_LIBS) $(IDB_COMMON_LIBS) -lthreadpool $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib # install dir (set CALPONT_INSTALL_ROOT in env to override) CALPONT_INSTALL_ROOT?=$(EXPORT_ROOT) diff --git a/decomsvr/Makefile b/decomsvr/Makefile index 53d6b5fd2..bf33b51e1 100755 --- a/decomsvr/Makefile +++ b/decomsvr/Makefile @@ -23,7 +23,7 @@ CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2 CXXFLAGS+=$(DEBUG_FLAGS) -Wall # Linker flags -LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) -lboost_idb -Wl,--rpath -Wl,/usr/local/Calpont/lib -lrt +LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) -lboost_idb -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib -lrt .PHONY: install clean test docs coverage leakcheck diff --git a/dmlproc/Makefile b/dmlproc/Makefile index 700690143..c061b757a 100755 --- a/dmlproc/Makefile +++ b/dmlproc/Makefile @@ -24,7 +24,7 @@ CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2 CXXFLAGS+=$(DEBUG_FLAGS) -Wall # Linker flags -LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_WRITE_LIBS) $(IDB_COMMON_LIBS) -lthreadpool -lddlcleanuputil -lbatchloader $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_WRITE_LIBS) $(IDB_COMMON_LIBS) -lthreadpool -lddlcleanuputil -lbatchloader $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib # install dir (set CALPONT_INSTALL_ROOT in env to override) CALPONT_INSTALL_ROOT?=$(EXPORT_ROOT) diff --git a/exemgr/Makefile b/exemgr/Makefile index 4e1ea5fa1..92682c5a4 100755 --- a/exemgr/Makefile +++ b/exemgr/Makefile @@ -23,7 +23,7 @@ CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2 CXXFLAGS+=$(DEBUG_FLAGS) -Wall # Linker flags -LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_COMMON_LIBS) -lcacheutils -lthreadpool $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_COMMON_LIBS) -lcacheutils -lthreadpool $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib .PHONY: install clean test docs FORCE coverage leakcheck diff --git a/export/bin/binary_installer.sh b/export/bin/binary_installer.sh new file mode 100755 index 000000000..c8a20ee38 --- /dev/null +++ b/export/bin/binary_installer.sh @@ -0,0 +1,330 @@ +#!/usr/bin/expect +# +# $Id$ +# +# Install RPM and custom OS files on system +# Argument 1 - Remote Module Name +# Argument 2 - Remote Server Host Name or IP address +# Argument 3 - User Password of remote server +# Argument 4 - Package name being installed +# Argument 5 - Module type? +# Argument 6 - Install Type, "initial" or "upgrade" +# Argument 7 - Server type? +# Argument 8 - Debug flag 1 for on, 0 for off +# Argument 9 - install dir (optional) +# Argument 10 - user name (optional) +set USERNAME root +set MODULE [lindex $argv 0] +set SERVER [lindex $argv 1] +set PASSWORD [lindex $argv 2] +set CALPONTPKG [lindex $argv 3] +set MODULETYPE [lindex $argv 4] +set INSTALLTYPE [lindex $argv 5] +set PKGTYPE "binary" +set SERVERTYPE [lindex $argv 6] +set MYSQLPORT [lindex $argv 7] +set DEBUG [lindex $argv 8] +set INSTALLDIR "/usr/local/MariaDB/Columnstore" +set IDIR [lindex $argv 9] +if { $IDIR != "" } { + set INSTALLDIR $IDIR +} +set env(INFINIDB_INSTALL_DIR) $INSTALLDIR +set PREFIX [file dirname $INSTALLDIR] +set USERNAME $env(USER) +set UNM [lindex $argv 10] +if { $UNM != "" } { + set USERNAME $UNM +} + +set BASH "/bin/bash " +if { $DEBUG == "1" } { + set BASH "/bin/bash -x " +} + +log_user $DEBUG +spawn -noecho /bin/bash +# + +if { $INSTALLTYPE == "initial" || $INSTALLTYPE == "uninstall" } { + # + # remove Calpont files + # + send_user "Uninstall Calpont Package " + send " \n" + send date\n + send "ssh $USERNAME@$SERVER 'rm -f /etc/init.d/infinidb /etc/init.d/mysql-Calpont $INSTALLDIR/releasenum >/dev/null 2>&1'\n" + set timeout 20 + expect { + "Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit 1} + "service not known" { send_user "FAILED: Invalid Host\n" ; exit 1} + "authenticity" { send "yes\n" + expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + } + } + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 } + "No route to host" { send_user "ERROR: No route to host\n" ; exit 1 } + "Calpont uninstall completed" { send_user "DONE" } + } + set timeout 30 + expect { + "Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1} + "Calpont uninstall completed" { send_user "DONE" } + } + send_user "\n" +} +if { $INSTALLTYPE == "uninstall" } { + exit 0 +} +sleep 10 +# +# send the Calpont package +# +send_user "Copy New Calpont Package to Module " +send " \n" +send date\n +send "scp $CALPONTPKG $USERNAME@$SERVER:$CALPONTPKG\n" +set timeout 10 +expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } +} +set timeout 120 +expect { + "100%" { send_user "DONE" } + "scp:" { send_user "ERROR\n" ; + send_user "\n*** Installation ERROR\n" ; + exit 1 } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 } + "No such file or directory" { send_user "ERROR: Invalid package\n" ; exit 1 } + "Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1} + "Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + "No route to host" { send_user "ERROR: No route to host\n" ; exit 1 } + timeout { send_user "ERROR: Timeout\n" ; exit 1 } +} +send_user "\n" +#sleep to make sure it's finished +sleep 5 +# +# install package +# +send_user "Install Calpont Package on Module " +send " \n" +send date\n +send "ssh $USERNAME@$SERVER 'tar -C $PREFIX --exclude db -zxf $CALPONTPKG;cat $INSTALLDIR/releasenum'\n" +set timeout 10 +expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } +} +set timeout 120 +expect { + "release=" { send_user "DONE" } + "No such file" { send_user "ERROR: Binary Install Failed, binary/releasenum not found\n" ; exit 1 } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 } + "Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1} + "Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + "No route to host" { send_user "ERROR: No route to host\n" ; exit 1 } + timeout { send_user "ERROR: Timeout\n" ; exit 1 } +} +#sleep to give time for cat Calpont/releasenum to complete +sleep 5 + +send_user "\n" +send_user "Run post-install script " +send " \n" +send date\n +send "ssh $USERNAME@$SERVER '$INSTALLDIR/bin/post-install --installdir=$INSTALLDIR'\n" +set timeout 10 +expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } +} +set timeout 60 +# check return +expect { + "InfiniDB syslog logging not working" { send_user "ERROR: InfiniDB System logging not setup\n" ; exit 1 } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 } + "Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1} + "Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + "No route to host" { send_user "ERROR: No route to host\n" ; exit 1 } + "postConfigure" { send_user "DONE" } +} +send_user "\n" +sleep 10 +# +if { $INSTALLTYPE == "initial"} { + # + # copy over calpont config file + # + send_user "Copy Calpont Config file to Module " + send " \n" + send date\n + send "scp $INSTALLDIR/etc/* $USERNAME@$SERVER:$INSTALLDIR/etc\n" + set timeout 10 + expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + } + set timeout 30 + expect { + -re {[$#] } { send_user "DONE" } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 } + "Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1} + "Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + "No route to host" { send_user "ERROR: No route to host\n" ; exit 1 } + } + send_user "\n" + # + # copy over custom OS tmp files + # + send_user "Copy Custom OS files to Module " + send " \n" + send date\n + send "scp -r $INSTALLDIR/local/etc $USERNAME@$SERVER:$INSTALLDIR/local\n" + set timeout 10 + expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + } + set timeout 60 + expect { + -re {[$#] } { send_user "DONE" } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 } + "Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1} + "Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + "No route to host" { send_user "ERROR: No route to host\n" ; exit 1 } + } + send_user "\n" + # + # copy over calpont OS files + # + send_user "Copy Calpont OS files to Module " + send " \n" + send date\n + send "scp $INSTALLDIR/local/etc/$MODULE/* $USERNAME@$SERVER:$INSTALLDIR/local\n" + set timeout 10 + expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + "Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1} + } + set timeout 60 + expect { + -re {[$#] } { send_user "DONE" } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 } + "Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + "No route to host" { send_user "ERROR: No route to host\n" ; exit 1 } + } + send_user "\n" + # + # Start module installer to setup Customer OS files + # + send_user "Run Module Installer " + send " \n" + send date\n + send "ssh $USERNAME@$SERVER '$INSTALLDIR/bin/module_installer.sh --module=$MODULETYPE --port=$MYSQLPORT --installdir=$INSTALLDIR $MODULETYPE'\n" + set timeout 10 + expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + } + set timeout 60 + expect { + "!!!Module" { send_user "DONE" } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 } + "FAILED" { send_user "ERROR: missing module file\n" ; exit 1 } + "Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1} + "Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + "No route to host" { send_user "ERROR: No route to host\n" ; exit 1 } + "No such file" { send_user "ERROR: File Not Found\n" ; exit 1 } + } + send_user "\n" + sleep 10 + if { $MODULETYPE == "um" || $SERVERTYPE == "2" || $SERVERTYPE == "pmwithum" } { + # + # run mysql setup scripts + # + send_user "Run MySQL Setup Scripts on Module " + send " \n" + send date\n + send "ssh $USERNAME@$SERVER '$INSTALLDIR/bin/post-mysqld-install --installdir=$INSTALLDIR'\n" + set timeout 10 + expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + } + set timeout 60 + expect { + "ERROR" { send_user "ERROR: Daemon failed to run"; + exit 1 } + "FAILED" { send_user "ERROR: Daemon failed to run"; + exit 1 } + "Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1} + "Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + "No route to host" { send_user "ERROR: No route to host\n" ; exit 1 } + } + + send " \n" + send date\n + send "ssh $USERNAME@$SERVER '$INSTALLDIR/bin/post-mysql-install --installdir=$INSTALLDIR'\n" + set timeout 10 + expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + } + set timeout 60 + expect { + "Shutting down mysql." { send_user "DONE" } + timeout { send_user "DONE" } + "ERROR" { send_user "ERROR: Daemon failed to run"; + exit 1 } + "FAILED" { send_user "ERROR: Daemon failed to run"; + exit 1 } + "Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1} + "Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + "No route to host" { send_user "ERROR: No route to host\n" ; exit 1 } + } + send_user "\n" + } +} + +# +# check InfiniDB syslog functionality +# +send_user "Check InfiniDB system logging functionality " +send " \n" +send date\n +send "ssh $USERNAME@$SERVER '$INSTALLDIR/bin/syslogSetup.sh check'\n" +set timeout 10 +expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } +} +set timeout 30 +expect { + "Logging working" { send_user "DONE" } + timeout { send_user "DONE" } + "not working" { send_user "WARNING: InfiniDB system logging functionality not working" } + "Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + "No route to host" { send_user "ERROR: No route to host\n" ; exit 1 } +} +send_user "\n" + +send_user "\nInstallation Successfully Completed on '$MODULE'\n" +exit 0 + diff --git a/export/bin/columnstore b/export/bin/columnstore new file mode 100755 index 000000000..c5d44a947 --- /dev/null +++ b/export/bin/columnstore @@ -0,0 +1,184 @@ +#!/bin/bash +# +# $Id: columnstore 3704 2013-08-07 03:33:20Z bwilkinson $ +# +# columnstore Starts MariaDB Columnstore database platform +# +# +# chkconfig: 2345 99 99 +# description: MariaDB Columnstore is a database platform that utilizes Mysql +# +### BEGIN INIT INFO +# Provides: columnstore +# Required-Start: $local_fs $remote_fs $network $syslog $all +# Required-Stop: $local_fs $remote_fs $network $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start/stop InfiniDB DW DBMS +### END INIT INFO + +# Source function library. +if [ -f /etc/init.d/functions ]; then + . /etc/init.d/functions +fi + +if [ -z "$INFINIDB_INSTALL_DIR" ]; then + test -f /etc/default/columnstore && . /etc/default/columnstore +fi + +if [ -z "$INFINIDB_INSTALL_DIR" ]; then + INFINIDB_INSTALL_DIR=/usr/local/MariaDB/Columnstore +fi + +export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR + +InstallDir=$INFINIDB_INSTALL_DIR + +if [ $InstallDir != "/usr/local/Calpont" ]; then + export PATH=$InstallDir/bin:$InstallDir/mysql/bin:/bin:/usr/bin + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$InstallDir/lib:$InstallDir/mysql/lib/mysql +fi + +#hadoop +plugin=`$INFINIDB_INSTALL_DIR/bin/getConfig SystemConfig DataFilePlugin` +if [ -n "$plugin" ]; then + setenv=`$InstallDir/bin/getConfig SystemConfig DataFileEnvFile` + . $InstallDir/bin/$setenv >/dev/null 2>&1 +fi + +if [ -e $InstallDir/lib/libjemalloc.so ]; then + export LD_PRELOAD=$InstallDir/lib/libjemalloc.so +elif [ -e $InstallDir/lib/libjemalloc.so.1 ]; then + export LD_PRELOAD=$InstallDir/lib/libjemalloc.so.1 +fi + +test -f $InstallDir/post/functions && . $InstallDir/post/functions + +mt=`module_type` +mid=`module_id` + +has_um=`$InstallDir/bin/getConfig SystemModuleConfig ModuleCount2` +if [ "x$has_um" = x ]; then + has_um=0 +fi + +user=$USER +if [ -z "$user" ]; then + user=root +fi + +checkInstallSetup() { + InitialInstallFlag=`$InstallDir/bin/getConfig -c $InstallDir/etc/Calpont.xml Installation InitialInstallFlag` + if [ $InitialInstallFlag != "y" ]; then + echo "Please run the postConfigure install script, check the Installation Guide" + echo "for additional details" + rm -f /var/lock/subsys/columnstore + exit 1 + fi +} + +[ -f $InstallDir/bin/ProcMon ] || exit 0 + +start() { + if [ -f /var/lock/subsys/columnstore ]; then + echo "MariaDB Columnstore Database Platform already running" + exit 0 + fi + + (mkdir -p /var/lock/subsys && touch /var/lock/subsys/columnstore) >/dev/null 2>&1 + + if [ -x $InstallDir/bin/columnstore.pre-start ]; then + $InstallDir/bin/columnstore.pre-start + if [ $? -ne 0 ]; then + echo "Error running MariaDB Columnstore pre-start script, not starting MariaDB Columnstore" + rm -f /var/lock/subsys/columnstore + exit 1 + fi + fi + checkInstallSetup + + CoreFileFlag=`$InstallDir/bin/getConfig -c $InstallDir/etc/Calpont.xml Installation CoreFileFlag` + if [ $CoreFileFlag = "y" ]; then + SUDO= + if [ "$user" != "root" ]; then + SUDO="sudo" + fi + + #columnstore core files + $SUDO ulimit -c unlimited > /dev/null 2>&1 + $SUDO sysctl -q -w kernel.core_uses_pid=1 > /dev/null 2>&1 + $SUDO sysctl -q -w kernel.core_pattern=/var/log/Calpont/corefiles/core.%e.%p > /dev/null 2>&1 + fi + + RETVAL=0 + echo "Starting MariaDB Columnstore Database Platform" + rm -f /tmp/StopCalpont + exec $InstallDir/bin/run.sh $InstallDir/bin/ProcMon > /dev/null 2>&1 & + + return $RETVAL +} +stop() { + echo "Shutting down MariaDB Columnstore Database Platform" + touch /tmp/StopCalpont + pkill -9 ProcMon + pkill -9 ProcMgr + pkill -9 snmptrapd + sleep 1 + $InstallDir/bin/clearShm + RETVAL=$? + rm -f /var/lock/subsys/columnstore + fuser -k 8604/tcp > /dev/null 2>&1 + test -f $InstallDir/mysql/mysql-Calpont || return $RETVAL + $InstallDir/mysql/mysql-Calpont stop > /dev/null 2>&1 + if [ -x $InstallDir/bin/columnstore.post-stop ]; then + $InstallDir/bin/columnstore.post-stop + fi + return $RETVAL +} +restart() { + stop + start +} +status() { + isrunning=0 + if [ $EUID -eq 0 ]; then + if [ -f /var/lock/subsys/columnstore ]; then + isrunning=1 + fi + else + pgrep ProcMon >/dev/null 2>&1 + if [ $? -eq 0 ]; then + isrunning=1 + fi + fi + if [ $isrunning -ne 0 ]; then + echo "MariaDB Columnstore is running" + else + echo "MariaDB Columnstore is not running" + exit 3 + fi +} + +case "$1" in +start) + start + ;; +stop) + stop + ;; +restart) + restart + ;; +condrestart) + [ -f /var/lock/subsys/columnstore ] && restart || : + ;; +status) + status + ;; +*) + echo $"Usage: $0 {start|stop|restart|condrestart|status}" + exit 1 +esac + +exit $? + diff --git a/export/bin/columnstore.conf b/export/bin/columnstore.conf new file mode 100755 index 000000000..abb2e8fd4 --- /dev/null +++ b/export/bin/columnstore.conf @@ -0,0 +1,2 @@ +/usr/local/Calpont/lib + diff --git a/export/bin/columnstore.def b/export/bin/columnstore.def new file mode 100755 index 000000000..4ebfb2019 --- /dev/null +++ b/export/bin/columnstore.def @@ -0,0 +1,9 @@ +#!/bin/bash +# Copy this file to /etc/default and rename it to 'infinidb'. + +# Change this line to your InfiniDB installation directory +INFINIDB_INSTALL_DIR=/usr/local/Calpont + +LD_LIBRARY_PATH=$INFINIDB_INSTALL_DIR/lib:$INFINIDB_INSTALL_DIR/mysql/lib/mysql +export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH diff --git a/export/bin/columnstoreAlias b/export/bin/columnstoreAlias new file mode 100755 index 000000000..bf34a4e9a --- /dev/null +++ b/export/bin/columnstoreAlias @@ -0,0 +1,13 @@ +# InfiniDB Alias Commands +# +alias mcsmysql='/usr/local/Calpont/mysql/bin/mysql --defaults-file=/usr/local/Calpont/mysql/my.cnf -u root' +alias ma=/usr/local/Calpont/bin/mcsadmin +alias mcsadmin=/usr/local/Calpont/bin/mcsadmin +alias home='cd /usr/local/Calpont/' +alias log='cd /var/log/Calpont/' +alias core='cd /var/log/Calpont/corefiles' +alias tmsg='tail -f /var/log/messages' +alias tdebug='tail -f /var/log/Calpont/debug.log' +alias tinfo='tail -f /var/log/Calpont/info.log' +alias dbrm='cd /usr/local/Calpont/data1/systemFiles/dbrm' +alias module='cat /usr/local/Calpont/local/module' diff --git a/export/bin/columnstoreLogRotate b/export/bin/columnstoreLogRotate new file mode 100755 index 000000000..48dec8381 --- /dev/null +++ b/export/bin/columnstoreLogRotate @@ -0,0 +1,35 @@ +# +# Calpont Log Rotate file that gets installed in /etc/logrotate.d +# as part of the RPM installation +# + +/var/log/Calpont/*.log { + missingok + rotate 7 + daily + dateext + copytruncate + olddir /var/log/Calpont/archive +} +/var/log/Calpont/*.log1 { + missingok + rotate 7 + daily + nocreate + compress + olddir /var/log/Calpont/archive +} +/usr/local/Calpont/etc/Calpont.xml { + daily + dateext + copy + olddir /usr/local/Calpont/etc/ +} +/usr/local/Calpont/mysql/db/*.err { + missingok + rotate 7 + daily + dateext + copytruncate + olddir /usr/local/Calpont/mysql/db +} diff --git a/export/bin/columnstoreSyslog b/export/bin/columnstoreSyslog new file mode 100755 index 000000000..8bc56eb3e --- /dev/null +++ b/export/bin/columnstoreSyslog @@ -0,0 +1,7 @@ +# Calpont Database Platform Logging +local1.=crit -/var/log/Calpont/crit.log +local1.=err -/var/log/Calpont/err.log +local1.=warning -/var/log/Calpont/warning.log +local1.=info -/var/log/Calpont/info.log +local1.=debug -/var/log/Calpont/debug.log +local2.=crit -/var/log/Calpont/data/data_mods.log diff --git a/export/bin/columnstoreSyslog-ng b/export/bin/columnstoreSyslog-ng new file mode 100755 index 000000000..6b7051bf7 --- /dev/null +++ b/export/bin/columnstoreSyslog-ng @@ -0,0 +1,78 @@ +# Calpont Database Platform Logging + +source s_infinidb { + # message generated by Syslog-NG + internal(); + # standard Linux log source (this is the default place for the syslog() + # function to send logs to) + unix-stream("/dev/log"); + # messages from the kernel + file("/proc/kmsg" log_prefix("kernel: ")); + # use the following line if you want to receive remote UDP logging messages + # (this is equivalent to the "-r" syslogd flag) + # udp(); +}; + +filter f_local1crit { facility(local1) and level(crit); }; +filter f_local1err { facility(local1) and level(err); }; +filter f_local1warning { facility(local1) and level(warning); }; +filter f_local1info { facility(local1) and level(info); }; +filter f_local1debug { facility(local1) and level(debug); }; +filter f_local2crit { facility(local2) and level(crit); }; + +destination d_crit{ + file("/var/log/Calpont/crit.log"); +}; + +destination d_err{ + file("/var/log/Calpont/err.log"); +}; + +destination d_warning{ + file("/var/log/Calpont/warning.log"); +}; + +destination d_info{ + file("/var/log/Calpont/info.log"); +}; + +destination d_debug{ + file("/var/log/Calpont/debug.log"); +}; + +destination d_data_mods{ + file("/var/log/Calpont/data/data_mods.log"); +}; + +log{ + source(s_infinidb); + filter(f_local1crit); + destination(d_crit); +}; + +log{ + source(s_infinidb); + filter(f_local1err); + destination(d_err); +}; +log{ + source(s_infinidb); + filter(f_local1warning); + destination(d_warning); +}; +log{ + source(s_infinidb); + filter(f_local1info); + destination(d_info); +}; +log{ + source(s_infinidb); + filter(f_local1debug); + destination(d_debug); +}; +log{ + source(s_infinidb); + filter(f_local2crit); + destination(d_data_mods); +}; + diff --git a/export/bin/columnstoreSyslog7 b/export/bin/columnstoreSyslog7 new file mode 100755 index 000000000..e5dcd33b9 --- /dev/null +++ b/export/bin/columnstoreSyslog7 @@ -0,0 +1,8 @@ +# Calpont Database Platform Logging +local1.crit -/var/log/Calpont/crit.log +local1.err -/var/log/Calpont/err.log +local1.warning -/var/log/Calpont/warning.log +local1.info -/var/log/Calpont/info.log +local1.debug -/var/log/Calpont/debug.log +local2.crit -/var/log/Calpont/data/data_mods.log + diff --git a/export/bin/columnstoreUninstall.sh b/export/bin/columnstoreUninstall.sh new file mode 100755 index 000000000..59c285a72 --- /dev/null +++ b/export/bin/columnstoreUninstall.sh @@ -0,0 +1,118 @@ +#!/usr/bin/expect +# +# $Id$ +# +# Uninstall Package from system + +set INFINIDB_INSTALL_DIR "/usr/local/MariaDB/Columnstore" +set env(INFINIDB_INSTALL_DIR) $INFINIDB_INSTALL_DIR + +set USERNAME $env(USER) +set PASSWORD " " +set DEBUG 0 + +set INFINIDBRPM1 "infinidb-libs" +set INFINIDBRPM2 "infinidb-platform" +set INFINIDBRPM3 "infinidb-enterprise" +set CONNECTORRPM1 "infinidb-mysql" +set CONNECTORRPM2 "infinidb-storage-engine" + +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 "'calpontUninstall.sh' performs a system uninstall of the Calpont InfiniDB Packages.\n" + send_user "It will perform a shutdown of the InfiniDB software and the \n" + send_user "remove the Packages from all configured servers of the InfiniDB System.\n" + send_user "\n" + send_user "Usage: calpontUninstall.sh -p 'password' -d\n" + send_user " password - root password of the remote servers being un-installed'\n" + send_user " -d - Debug flag, output verbose information\n" + exit + } elseif { $arg($i) == "-p" } { + incr i + set PASSWORD $arg($i) + } elseif { $arg($i) == "-d" } { + set DEBUG 1 + } elseif { $arg($i) == "-i" } { + incr i + set INSTALLDIR $arg($i) + } elseif { $arg($i) == "-u" } { + incr i + set USERNAME $arg($i) + } + incr i +} + +log_user $DEBUG + +set timeout 2 +set INSTALL 2 +send "$INFINIDB_INSTALL_DIR/bin/getConfig DBRM_Controller NumWorkers\n" +expect { + 1 { set INSTALL 1 } +} + +set PACKAGE "rpm" +send "$INFINIDB_INSTALL_DIR/bin/getConfig Installation EEPackageType\n" +expect { + rpm { set PACKAGE rpm } + deb { set PACKAGE deb } + binary { set PACKAGE binary } +} + +set timeout 60 +log_user $DEBUG +if { $INSTALL == "2" && $PASSWORD == " "} {puts "please enter the remote server root password, enter ./calpontUninstall.sh -h for additional info"; exit -1} + +send_user "\nPerforming InfiniDB System Uninstall\n\n" + +# +# shutdownSystem +# +send_user "Shutdown InfiniDB System " +expect -re {[$#] } +send "$INFINIDB_INSTALL_DIR/bin/mcsadmin shutdownsystem y\n" +expect { + "shutdownSystem " { send_user "DONE" } +} +send_user "\n" + + +if { $INSTALL == "2"} { + set timeout 600 + # + # Run installer + # + send_user "Run System Uninstaller " + send "$INFINIDB_INSTALL_DIR/bin/installer $INFINIDBRPM1 $INFINIDBRPM2 $INFINIDBRPM3 $CONNECTORRPM1 $CONNECTORRPM2 uninstall $PASSWORD n --nodeps dummymysqlpw $DEBUG\n" + expect { + "uninstall request successful" { send_user "DONE" } + "ERROR" { send_user "FAILED" ; exit -1 } + } + send_user "\n" +} + +if { $PACKAGE == "binary" } { + send "$INFINIDB_INSTALL_DIR/bin/pre-uninstall\n" + expect { + -re {[$#] } { } + } + + send_user "\n" + + send_user "\nCalpont Package System Uninstall Completed\n\n" + + exit 0 +} + +send_user "\nCalpont Package System Uninstall Completed\n\n" + +exit 0 diff --git a/export/bin/director_installer.sh b/export/bin/director_installer.sh new file mode 100755 index 000000000..d10bd1cbe --- /dev/null +++ b/export/bin/director_installer.sh @@ -0,0 +1,340 @@ +#!/usr/bin/expect +# +# $Id$ +# +# Install RPM and custom OS files on system +# Argument 1 - Remote Module Name +# Argument 2 - Remote Server Host Name or IP address +# Argument 3 - Root Password of remote server +# Argument 4 - Package name being installed +# Argument 5 - Install Type, "initial" or "upgrade" +# Argument 6 - Debug flag 1 for on, 0 for off +set timeout 10 +set MODULE [lindex $argv 0] +set SERVER [lindex $argv 1] +set PASSWORD [lindex $argv 2] +set CALPONTRPM1 [lindex $argv 3] +set CALPONTRPM2 [lindex $argv 4] +set CALPONTRPM3 [lindex $argv 5] +set CALPONTMYSQLRPM [lindex $argv 6] +set CALPONTMYSQLDRPM [lindex $argv 7] +set INSTALLTYPE [lindex $argv 8] +set DEBUG [lindex $argv 9] +set INSTALLDIR "/usr/local/MariaDB/Columnstore" +set IDIR [lindex $argv 10] +if { $IDIR != "" } { + set INSTALLDIR $IDIR +} +set USERNAME "root" +set UNM [lindex $argv 11] +if { $UNM != "" } { + set USERNAME $UNM +} + +log_user $DEBUG +spawn -noecho /bin/bash +# +if { $INSTALLTYPE == "initial" || $INSTALLTYPE == "uninstall" } { + # + # erase InfiniDB MySQL storage engine package + # + send_user "Erase InfiniDB MySQL Storage Engine Package on Module " + expect -re {[$#] } + send "ssh $USERNAME@$SERVER 'rpm -e --nodeps --allmatches calpont-mysql >/dev/null 2>&1; rpm -e --nodeps --allmatches infinidb-storage-engine'\n" + expect { + "Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit } + "service not known" { send_user "FAILED: Invalid Host\n" ; exit } + "authenticity" { send "yes\n" + expect { + "word: " { send "$PASSWORD\n" } + } + } + "word: " { send "$PASSWORD\n" } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 } + } + # password for ssh + send "$PASSWORD\n" + expect { + -re {[$#] } { send_user "DONE" } + "uninstall completed" { send_user "DONE" } + "error: Failed dependencies" { send_user "ERROR: Failed dependencies\n" ; exit -1 } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 } + "not installed" { send_user "INFO: Package not installed" } + } + send_user "\n" + # + # erase InfiniDB MySQL package + # + send_user "Erase InfiniDB MySQL Package on Module " + expect -re {[$#] } + send "ssh $USERNAME@$SERVER 'rpm -e --nodeps --allmatches calpont-mysqld >/dev/null 2>&1; rpm -e --nodeps --allmatches infinidb-mysql'\n" + expect "word: " + # password for ssh + send "$PASSWORD\n" + expect { + -re {[$#] } { send_user "DONE" } + "uninstall completed" { send_user "DONE" } + "error: Failed dependencies" { send_user "ERROR: Failed dependencies\n" ; exit -1 } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 } + "not installed" { send_user "INFO: Package not installed" } + } + send_user "\n" + # + # erase InfiniDB packages + # + send_user "Erase InfiniDB Packages on Module " + expect -re {[$#] } + send "ssh $USERNAME@$SERVER 'rpm -e --nodeps --allmatches calpont >/dev/null 2>&1; rpm -e --nodeps --allmatches infinidb-enterprise >/dev/null 2>&1; rpm -e --nodeps --allmatches infinidb-libs infinidb-platform'\n" + expect "word: " + # password for ssh + send "$PASSWORD\n" + expect { + -re {[$#] } { send_user "DONE" } + "uninstall completed" { send_user "DONE" } + "error: Failed dependencies" { send_user "ERROR: Failed dependencies\n" ; exit -1 } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 } + "not installed" { send_user "INFO: Package not installed" } + } + send_user "\n" +} +if { $INSTALLTYPE == "uninstall" } { exit 0 } + +# +# send the InfiniDB package +# +expect -re {[$#] } +set timeout 20 +send_user "Copy New InfiniDB Package to Module " +send "ssh $USERNAME@$SERVER 'rm -f /root/infinidb-*.rpm'\n" +expect "word: " +# password for ssh +send "$PASSWORD\n" +# check return +expect { + -re {[$#] } { } +} +send "scp $CALPONTRPM1 $CALPONTRPM2 $CALPONTRPM3 $USERNAME@$SERVER:.\n" +expect "word: " +# send the password +send "$PASSWORD\n" +# check return +expect { + "100%" { send_user "DONE" } + "scp" { send_user "ERROR\n" ; + send_user "\n*** Installation ERROR\n" ; + exit -1 } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 } + "No such file or directory" { send_user "ERROR: Invalid package\n" ; exit -1 } +} +send_user "\n" +# +# send the InfiniDB MySQL sotrage engine package +# +send_user "Copy New InfiniDB MySQL Storage Engine Package to Module " +send "scp $CALPONTMYSQLRPM $USERNAME@$SERVER:$CALPONTMYSQLRPM\n" +expect "word: " +# send the password +send "$PASSWORD\n" +# check return +expect { + "100%" { send_user "DONE" } + "scp" { send_user "ERROR\n" ; + send_user "\n*** Installation ERROR\n" ; + exit -1 } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 } + "No such file or directory" { send_user "ERROR: Invalid package\n" ; exit -1 } +} +send_user "\n" +# +# send the InfiniDB MySQL package +# +send_user "Copy New InfiniDB MySQL Package to Module " +send "scp $CALPONTMYSQLDRPM $USERNAME@$SERVER:$CALPONTMYSQLDRPM\n" +expect "word: " +# send the password +send "$PASSWORD\n" +# check return +expect { + "100%" { send_user "DONE" } + "scp" { send_user "ERROR\n" ; + send_user "\n*** Installation ERROR\n" ; + exit -1 } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 } + "No such file or directory" { send_user "ERROR: Invalid package\n" ; exit -1 } +} +# +send_user "\n" +expect -re {[$#] } +set timeout 60 +if { $INSTALLTYPE == "initial"} { + # + # install package + # + send_user "Install InfiniDB Packages on Module " + send "ssh $USERNAME@$SERVER 'rpm -ivh $CALPONTRPM1 $CALPONTRPM2 $CALPONTRPM3 $CALPONTMYSQLDRPM $CALPONTMYSQLRPM'\n" + expect "word: " + # password for ssh + send "$PASSWORD\n" + # check return + expect { + -re {[$#] } { send_user "DONE" } + "completed" { send_user "DONE" } + "error: Failed dependencies" { send_user "ERROR: Failed dependencies\n" ; + send_user "\n*** Installation ERROR\n" ; + exit -1 } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 } + } + send_user "\n" + expect -re {[$#] } + set timeout 10 + # + # install package + # + send_user "Running InfiniDB MySQL Setup Scripts on Module " + send "ssh $USERNAME@$SERVER '$INSTALLDIR/bin/post-mysql-install'\n" + expect "word: " + # password for ssh + send "$PASSWORD\n" + # check return + expect { + "Shutting down MySQL." { send_user "DONE" } + timeout { send_user "DONE" } + "ERROR" { send_user "ERROR: Daemon failed to run"; + exit -1 } + } + send_user "\n" + expect -re {[$#] } + # + # install package + # + send_user "Running InfiniDB MySQL Setup Scripts on Module " + send "ssh $USERNAME@$SERVER '$INSTALLDIR/bin/post-mysqld-install'\n" + expect "word: " + # password for ssh + send "$PASSWORD\n" + # check return + expect { + "Shutting down MySQL." { send_user "DONE" } + timeout { send_user "DONE" } + "ERROR" { send_user "ERROR: Daemon failed to run"; + exit -1 } + } +} else { + # + # upgrade package + # + expect -re {[$#] } + send_user "Upgrade InfiniDB Packages on Module " + send "ssh $USERNAME@$SERVER ' rpm -Uvh --noscripts $CALPONTRPM1 $CALPONTRPM2 $CALPONTRPM3 $CALPONTMYSQLDRPM $CALPONTMYSQLRPM'\n" + expect "word: " + # password for ssh + send "$PASSWORD\n" + # check return + expect { + -re {[$#] } { send_user "DONE" } + "completed" { send_user "DONE" } + "already installed" { send_user "INFO: Already Installed\n" ; exit -1 } + "error: Failed dependencies" { send_user "ERROR: Failed dependencies\n" ; + send_user "\n*** Installation ERROR\n" ; + exit -1 } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 } + } + send_user "\n" + expect -re {[$#] } + set timeout 10 + # + # install package + # + send_user "Running InfiniDB MySQL Setup Scripts on Module " + send "ssh $USERNAME@$SERVER '$INSTALLDIR/bin/post-mysql-install'\n" + expect "word: " + # password for ssh + send "$PASSWORD\n" + # check return + expect { + "Shutting down MySQL." { send_user "DONE" } + timeout { send_user "DONE" } + "ERROR" { send_user "ERROR: Daemon failed to run"; + exit -1 } + } + send_user "\n" + expect -re {[$#] } + # + # install package + # + send_user "Running InfiniDB MySQL Setup Scripts on Module " + send "ssh $USERNAME@$SERVER '$INSTALLDIR/bin/post-mysqld-install'\n" + expect "word: " + # password for ssh + send "$PASSWORD\n" + # check return + expect { + "Shutting down MySQL." { send_user "DONE" } + timeout { send_user "DONE" } + "ERROR" { send_user "ERROR: Daemon failed to run"; + exit -1 } + } +} +send_user "\n" +expect -re {[$#] } +set timeout 30 +# +if { $INSTALLTYPE == "initial"} { + # + # copy over InfiniDB OS files + # + send_user "Copy InfiniDB OS files to Module " + send "scp $INSTALLDIR/local/etc/$MODULE/* $USERNAME@$SERVER:$INSTALLDIR/local/.\n" + expect "word: " + # send the password + send "$PASSWORD\n" + expect { + -re {[$#] } { send_user "DONE" } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 } + } + send_user "\n" + # + # copy over InfiniDB config file + # + send_user "Copy InfiniDB Config file to Module " + send "scp $INSTALLDIR/etc/* $USERNAME@$SERVER:$INSTALLDIR/etc/.\n" + expect "word: " + # send the password + send "$PASSWORD\n" + expect { + -re {[$#] } { send_user "DONE" } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 } + } + send_user "\n" + # + # copy over custom OS tmp files + # + send_user "Copy Custom OS files to Module " + send "scp -r $INSTALLDIR/local/etc $USERNAME@$SERVER:$INSTALLDIR/local/.\n" + expect "word: " + # send the password + send "$PASSWORD\n" + expect { + -re {[$#] } { send_user "DONE" } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 } + } + send_user "\n" + # + # Start module installer to setup Customer OS files + # + send_user "Run Module Installer " + send "ssh $USERNAME@$SERVER '$INSTALLDIR/bin/module_installer.sh'\n" + expect "word: " + # send the password + send "$PASSWORD\n" + expect { + "!!!Module" { send_user "DONE" } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 } + "FAILED" { send_user "ERROR: missing OS file\n" ; exit -1 } + } + send_user "\n" +} +# +send_user "\nInstallation Successfully Completed on '$MODULE'\n" +exit 0 + diff --git a/export/bin/disable-rep-columnstore.sh b/export/bin/disable-rep-columnstore.sh new file mode 100755 index 000000000..edd3fc19a --- /dev/null +++ b/export/bin/disable-rep-columnstore.sh @@ -0,0 +1,74 @@ +#!/bin/bash +# +# $Id$ +# +# generic InfiniDB Disable Replication script. +# +# Notes: This script gets run by ProcMon: + +# check log for error +checkForError() { + grep ERROR /tmp/disable-rep-status.log > /tmp/error.check + if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then + echo "ERROR: check log file: /tmp/disable-rep-status.log" + rm -f /tmp/error.check + exit 1 + fi + rm -f /tmp/error.check +} + +prefix=/usr/local +installdir=$prefix/MariaDB/Columnstore +pwprompt= +for arg in "$@"; do + if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then + prefix="`echo $arg | awk -F= '{print $2}'`" + installdir=$prefix/MariaDB/Columnstore + elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then + password="`echo $arg | awk -F= '{print $2}'`" + pwprompt="--password=$password" + elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then + installdir="`echo $arg | awk -F= '{print $2}'`" + prefix=`dirname $installdir` + fi +done + +test -f $installdir/post/functions && . $installdir/post/functions + +>/tmp/disable-rep-status.log + +# +# Run stop slave command +# +echo "Run stop slave command" >>/tmp/disable-rep-status.log +cat >/tmp/idb_disable-rep.sql <>/tmp/disable-rep-status.log +$installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/disable-rep-status.log + +checkForError + +# +# Run reset slave command +# +echo "Run start slave command" >>/tmp/disable-rep-status.log +cat >/tmp/idb_disable-rep.sql <>/tmp/disable-rep-status.log +$installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/disable-rep-status.log + +checkForError + +#alls good, 'OK' for success +echo "OK" +exit 0 diff --git a/export/bin/disable-rep-infinidb.sh b/export/bin/disable-rep-infinidb.sh new file mode 100755 index 000000000..edd3fc19a --- /dev/null +++ b/export/bin/disable-rep-infinidb.sh @@ -0,0 +1,74 @@ +#!/bin/bash +# +# $Id$ +# +# generic InfiniDB Disable Replication script. +# +# Notes: This script gets run by ProcMon: + +# check log for error +checkForError() { + grep ERROR /tmp/disable-rep-status.log > /tmp/error.check + if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then + echo "ERROR: check log file: /tmp/disable-rep-status.log" + rm -f /tmp/error.check + exit 1 + fi + rm -f /tmp/error.check +} + +prefix=/usr/local +installdir=$prefix/MariaDB/Columnstore +pwprompt= +for arg in "$@"; do + if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then + prefix="`echo $arg | awk -F= '{print $2}'`" + installdir=$prefix/MariaDB/Columnstore + elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then + password="`echo $arg | awk -F= '{print $2}'`" + pwprompt="--password=$password" + elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then + installdir="`echo $arg | awk -F= '{print $2}'`" + prefix=`dirname $installdir` + fi +done + +test -f $installdir/post/functions && . $installdir/post/functions + +>/tmp/disable-rep-status.log + +# +# Run stop slave command +# +echo "Run stop slave command" >>/tmp/disable-rep-status.log +cat >/tmp/idb_disable-rep.sql <>/tmp/disable-rep-status.log +$installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/disable-rep-status.log + +checkForError + +# +# Run reset slave command +# +echo "Run start slave command" >>/tmp/disable-rep-status.log +cat >/tmp/idb_disable-rep.sql <>/tmp/disable-rep-status.log +$installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/disable-rep-status.log + +checkForError + +#alls good, 'OK' for success +echo "OK" +exit 0 diff --git a/export/bin/infinidb b/export/bin/infinidb new file mode 100755 index 000000000..cba5ddd4d --- /dev/null +++ b/export/bin/infinidb @@ -0,0 +1,184 @@ +#!/bin/bash +# +# $Id: infinidb 3704 2013-08-07 03:33:20Z bwilkinson $ +# +# infinidb Starts Calpont InfiniDB database platform +# +# +# chkconfig: 2345 99 99 +# description: Calpont InfiniDB is a database platform that utilizes Mysql +# +### BEGIN INIT INFO +# Provides: infinidb +# Required-Start: $local_fs $remote_fs $network $syslog $all +# Required-Stop: $local_fs $remote_fs $network $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start/stop InfiniDB DW DBMS +### END INIT INFO + +# Source function library. +if [ -f /etc/init.d/functions ]; then + . /etc/init.d/functions +fi + +if [ -z "$INFINIDB_INSTALL_DIR" ]; then + test -f /etc/default/infinidb && . /etc/default/infinidb +fi + +if [ -z "$INFINIDB_INSTALL_DIR" ]; then + INFINIDB_INSTALL_DIR=/usr/local/Calpont +fi + +export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR + +InstallDir=$INFINIDB_INSTALL_DIR + +if [ $InstallDir != "/usr/local/Calpont" ]; then + export PATH=$InstallDir/bin:$InstallDir/mysql/bin:/bin:/usr/bin + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$InstallDir/lib:$InstallDir/mysql/lib/mysql +fi + +#hadoop +plugin=`$INFINIDB_INSTALL_DIR/bin/getConfig SystemConfig DataFilePlugin` +if [ -n "$plugin" ]; then + setenv=`$InstallDir/bin/getConfig SystemConfig DataFileEnvFile` + . $InstallDir/bin/$setenv >/dev/null 2>&1 +fi + +if [ -e $InstallDir/lib/libjemalloc.so ]; then + export LD_PRELOAD=$InstallDir/lib/libjemalloc.so +elif [ -e $InstallDir/lib/libjemalloc.so.1 ]; then + export LD_PRELOAD=$InstallDir/lib/libjemalloc.so.1 +fi + +test -f $InstallDir/post/functions && . $InstallDir/post/functions + +mt=`module_type` +mid=`module_id` + +has_um=`$InstallDir/bin/getConfig SystemModuleConfig ModuleCount2` +if [ "x$has_um" = x ]; then + has_um=0 +fi + +user=$USER +if [ -z "$user" ]; then + user=root +fi + +checkInstallSetup() { + InitialInstallFlag=`$InstallDir/bin/getConfig -c $InstallDir/etc/Calpont.xml Installation InitialInstallFlag` + if [ $InitialInstallFlag != "y" ]; then + echo "Please run the postConfigure install script, check the Installation Guide" + echo "for additional details" + rm -f /var/lock/subsys/infinidb + exit 1 + fi +} + +[ -f $InstallDir/bin/ProcMon ] || exit 0 + +start() { + if [ -f /var/lock/subsys/infinidb ]; then + echo "InfiniDB Database Platform already running" + exit 0 + fi + + (mkdir -p /var/lock/subsys && touch /var/lock/subsys/infinidb) >/dev/null 2>&1 + + if [ -x $InstallDir/bin/infinidb.pre-start ]; then + $InstallDir/bin/infinidb.pre-start + if [ $? -ne 0 ]; then + echo "Error running InfiniDB pre-start script, not starting InfiniDB" + rm -f /var/lock/subsys/infinidb + exit 1 + fi + fi + checkInstallSetup + + CoreFileFlag=`$InstallDir/bin/getConfig -c $InstallDir/etc/Calpont.xml Installation CoreFileFlag` + if [ $CoreFileFlag = "y" ]; then + SUDO= + if [ "$user" != "root" ]; then + SUDO="sudo" + fi + + #infinidb core files + $SUDO ulimit -c unlimited > /dev/null 2>&1 + $SUDO sysctl -q -w kernel.core_uses_pid=1 > /dev/null 2>&1 + $SUDO sysctl -q -w kernel.core_pattern=/var/log/Calpont/corefiles/core.%e.%p > /dev/null 2>&1 + fi + + RETVAL=0 + echo "Starting InfiniDB Database Platform" + rm -f /tmp/StopCalpont + exec $InstallDir/bin/run.sh $InstallDir/bin/ProcMon > /dev/null 2>&1 & + + return $RETVAL +} +stop() { + echo "Shutting down InfiniDB Database Platform" + touch /tmp/StopCalpont + pkill -9 ProcMon + pkill -9 ProcMgr + pkill -9 snmptrapd + sleep 1 + $InstallDir/bin/clearShm + RETVAL=$? + rm -f /var/lock/subsys/infinidb + fuser -k 8604/tcp > /dev/null 2>&1 + test -f $InstallDir/mysql/mysql-Calpont || return $RETVAL + $InstallDir/mysql/mysql-Calpont stop > /dev/null 2>&1 + if [ -x $InstallDir/bin/infinidb.post-stop ]; then + $InstallDir/bin/infinidb.post-stop + fi + return $RETVAL +} +restart() { + stop + start +} +status() { + isrunning=0 + if [ $EUID -eq 0 ]; then + if [ -f /var/lock/subsys/infinidb ]; then + isrunning=1 + fi + else + pgrep ProcMon >/dev/null 2>&1 + if [ $? -eq 0 ]; then + isrunning=1 + fi + fi + if [ $isrunning -ne 0 ]; then + echo "InfiniDB is running" + else + echo "InfiniDB is not running" + exit 3 + fi +} + +case "$1" in +start) + start + ;; +stop) + stop + ;; +restart) + restart + ;; +condrestart) + [ -f /var/lock/subsys/infinidb ] && restart || : + ;; +status) + status + ;; +*) + echo $"Usage: $0 {start|stop|restart|condrestart|status}" + exit 1 +esac + +exit $? + diff --git a/export/bin/infinidb.conf b/export/bin/infinidb.conf new file mode 100755 index 000000000..abb2e8fd4 --- /dev/null +++ b/export/bin/infinidb.conf @@ -0,0 +1,2 @@ +/usr/local/Calpont/lib + diff --git a/export/bin/infinidb.def b/export/bin/infinidb.def new file mode 100755 index 000000000..4ebfb2019 --- /dev/null +++ b/export/bin/infinidb.def @@ -0,0 +1,9 @@ +#!/bin/bash +# Copy this file to /etc/default and rename it to 'infinidb'. + +# Change this line to your InfiniDB installation directory +INFINIDB_INSTALL_DIR=/usr/local/Calpont + +LD_LIBRARY_PATH=$INFINIDB_INSTALL_DIR/lib:$INFINIDB_INSTALL_DIR/mysql/lib/mysql +export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH diff --git a/export/bin/master-rep-columnstore.sh b/export/bin/master-rep-columnstore.sh new file mode 100755 index 000000000..f6a4a5d0f --- /dev/null +++ b/export/bin/master-rep-columnstore.sh @@ -0,0 +1,112 @@ +#!/bin/bash +# +# $Id$ +# +# generic InfiniDB Master Replication script. +# +# Notes: This script gets run by ProcMon during installs and upgrades: + +# check log for error +checkForError() { + grep ERROR /tmp/master-rep-status-$hostipaddr.log > /tmp/error.check + if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then + echo "ERROR: check log file: /tmp/master-rep-status-$hostipaddr.log" + rm -f /tmp/error.check + exit 1 + fi + rm -f /tmp/error.check +} + +prefix=/usr/local +installdir=$prefix/MariaDB/Columnstore +pwprompt= +for arg in "$@"; do + if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then + prefix="`echo $arg | awk -F= '{print $2}'`" + installdir=$prefix/MariaDB/Columnstore + elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then + password="`echo $arg | awk -F= '{print $2}'`" + pwprompt="--password=$password" + elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then + installdir="`echo $arg | awk -F= '{print $2}'`" + prefix=`dirname $installdir` + elif [ `expr -- "$arg" : '--hostIP='` -eq 9 ]; then + hostipaddr="`echo $arg | awk -F= '{print $2}'`" + fi +done + +test -f $installdir/post/functions && . $installdir/post/functions + +repUser="idbrep" +password="Calpont1" + +>/tmp/master-rep-status-$hostipaddr.log + +# +# Create Replication User +# +echo "Create Replication User $repUser for node $hostipaddr" >>/tmp/master-rep-status-$hostipaddr.log +cat >/tmp/idb_master-rep.sql <>/tmp/master-rep-status-$hostipaddr.log +$installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/master-rep-status-$hostipaddr.log + +checkForError + +# +# Grant table access for created user +# +echo "Grant table access for $repUser for node $hostipaddr" >>/tmp/master-rep-status-$hostipaddr.log +cat >/tmp/idb_master-rep.sql <>/tmp/master-rep-status-$hostipaddr.log +$installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/master-rep-status-$hostipaddr.log + +checkForError + +# +# Run SHOW MASTER STATUS +# +echo "Run SHOW MASTER STATUS to node log" >>/tmp/master-rep-status-$hostipaddr.log +cat >/tmp/idb_master-rep.sql <>/tmp/master-rep-status-$hostipaddr.log +$installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/master-rep-status-$hostipaddr.log + +checkForError + +echo "Run SHOW MASTER STATUS to master status log /tmp/show-master-status.log" >>/tmp/master-rep-status-$hostipaddr.log +cat >/tmp/idb_master-rep.sql </tmp/show-master-status.log +$installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/show-master-status.log + + +#alls good, 'OK' for success +echo "OK" +exit 0 + + diff --git a/export/bin/master-rep-infinidb.sh b/export/bin/master-rep-infinidb.sh new file mode 100755 index 000000000..f6a4a5d0f --- /dev/null +++ b/export/bin/master-rep-infinidb.sh @@ -0,0 +1,112 @@ +#!/bin/bash +# +# $Id$ +# +# generic InfiniDB Master Replication script. +# +# Notes: This script gets run by ProcMon during installs and upgrades: + +# check log for error +checkForError() { + grep ERROR /tmp/master-rep-status-$hostipaddr.log > /tmp/error.check + if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then + echo "ERROR: check log file: /tmp/master-rep-status-$hostipaddr.log" + rm -f /tmp/error.check + exit 1 + fi + rm -f /tmp/error.check +} + +prefix=/usr/local +installdir=$prefix/MariaDB/Columnstore +pwprompt= +for arg in "$@"; do + if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then + prefix="`echo $arg | awk -F= '{print $2}'`" + installdir=$prefix/MariaDB/Columnstore + elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then + password="`echo $arg | awk -F= '{print $2}'`" + pwprompt="--password=$password" + elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then + installdir="`echo $arg | awk -F= '{print $2}'`" + prefix=`dirname $installdir` + elif [ `expr -- "$arg" : '--hostIP='` -eq 9 ]; then + hostipaddr="`echo $arg | awk -F= '{print $2}'`" + fi +done + +test -f $installdir/post/functions && . $installdir/post/functions + +repUser="idbrep" +password="Calpont1" + +>/tmp/master-rep-status-$hostipaddr.log + +# +# Create Replication User +# +echo "Create Replication User $repUser for node $hostipaddr" >>/tmp/master-rep-status-$hostipaddr.log +cat >/tmp/idb_master-rep.sql <>/tmp/master-rep-status-$hostipaddr.log +$installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/master-rep-status-$hostipaddr.log + +checkForError + +# +# Grant table access for created user +# +echo "Grant table access for $repUser for node $hostipaddr" >>/tmp/master-rep-status-$hostipaddr.log +cat >/tmp/idb_master-rep.sql <>/tmp/master-rep-status-$hostipaddr.log +$installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/master-rep-status-$hostipaddr.log + +checkForError + +# +# Run SHOW MASTER STATUS +# +echo "Run SHOW MASTER STATUS to node log" >>/tmp/master-rep-status-$hostipaddr.log +cat >/tmp/idb_master-rep.sql <>/tmp/master-rep-status-$hostipaddr.log +$installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/master-rep-status-$hostipaddr.log + +checkForError + +echo "Run SHOW MASTER STATUS to master status log /tmp/show-master-status.log" >>/tmp/master-rep-status-$hostipaddr.log +cat >/tmp/idb_master-rep.sql </tmp/show-master-status.log +$installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/show-master-status.log + + +#alls good, 'OK' for success +echo "OK" +exit 0 + + diff --git a/export/bin/module_installer.sh b/export/bin/module_installer.sh new file mode 100755 index 000000000..8a4ad0c0a --- /dev/null +++ b/export/bin/module_installer.sh @@ -0,0 +1,167 @@ +#!/bin/bash +# +# $Id: module_installer.sh 421 2007-04-05 15:46:55Z dhill $ +# +# Setup the Custom OS files during a System install on a module +# +# +# append columnstore OS files to Linux OS file +# +# + +prefix=/usr/local +installdir=$prefix/MariaDB/Columnstore +rpmmode=install +user=$USER +if [ -z "$user" ]; then + user=root +fi +quiet=0 +shiftcnt=0 + +for arg in "$@"; do + if [ $(expr -- "$arg" : '--prefix=') -eq 9 ]; then + prefix="$(echo $arg | awk -F= '{print $2}')" + installdir=$prefix/MariaDB/Columnstore + ((shiftcnt++)) + elif [ $(expr -- "$arg" : '--rpmmode=') -eq 10 ]; then + rpmmode="$(echo $arg | awk -F= '{print $2}')" + ((shiftcnt++)) + elif [ $(expr -- "$arg" : '--installdir=') -eq 13 ]; then + installdir="$(echo $arg | awk -F= '{print $2}')" + prefix=$(dirname $installdir) + ((shiftcnt++)) + elif [ $(expr -- "$arg" : '--user=') -eq 7 ]; then + user="$(echo $arg | awk -F= '{print $2}')" + ((shiftcnt++)) + elif [ $(expr -- "$arg" : '--quiet') -eq 7 ]; then + quiet=1 + ((shiftcnt++)) + elif [ $(expr -- "$arg" : '--port') -eq 6 ]; then + mysqlPort="$(echo $arg | awk -F= '{print $2}')" + ((shiftcnt++)) + elif [ $(expr -- "$arg" : '--module') -eq 8 ]; then + module="$(echo $arg | awk -F= '{print $2}')" + ((shiftcnt++)) + fi +done +shift $shiftcnt + +if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFINIDB_INSTALL_DIR/lib:$INFINIDB_INSTALL_DIR/mysql/lib/mysql +fi + +export INFINIDB_INSTALL_DIR=$installdir + +cloud=`$INFINIDB_INSTALL_DIR/bin/getConfig Installation Cloud` +if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then + cp $INFINIDB_INSTALL_DIR/local/etc/*.pem /root/. > /dev/null 2>&1 + + if test -f $INFINIDB_INSTALL_DIR/local/etc/pm1/fstab ; then + echo "Setup fstab on Module" + touch /etc/fstab + rm -f /etc/fstab.columnstoreSave + mv /etc/fstab /etc/fstab.columnstoreSave + cat $INFINIDB_INSTALL_DIR/local/etc/pm1/fstab >> /etc/fstab + fi +fi + +test -f $INFINIDB_INSTALL_DIR/post/functions && . $INFINIDB_INSTALL_DIR/post/functions + +mid=`module_id` + +#if um, cloud, separate system type, external um storage, then setup mount +if [ $module = "um" ]; then + if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then + systemtype=`$INFINIDB_INSTALL_DIR/bin/getConfig Installation ServerTypeInstall` + if [ $systemtype = "1" ]; then + umstoragetype=`$INFINIDB_INSTALL_DIR/bin/getConfig Installation UMStorageType` + if [ $umstoragetype = "external" ]; then + echo "Setup UM Volume Mount" + device=`$INFINIDB_INSTALL_DIR/bin/getConfig Installation UMVolumeDeviceName$mid` + mkdir -p $INFINIDB_INSTALL_DIR/mysql/db > /dev/null 2>&1 + mount $device $INFINIDB_INSTALL_DIR/mysql/db -t ext2 -o defaults + chown mysql:mysql -R $INFINIDB_INSTALL_DIR/mysql > /dev/null 2>&1 + fi + fi + fi +fi + +#if pm, create dbroot directories +if [ $module = "pm" ]; then + numdbroots=`$INFINIDB_INSTALL_DIR/bin/getConfig SystemConfig DBRootCount` + for (( id=1; id<$numdbroots+1; id++ )); do + mkdir -p $INFINIDB_INSTALL_DIR/data$id > /dev/null 2>&1 + chmod 755 $INFINIDB_INSTALL_DIR/data$id + done +fi + +echo "Setup rc.local on Module" +if [ $EUID -eq 0 -a -f $INFINIDB_INSTALL_DIR/local/rc.local.columnstore ]; then + if [ $user = "root" ]; then + touch /etc/rc.local + rm -f /etc/rc.local.columnstoreSave + cp /etc/rc.local /etc/rc.local.columnstoreSave + cat $INFINIDB_INSTALL_DIR/local/rc.local.columnstore >> /etc/rc.local + else + sudo touch /etc/rc.local + sudo rm -f /etc/rc.local.columnstoreSave + sudo cp /etc/rc.local /etc/rc.local.columnstoreSave + sudo cat $INFINIDB_INSTALL_DIR/local/rc.local.columnstore >> /etc/rc.local + fi +fi + +if [ $user != "root" ]; then + echo "Setup .bashrc on Module for non-root" + + eval userhome=~$user + bashFile=$userhome/.bashrc + touch ${bashFile} + + echo " " >> ${bashFile} + echo "export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR" >> ${bashFile} + echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFINIDB_INSTALL_DIR/lib:$INFINIDB_INSTALL_DIR/mysql/lib/mysql" >> ${bashFile} +fi + +plugin=`$INFINIDB_INSTALL_DIR/bin/getConfig SystemConfig DataFilePlugin` +if [ -n "$plugin" ]; then + echo "Setup .bashrc on Module for local-query" + + setenv=`$INFINIDB_INSTALL_DIR/bin/getConfig SystemConfig DataFileEnvFile` + + eval userhome=~$user + bashFile=$userhome/.bashrc + touch ${bashFile} + + echo " " >> ${bashFile} + echo ". $INFINIDB_INSTALL_DIR/bin/$setenv" >> ${bashFile} +fi + +# if mysqlrep is on and module has a my.cnf file, upgrade it + +MySQLRep=`$INFINIDB_INSTALL_DIR/bin/getConfig Installation MySQLRep` +if [ $MySQLRep = "y" ]; then + if test -f $INFINIDB_INSTALL_DIR/mysql/my.cnf ; then + echo "Run Upgrade on my.cnf on Module" + $INFINIDB_INSTALL_DIR/bin/mycnfUpgrade > /tmp/mycnfUpgrade.log 2>&1 + fi +fi + +if test -f $INFINIDB_INSTALL_DIR/mysql/my.cnf ; then + echo "Run Mysql Port update on my.cnf on Module" + $INFINIDB_INSTALL_DIR/bin/mycnfUpgrade $mysqlPort > /tmp/mycnfUpgrade_port.log 2>&1 +fi + +# if um, run mysql install scripts +if [ $module = "um" ]; then + echo "Run post-mysqld-install" + $INFINIDB_INSTALL_DIR/bin/post-mysqld-install > /tmp/post-mysqld-install.log 2>&1 + echo "Run post-mysql-install" + $INFINIDB_INSTALL_DIR/bin/post-mysql-install > /tmp/post-mysql-install.log 2>&1 +fi + + +echo " " +echo "!!!Module Installation Successfully Completed!!!" + +exit 0 diff --git a/export/bin/myCnf-exclude-args.text b/export/bin/myCnf-exclude-args.text new file mode 100755 index 000000000..aac98c73a --- /dev/null +++ b/export/bin/myCnf-exclude-args.text @@ -0,0 +1,2 @@ +# List of my.cnf arguments that should be ignored during upgrade install +# diff --git a/export/bin/myCnf-include-args.text b/export/bin/myCnf-include-args.text new file mode 100755 index 000000000..bc2c4c74f --- /dev/null +++ b/export/bin/myCnf-include-args.text @@ -0,0 +1,18 @@ +# List of my.cnf arguments that should be checked and saved during upgrade install +# +infinidb_local_query +log-bin=mysql-bin +server-id +max_length_for_sort_data +tmpdir +log-error +general_log_file +slow_query_log_file +general-log +slow-query-log +character-set-server +collation-server +init-connect +binlog_format +secure-auth +port \ No newline at end of file diff --git a/export/bin/os_check.sh b/export/bin/os_check.sh new file mode 100755 index 000000000..620fe447b --- /dev/null +++ b/export/bin/os_check.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# +# Determine the Linux distribution and version that is being run. +# +# Check for GNU/Linux distributions + if [ -f /etc/SuSE-release ]; then + DISTRIBUTION="suse" + elif [ -f /etc/UnitedLinux-release ]; then + DISTRIBUTION="united" + elif [ -f /etc/debian_version ]; then + DISTRIBUTION="debian" + elif [ -f /etc/lsb_version ]; then + DISTRIBUTION="ubuntu" + elif [ -f /etc/redhat-release ]; then + a=`grep -i 'red.*hat.*enterprise.*linux' /etc/redhat-release` + if test $? = 0; then + DISTRIBUTION=rhel + else + a=`grep -i 'red.*hat.*linux' /etc/redhat-release` + if test $? = 0; then + DISTRIBUTION=rh + else + a=`grep -i 'Fedora' /etc/redhat-release` + if test $? = 0; then + DISTRIBUTION=fedora + else + a=`grep -i 'cern.*e.*linux' /etc/redhat-release` + if test $? = 0; then + DISTRIBUTION=cel + else + a=`grep -i 'scientific linux cern' /etc/redhat-release` + if test $? = 0; then + DISTRIBUTION=slc + else + DISTRIBUTION="unknown" + fi + fi + fi + fi + fi + else + DISTRIBUTION="unknown" + fi +echo ${DISTRIBUTION} diff --git a/export/bin/patch_installer.sh b/export/bin/patch_installer.sh new file mode 100755 index 000000000..8e21af3a6 --- /dev/null +++ b/export/bin/patch_installer.sh @@ -0,0 +1,69 @@ +#!/usr/bin/expect +# +# $Id: patch_installer.sh 421 2007-04-05 15:46:55Z dhill $ +# +# Install Software Patch on Module +# Argument 1 - Remote Module Name +# Argument 2 - Remote Server Host Name or IP address +# Argument 3 - Root Password of remote server +# Argument 4 - Patch Directory Location +# Argument 5 - Install Directory Location +# Argument 6 - Software File being installed +# Argument 7 - Debug flag 1 for on, 0 for off +set timeout 20 +set MODULE [lindex $argv 0] +set SERVER [lindex $argv 1] +set PASSWORD [lindex $argv 2] +set PATCHLOCATION [lindex $argv 3] +set INSTALLLOCATION [lindex $argv 4] +set FILE [lindex $argv 5] +set DEBUG [lindex $argv 6] +set USERNAME "root" +set UNM [lindex $argv 7] +if { $UNM != "" } { + set USERNAME $UNM +} +log_user $DEBUG +spawn -noecho /bin/bash +# +# mv file being install +# +send_user "Backup Current File on Module" +expect -re "# " +send "ssh $USERNAME@$SERVER 'mv $INSTALLLOCATION$FILE $INSTALLLOCATION$FILE'.patchSave''\n" +# accept the remote host fingerprint (assuming never logged in before) +expect -re "service not known" { send_user " FAILED: Invalid Host\n" ; exit } +expect -re "authenticity" { send "yes\n" } +expect -re "word: " +# password for ssh +send "$PASSWORD\n" +# check return +expect { + -re "# " { send_user " DONE" } + -re "Permission denied" { send_user " FAILED: Invalid password\n" } exit; + -re "mv" { send_user " FAILED: copy filed\n" ; exit} +} +send_user "\n" +# +# send Patch File +# +send_user "Copy New Calpont Software File to Module" +expect -re "# " +send "scp $PATCHLOCATION$FILE $USERNAME@$SERVER:$INSTALLLOCATION$FILE\n" +expect -re "word: " +# send the password +send "$PASSWORD\n" +# check return +expect { + -re "100%" { send_user " DONE" } + -re "scp" { send_user " FAILED\n" ; + send_user "\n*** Installation Failed\n" ; + exit } + -re "Permission denied" { send_user " FAILED: Invalid password\n" ; exit } + -re "No such file or directory" { send_user " FAILED: Invalid package\n" ; exit } +} +send_user "\n" + +send_user "\n!!!Patch Installation Successfully Completed!!!\n" +exit + diff --git a/export/bin/performance_installer.sh b/export/bin/performance_installer.sh new file mode 100755 index 000000000..bc9e7a6ef --- /dev/null +++ b/export/bin/performance_installer.sh @@ -0,0 +1,319 @@ +#!/usr/bin/expect +# +# $Id: performance_installer.sh 1128 2009-01-05 16:36:59Z rdempsey $ +# +# Install RPM and custom OS files on system +# Argument 1 - Remote Module Name +# Argument 2 - Remote Server Host Name or IP address +# Argument 3 - Root Password of remote server +# Argument 4 - Package name being installed +# Argument 5 - Install Type, "initial" or "upgrade" +# Argument 6 - Debug flag 1 for on, 0 for off +set timeout 30 +set USERNAME root +set MODULE [lindex $argv 0] +set SERVER [lindex $argv 1] +set PASSWORD [lindex $argv 2] +set VERSION [lindex $argv 3] +set INSTALLTYPE [lindex $argv 4] +set PKGTYPE [lindex $argv 5] +set NODEPS [lindex $argv 6] +set DEBUG [lindex $argv 7] +set INSTALLDIR "/usr/local/MariaDB/Columnstore" +set IDIR [lindex $argv 8] +if { $IDIR != "" } { + set INSTALLDIR $IDIR +} +set USERNAME "root" +set UNM [lindex $argv 13] +if { $UNM != "" } { + set USERNAME $UNM +} + +set BASH "/bin/bash " +if { $DEBUG == "1" } { + set BASH "/bin/bash -x " +} + +set HOME "$env(HOME)" + +log_user $DEBUG +spawn -noecho /bin/bash +# +if { $PKGTYPE == "rpm" } { + set PKGERASE "rpm -e --nodeps \$(rpm -qa | grep '^infinidb')" + set PKGERASE1 "rpm -e --nodeps " + + set PKGINSTALL "rpm -ivh $NODEPS --force infinidb*$VERSION*" + set PKGUPGRADE "rpm -Uvh --noscripts infinidb*$VERSION*" +} else { + if { $PKGTYPE == "deb" } { + set PKGERASE "dpkg -P \$(dpkg --get-selections | grep '^infinidb')" + set PKGERASE1 "dpkg -P " + set PKGINSTALL "dpkg -i --force-confnew infinidb*$VERSION*" + set PKGUPGRADE "dpkg -i --force-confnew infinidb*$VERSION*" + } else { + if { $PKGTYPE != "bin" } { + send_user "Invalid Package Type of $PKGTYPE" + exit 1 + } + } +} + +# check and see if remote server has ssh keys setup, set PASSWORD if so +send_user " " +send "ssh $USERNAME@$SERVER 'time'\n" +set timeout 60 +expect { + "Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit 1 } + "service not known" { send_user "FAILED: Invalid Host\n" ; exit 1 } + "authenticity" { send "yes\n" + expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + } + } + "sys" { set PASSWORD "ssh" } + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 } + "Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + "No route to host" { send_user "ERROR: No route to host\n" ; exit 1 } + timeout { send_user "ERROR: Timeout to host\n" ; exit 1 } +} +set timeout 30 +expect { + -re {[$#] } { } + "sys" { } +} +send_user "\n" +#BUG 5749 - SAS: didn't work on their system until I added the sleep 60 + +sleep 60 + +if { $INSTALLTYPE == "initial" || $INSTALLTYPE == "uninstall" } { + # + # erase package + # + send_user "Erase InfiniDB Packages on Module " + send "ssh $USERNAME@$SERVER '$PKGERASE ;$PKGERASE1 dummy'\n" + if { $PASSWORD != "ssh" } { + set timeout 30 + expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + } + } + set timeout 120 + expect { + "package dummy" { send_user "DONE" } + "error: Failed dependencies" { send_user "ERROR: Failed dependencies\n" ; exit 1 } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 } + "Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + "No route to host" { send_user "ERROR: No route to host\n" ; exit 1 } + } + send_user "\n" +} + +if { $INSTALLTYPE == "uninstall" } { exit 0 } + +# +# send the package +# +set timeout 30 +#expect -re {[$#] } +send_user "Copy New InfiniDB Package to Module " +send "ssh $USERNAME@$SERVER 'rm -f /root/infinidb-*.$PKGTYPE'\n" +if { $PASSWORD != "ssh" } { + set timeout 30 + expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + } +} +expect { + -re {[$#] } { } + "Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + "No route to host" { send_user "ERROR: No route to host\n" ; exit 1 } +} +set timeout 30 +expect { + -re {[$#] } { } +} + +send "scp $HOME/infinidb*$VERSION* $USERNAME@$SERVER:.;$PKGERASE dummy\n" +if { $PASSWORD != "ssh" } { + set timeout 30 + expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + } +} +set timeout 180 +expect { + "package dummy" { send_user "DONE" } + "directory" { send_user "ERROR\n" ; + send_user "\n*** Installation ERROR\n" ; + exit 1 } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } +} +send_user "\n" + +#sleep to make sure it's finished +sleep 5 + +# +if { $INSTALLTYPE == "initial"} { + # + # install package + # + send_user "Install InfiniDB Packages on Module " + + send "ssh $USERNAME@$SERVER '$PKGINSTALL infinidb*$VERSION* ;$PKGERASE dummy'\n" + if { $PASSWORD != "ssh" } { + set timeout 30 + expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + } + } + set timeout 180 + expect { + "package dummy" { send_user "DONE" } + "error: Failed dependencies" { send_user "ERROR: Failed dependencies\n" ; + send_user "\n*** Installation ERROR\n" ; + exit 1 } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + "needs" { send_user "ERROR: disk space issue\n" ; exit 1 } + "conflicts" { send_user "ERROR: File Conflict issue\n" ; exit 1 } + } + +} +send_user "\n" +#sleep to make sure it's finished +sleep 5 +set timeout 30 +#expect -re {[$#] } +if { $INSTALLTYPE == "initial"} { + # + # copy over InfiniDB config file + # + send_user "Copy InfiniDB Config file to Module " + send "scp $INSTALLDIR/etc/* $USERNAME@$SERVER:$INSTALLDIR/etc/.\n" + if { $PASSWORD != "ssh" } { + set timeout 30 + expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + } + } + set timeout 30 + expect { + -re {[$#] } { send_user "DONE" } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + } + send_user "\n" + #sleep to make sure it's finished + sleep 5 + # + # copy over custom OS tmp files + # + send_user "Copy Custom OS files to Module " + send "scp -r $INSTALLDIR/local/etc $USERNAME@$SERVER:$INSTALLDIR/local/.\n" + if { $PASSWORD != "ssh" } { + set timeout 30 + expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + } + } + set timeout 30 + expect { + -re {[$#] } { send_user "DONE" } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + } + send_user "\n" + #sleep to make sure it's finished + sleep 5 + # + # copy over InfiniDB OS files + # + send_user "Copy InfiniDB OS files to Module " + send "scp $INSTALLDIR/local/etc/$MODULE/* $USERNAME@$SERVER:$INSTALLDIR/local/.\n" + if { $PASSWORD != "ssh" } { + set timeout 30 + expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + } + } + set timeout 30 + expect { + -re {[$#] } { send_user "DONE" } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + } + # + send_user "\n" + #sleep to make sure it's finished + sleep 5 + # + # Start module installer to setup Custom OS files + # + send_user "Run Module Installer " + send "ssh $USERNAME@$SERVER '$BASH $INSTALLDIR/bin/module_installer.sh --module=pm'\n" + if { $PASSWORD != "ssh" } { + set timeout 30 + expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + } + } + set timeout 30 + expect { + "!!!Module" { send_user "DONE" } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 } + "FAILED" { send_user "ERROR: missing OS file\n" ; exit 1 } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + "No such file" { send_user "ERROR: File Not Found\n" ; exit 1 } + } + send_user "\n" +} + +# +# check InfiniDB syslog functionality +# +set timeout 30 +#expect -re {[$#] } + +send_user "Check InfiniDB system logging functionality " +send " \n" +send date\n +send "ssh $USERNAME@$SERVER '$BASH $INSTALLDIR/bin/syslogSetup.sh check'\n" +if { $PASSWORD != "ssh" } { + set timeout 30 + expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + } +} +set timeout 30 +expect { + "Logging working" { send_user "DONE" } + timeout { send_user "DONE" } + "not working" { send_user "WARNING: InfiniDB system logging functionality not working" } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } +} +send_user "\n" + +# +send_user "\nInstallation Successfully Completed on '$MODULE'\n" +exit 0 +# vim:ts=4 sw=4: + diff --git a/export/bin/post-install b/export/bin/post-install new file mode 100755 index 000000000..c55bab2ec --- /dev/null +++ b/export/bin/post-install @@ -0,0 +1,336 @@ +#!/bin/bash +# +# $Id: post-install 3705 2013-08-07 19:47:20Z dhill $ +# +# Post-install steps for columnstore install + +prefix=/usr/local +installdir=$prefix/MariaDB/Columnstore +rpmmode=install +user=$USER +if [ -z "$user" ]; then + user=root +fi +quiet=0 + +for arg in "$@"; do + if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then + prefix="`echo $arg | awk -F= '{print $2}'`" + installdir=$prefix/MariaDB/Columnstore + elif [ `expr -- "$arg" : '--rpmmode='` -eq 10 ]; then + rpmmode="`echo $arg | awk -F= '{print $2}'`" + elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then + installdir="`echo $arg | awk -F= '{print $2}'`" + prefix=`dirname $installdir` + elif [ `expr -- "$arg" : '--user='` -eq 7 ]; then + user="`echo $arg | awk -F= '{print $2}'`" + elif [ `expr -- "$arg" : '--quiet'` -eq 7 ]; then + quiet=1 + elif [ `expr -- "$arg" : '--plugin='` -eq 9 ]; then + plugin="`echo $arg | awk -F= '{print $2}'`" + else + echo "post-install: ignoring unknown argument: $arg" 1>&2 + fi +done + +if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then + export INFINIDB_INSTALL_DIR=$installdir + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib +else + # add library config file + /bin/cp -f $installdir/bin/infinidb.conf /etc/ld.so.conf.d/. + ldconfig +fi + +#check 64-bit OS compatiable +arch=`uname -m` +patcnt=`expr "$arch" : 'i.86'` +is64bitos=1 +if [ $patcnt -ne 0 ]; then + is64bitos=0 +fi +is64bitpkg=1 +file $installdir/bin/PrimProc | grep '64-bit' >/dev/null 2>&1 +if [ $? -ne 0 ]; then + is64bitpkg=0 +fi +if [ $is64bitpkg -eq 1 -a $is64bitos -ne 1 ]; then + echo "ERROR: Incompatiable Version, package is intended for a x86_64 architecture" + echo "exiting...." + exit 1 +fi + +if [ ! -f $installdir/etc/Calpont.xml ]; then + echo "$installdir/etc/Calpont.xml not found, exiting" + exit 1 +fi + +cd $installdir/lib || exit 1 +for lib in *.so.1.0.0; do + blib=`basename $lib .1.0.0` + ln -sf $lib $blib +done +chown -h $user.$user *.so >/dev/null 2>&1 +if [ -f libnetsnmp.so.5.2.1 ]; then + for lib in *.so.5.2.1; do + blib=`basename $lib .5.2.1` + ln -sf $lib $blib + ln -sf $lib ${blib}.5 + done + chown -h $user.$user *.so *.so.5 >/dev/null 2>&1 +fi +if [ -f libstdc++.so.6.0.14 ]; then + ln -sf libstdc++.so.6.0.14 libstdc++.so.6 + chown -h $user.$user libstdc++.so.6 >/dev/null 2>&1 +fi + +ln -sf libjemalloc.so.3.3.0 libjemalloc.so +chown -h $user.$user libjemalloc.so >/dev/null 2>&1 + +# TODO-based on early experience with HDP it doesn't install bigtop +# so the code below will not correctly detect JAVA_HOME. Need to +# decide how to handle +# Autodetect JAVA_HOME if not defined +#if [ -e /usr/libexec/bigtop-detect-javahome ]; then +#. /usr/libexec/bigtop-detect-javahome +#elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then +#. /usr/lib/bigtop-utils/bigtop-detect-javahome +#fi +#ln -sf $JAVA_HOME/jre/lib/amd64/server/libjvm.so +#chown -h $user.$user libjvm.so >/dev/null 2>&1 + +cd / + +test -d /var/log/Calpont || mkdir /var/log/Calpont >/dev/null 2>&1 +test -d /var/log/Calpont/archive || mkdir /var/log/Calpont/archive >/dev/null 2>&1 +test -d /var/log/Calpont/corefiles || mkdir /var/log/Calpont/corefiles >/dev/null 2>&1 +test -d /var/log/Calpont/trace || mkdir /var/log/Calpont/trace >/dev/null 2>&1 +test -h /var/log/Calpont/data && rm -f /var/log/Calpont/data +test -d /var/log/Calpont/data || mkdir /var/log/Calpont/data >/dev/null 2>&1 +# make sure trace dir is world-writable and sticky +chmod 1755 /var/log/Calpont/trace >/dev/null 2>&1 +test -d $installdir/data || mkdir $installdir/data +test -d $installdir/data1 || mkdir $installdir/data1 +test -d $installdir/data1/systemFiles || mkdir $installdir/data1/systemFiles +test -d $installdir/data1/systemFiles/dbrm || mkdir $installdir/data1/systemFiles/dbrm +test -d $installdir/data1/systemFiles/dataTransaction || rmdir $installdir/data1/systemFiles/dataTransaction >/dev/null 2>&1 +test -d $installdir/data1/systemFiles/dataTransaction/archive || rmdir $installdir/data1/systemFiles/dataTransaction/archive >/dev/null 2>&1 +chmod 1755 $installdir/data1 >/dev/null 2>&1 +chmod -R 1755 $installdir/data1/systemFiles >/dev/null 2>&1 +chmod 1755 $installdir/etc > /dev/null 2>&1 + +#create the bulk-load dirs +mkdir -p $installdir/data/bulk/data/import >/dev/null 2>&1 +mkdir -p $installdir/data/bulk/log >/dev/null 2>&1 +mkdir -p $installdir/data/bulk/job >/dev/null 2>&1 +mkdir -p $installdir/data/bulk/rollback >/dev/null 2>&1 +mkdir -p $installdir/data/bulk/tmpjob >/dev/null 2>&1 +rm -f $installdir/data/bulk/tmpjob/* >/dev/null 2>&1 +chmod -R 755 $installdir/data/bulk >/dev/null 2>&1 + +#create infinidb temp file directory +mkdir -p /tmp/infinidb_tmp_files >/dev/null 2>&1 + +#setup core file directory and link +mkdir /var/log/Calpont/corefiles > /dev/null 2>&1 +chmod 755 /var/log/Calpont/corefiles > /dev/null 2>&1 + +#create mount directories +mkdir /mnt/tmp > /dev/null 2>&1 +mkdir /var/log/Calpont/data/archive > /dev/null 2>&1 + +# install Calpont Log Rotate File +test -d $installdir/mysql/db || mkdir -p $installdir/mysql/db +cp $installdir/bin/columnstoreLogRotate /etc/logrotate.d/columnstore > /dev/null 2>&1 +rm -rf $installdir/mysql/db/infinidb_log_archive > /dev/null 2>&1 + +# delete Calpont shared memory segments +$installdir/bin/Calpont/bin/clearShm > /dev/null 2>&1 + +#setup the infinidb service script +rm -f /etc/init.d/infinidb >/dev/null 2>&1 +cp $installdir/bin/infinidb /etc/init.d >/dev/null 2>&1 +if [ -x /sbin/chkconfig ]; then + /sbin/chkconfig --add infinidb > /dev/null 2>&1 + /sbin/chkconfig infinidb on > /dev/null 2>&1 +elif [ -x /usr/sbin/update-rc.d ]; then + /usr/sbin/update-rc.d infinidb defaults 99 > /dev/null 2>&1 +else + echo "" + echo "Package 'chkconfig' or 'update-rc.d' not installed, contact your sysadmin if you want to setup to autostart for infinidb" +fi + +#setup InfiniDB system logging +if [ $user = "root" ]; then + $installdir/bin/syslogSetup.sh install > /tmp/syslog_install.log 2>&1 + chmod 777 -R /dev/shm + rm -f /etc/default/infinidb +else + sudo $installdir/bin/syslogSetup.sh --installdir=$installdir install > /tmp/syslog_install.log 2>&1 + sudo chown $user:$user $installdir/etc/Calpont.xml + sudo chmod 755 /var/log + sudo chmod -R 755 /var/log/Calpont + sudo chmod -R 777 /dev/shm + sudo rm -f /var/lock/subsys/mysql-Calpont + sudo rm -f /tmp/StopCalpont + + sed -i -e s@/usr/local/MariaDB/Columnstore@$installdir@g $installdir/bin/infinidb.def + sudo cp $installdir/bin/infinidb.def /etc/default/infinidb +fi + +#check if InfiniDB system logging was setup +cat /tmp/syslog_install.log | grep 'No System Logging' >/dev/null 2>&1 +if [ $? -eq 0 ]; then + cat /tmp/syslog_install.log +fi + +#setup alias commands +eval userhome=~$user +bashFile=$userhome/.bashrc +touch ${bashFile} +if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then + sed -i -e s@/usr/local/MariaDB/Columnstore@$installdir@g $installdir/bin/columnstoreAlias +fi +egrep -qs 'Calpont Database Platform Alias Commands' ${bashFile} +rc1=$? +egrep -qs 'InfiniDB Alias Commands' ${bashFile} +rc2=$? +if [ $rc1 -ne 0 -a $rc2 -ne 0 ]; then + rm -f ${bashFile}.columnstoreSave + cp ${bashFile} ${bashFile}.columnstoreSave >/dev/null 2>&1 + cat $installdir/bin/columnstoreAlias >> ${bashFile} + echo " " >> ${bashFile} +fi + +#check and get amazon EC2 env variables +if [ -n "$EC2_HOME" ]; then + $installdir/bin/setConfig -d Installation EC2_HOME $EC2_HOME + + if [ -n "$EC2_HOME" ]; then + $installdir/bin/setConfig -d Installation JAVA_HOME $JAVA_HOME + fi + + $installdir/bin/setConfig -d Installation EC2_PATH $PATH:/home/ec2/bin:/opt/aws/bin +fi + +#log install message +test -f $installdir/post/functions && . $installdir/post/functions +LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib $installdir/bin/cplogger -i 19 "***** InfiniDB Installed *****" + +#setup hadoop +hadoop=`which hadoop 2>/dev/null` +if [ -z $hadoop ]; then + #check for non-root user + if [ $installdir != "/usr/local/MariaDB/Columnstore" -a $quiet -eq 0 ]; then +cat < /tmp/hdfs-20-test.log 2>&1 + if [ $? -eq 0 ]; then + #Passed set in config file + $installdir/bin/setConfig -d SystemConfig DataFilePlugin $installdir/lib/hdfs-20.so + $installdir/bin/setConfig -d SystemConfig DataFileEnvFile setenv-hdfs-20 + + #check for non-root user + if [ $installdir != "/usr/local/MariaDB/Columnstore" -a $quiet -eq 0 ]; then +cat < /tmp/hdfs-12-test.log 2>&1 + if [ $? -eq 0 ]; then + #Passed set in config file + $installdir/bin/setConfig -d SystemConfig DataFilePlugin $installdir/lib/hdfs-12.so + $installdir/bin/setConfig -d SystemConfig DataFileEnvFile setenv-hdfs-12 + + if [ $installdir != "/usr/local/MariaDB/Columnstore" -a $quiet -eq 0 ]; then +cat < /tmp/error.check + if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then + password=`$installdir/bin/getMySQLpw` + if [ $? -ne 0 ]; then + echo "MySQL Password missing or incorrect" + rm -f /tmp/error.check + $installdir/mysql/mysql-Calpont stop + sleep 2 + exit 2; + fi + rm -f /tmp/error.check + return 1; + fi + + rm -f /tmp/error.check + + #--------------------------------------------------------------------------- + # See if engine infinidb exist + #--------------------------------------------------------------------------- + echo "checking for engine infinidb..." + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='show engines;' \ + calpontsys | grep -i infinidb + + # + # Add compressiontype column to SYSCOLUMN if applicable + # + if [ $? -ne 0 ]; then + echo "infinidb doesn't exist" + return 1 + fi + + echo "infinidb exist" + + return 0; +} + +prefix=/usr/local +installdir=$prefix/MariaDB/Columnstore +rpmmode=install +password= + +for arg in "$@"; do + if [ $(expr -- "$arg" : '--prefix=') -eq 9 ]; then + prefix="$(echo $arg | awk -F= '{print $2}')" + installdir=$prefix/MariaDB/Columnstore + elif [ $(expr -- "$arg" : '--rpmmode=') -eq 10 ]; then + rpmmode="$(echo $arg | awk -F= '{print $2}')" + elif [ $(expr -- "$arg" : '--password=') -eq 11 ]; then + password="$(echo $arg | awk -F= '{print $2}')" + elif [ $(expr -- "$arg" : '--installdir=') -eq 13 ]; then + installdir="$(echo $arg | awk -F= '{print $2}')" + prefix=$(dirname $installdir) + else + echo "ignoring unknown argument: $arg" 1>&2 + fi +done + +if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then + export INFINIDB_INSTALL_DIR=$installdir + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFINIDB_INSTALL_DIR/lib:$INFINIDB_INSTALL_DIR/mysql/lib/mysql +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 +elif [ -f $installdir/lib/libcalmysql.so.1 ]; then + libcalmysql=$installdir/lib/libcalmysql.so.1 + libudfsdk=$installdir/lib/libudf_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 +fi + +if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then + sed -i -e s@/usr/local/MariaDB/Columnstore@$installdir@g $installdir/mysql/my.cnf +fi + +if [ -x $installdir/mysql/mysql-Calpont ]; then + + # Restart in the same way that mysqld will be started normally. + $installdir/mysql/mysql-Calpont stop >/dev/null 2>&1 + sleep 2 + $installdir/mysql/mysql-Calpont start + + sleep 5 + + # Install various Calpont stuff... + $installdir/mysql/install_calpont_mysql.sh --password=$password --installdir=$installdir + checkForError + if [ $? -ne 0 ]; then + # retry + $installdir/mysql/install_calpont_mysql.sh --password=$password --installdir=$installdir + checkForError + if [ $? -ne 0 ]; then + echo "ERROR: missing or invalid password, or InfiniDB plugin install missing" + $installdir/mysql/mysql-Calpont stop + sleep 2 + exit 1; + fi + fi + + $installdir/mysql/mysql-Calpont stop +fi + +exit 0 + diff --git a/export/bin/post-mysqld-install b/export/bin/post-mysqld-install new file mode 100755 index 000000000..612055f39 --- /dev/null +++ b/export/bin/post-mysqld-install @@ -0,0 +1,107 @@ +#!/bin/bash +# +# $Id: post-mysqld-install 3661 2013-06-25 22:04:33Z dhill $ +# +# Post-install steps for infinidb-mysql install + +prefix=/usr/local +installdir=$prefix/MariaDB/Columnstore +rpmmode=install +user=mysql +if [ $EUID -ne 0 ]; then + user=$USER +fi + +for arg in "$@"; do + if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then + prefix="`echo $arg | awk -F= '{print $2}'`" + installdir=$prefix/MariaDB/Columnstore + elif [ `expr -- "$arg" : '--rpmmode='` -eq 10 ]; then + rpmmode="`echo $arg | awk -F= '{print $2}'`" + elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then + installdir="`echo $arg | awk -F= '{print $2}'`" + prefix=`dirname $installdir` + elif [ `expr -- "$arg" : '--user='` -eq 7 ]; then + user="`echo $arg | awk -F= '{print $2}'`" + else + echo "post-mysqld-install: ignoring unknown argument: $arg" 1>&2 + fi +done + +cd $installdir/mysql/lib64 +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/lib64/mysql/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 $installdir/mysql/my.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 + +### Don't give the user the notes, we'll fix them ourselves... +$installdir/mysql/bin/mysql_install_db --rpm --user=$user --defaults-file=$installdir/mysql/my.cnf --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 + +test -e /etc/init.d/mysql-Calpont || cp $installdir/mysql/mysql-Calpont /etc/init.d >/dev/null 2>&1 + +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 +elif [ -f $installdir/lib/libcalmysql.so.1 ]; then + libcalmysql=$installdir/lib/libcalmysql.so.1 + libudfsdk=$installdir/lib/libudf_mysql.so.1 +else + libcalmysql= +fi + +if [ -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 +fi + +# cleanup previous install mysql replication files +rm -rf $mysql_datadir/*relay* +rm -rf $mysql_datadir/mysql-bin.* +rm -rf $mysql_datadir/master.info + +exit 0 diff --git a/export/bin/pre-uninstall b/export/bin/pre-uninstall new file mode 100755 index 000000000..6b73fb5d8 --- /dev/null +++ b/export/bin/pre-uninstall @@ -0,0 +1,156 @@ +#!/bin/bash +# +# $Id: post-uninstall 421 2007-04-05 15:46:55Z dhill $ +# +# Post-uninstall steps for columnstore install + +prefix=/usr/local +installdir=$prefix/MariaDB/Columnstore +rpmmode=install +user=$USER +sudo=sudo +if [ -z "$user" ]; then + user=root + sudo=" " +fi +quiet=0 + +for arg in "$@"; do + if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then + prefix="`echo $arg | awk -F= '{print $2}'`" + installdir=$prefix/MariaDB/Columnstore + elif [ `expr -- "$arg" : '--rpmmode='` -eq 10 ]; then + rpmmode="`echo $arg | awk -F= '{print $2}'`" + elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then + installdir="`echo $arg | awk -F= '{print $2}'`" + prefix=`dirname $installdir` + elif [ `expr -- "$arg" : '--user='` -eq 7 ]; then + user="`echo $arg | awk -F= '{print $2}'`" + elif [ `expr -- "$arg" : '--quiet'` -eq 7 ]; then + quiet=1 + else + echo "post-uninstall: ignoring unknown argument: $arg" 1>&2 + fi +done + +#stop services +$installdir/bin/infinidb stop > /dev/null 2>&1 +if test -f /etc/init.d/columnstore-Mysql ; then + $installdir/myql/columnstore-Mysql stop > /dev/null 2>&1 +fi + +if [ $installdir == "/usr/local/MariaDB/Columnstore" ]; then + # remove library config file + rm -f /etc/ld.so.conf.d/infinidb.conf + rm -f /etc/ld.so.cache + ldconfig +fi + +# uninstall OS scripts updated by postConfigure +if test -f /root/.bashrc.columnstoreSave ; then + $sudo mv -f /root/.bashrc.columnstoreSave /root/.bashrc > /dev/null 2>&1 +fi +if test -f /etc/exports.columnstoreSave ; then + $sudo mv -f /etc/exports.columnstoreSave /etc/exports > /dev/null 2>&1 +else + $sudo rm -f /etc/exports > /dev/null 2>&1 +fi +if test -f /etc/rc.d/rc.local.columnstoreSave ; then + $sudo mv -f /etc/rc.d/rc.local.columnstoreSave /etc/rc.d/rc.local > /dev/null 2>&1 +fi +if test -f /etc/rc.local.columnstoreSave ; then + $sudo mv -f /etc/rc.local.columnstoreSave /etc/rc.local > /dev/null 2>&1 +fi + +export INFINIDB_INSTALL_DIR=$installdir + +cloud=`$INFINIDB_INSTALL_DIR/bin/getConfig Installation Cloud` +if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then + if test -f /etc/fstab ; then + $sudo sed -i '/Calpont\/data/d' /etc/fstab > /dev/null 2>&1 + fi +fi + +#remove log file directories +#rm -rf /var/log/Calpont > /dev/null 2>&1 +#rm -f $installdir/mysql/db/*.err > /dev/null 2>&1 +rm -f /var/log/Calpont/activeAlarms > /dev/null 2>&1 +rm -f /var/log/Calpont/*.log1 > /dev/null 2>&1 +rm -rf $installdir/mysql/db/infinidb_log_archive > /dev/null 2>&1 +sudo rm -f /etc/default/infinidb + +# remove Calpont Log Rotate File abd Transaction Log File +rm -f /etc/logrotate.d/columnstore > /dev/null 2>&1 +rm -f /etc/cron.d/transactionLog > /dev/null 2>&1 + +# delete Calpont shared memory segments +pkill -9 ProcMon +$installdir/bin/clearShm > /dev/null 2>&1 + +# delete prat files +rm -f /etc/cron.d/ps > /dev/null 2>&1 +rm -f /etc/pscollect > /dev/null 2>&1 +/etc/init.d/crond reload > /dev/null 2>&1 +systemctl reload crond.service > /dev/null 2>&1 + +# delete tmp files +rm -f $installdir/local/*.columnstore +rm -rf $installdir/local/etc/ +rm -rf /tmp/bucketreuse +rm -f /tmp/columnstore.txt +rm -f /tmp/dbbuilder.* +rm -f /tmp/dbrmfiles +rm -f /var/lock/subsys/infinidb +rm -f /tmp/pkgcheck +rm -f /tmp/upgrade-status.log.* +rm -f /tmp/mount.log +rm -f $installdir/data/bulk/tmpjob/* >/dev/null 2>&1 +rm -rf /tmp/infinidb_tmp_files +rm -f $installdir/local/moveDbrootTransactionLog + +#delete any old setenv files under home directory +if [ $user = "root" ]; then + rm -f /root/setenv-hdfs* +else + rm -f /home/$user/setenv-hdfs* +fi + +# delete core files +#rm -f /var/log/Calpont/corefiles/* > /dev/null 2>&1 + +#uninstall InfiniDB system logging +if [ -x $installdir/bin/syslogSetup.sh ]; then + if [ $user = "root" ]; then + $installdir/bin/syslogSetup.sh uninstall >/dev/null 2>&1 + rm -f /etc/init.d/infinidb > /dev/null 2>&1 + else + sudo $installdir/bin/syslogSetup.sh uninstall >/dev/null 2>&1 + fi +fi + +if [ -x /sbin/chkconfig ]; then + /sbin/chkconfig infinidb off > /dev/null 2>&1 + /sbin/chkconfig --del infinidb > /dev/null 2>&1 +elif [ -x /usr/sbin/update-rc.d ]; then + /usr/sbin/update-rc.d -f infinidb remove > /dev/null 2>&1 +fi + +if [ $quiet != 1 ]; then + #make copy of Calpont.xml + /bin/cp -f $installdir/etc/Calpont.xml $installdir/etc/Calpont.xml.rpmsave > /dev/null 2>&1 + /bin/cp -f $installdir/mysql/my.cnf $installdir/mysql/my.cnf.rpmsave > /dev/null 2>&1 +fi + +#umount file systems +if [ $user = "root" ]; then + rm -f $installdir/data*/OAMdbrootCheck > /dev/null 2>&1 +else + sudo rm -f $installdir/data*/OAMdbrootCheck > /dev/null 2>&1 +fi + +#tell user to run post configure script +echo " " +echo "Calpont uninstall completed" + +exit 0 + diff --git a/export/bin/remote_command.sh b/export/bin/remote_command.sh new file mode 100755 index 000000000..6878bcf22 --- /dev/null +++ b/export/bin/remote_command.sh @@ -0,0 +1,70 @@ +#!/usr/bin/expect +# +# $Id: remote_command.sh 3495 2012-12-17 22:51:40Z dhill $ +# +# Remote command execution script to another server +# Argument 1 - Remote Server Host Name or IP address +# Argument 2 - Remote Server password +# Argument 3 - Command +# Argument 4 - debug flag +# Argument 5 - Remote user name (optional) +# Argument 6 - Force a tty to be allocated (optional) +set stty_init {cols 512 -opost}; +set timeout 30 +set SERVER [lindex $argv 0] +set PASSWORD [lindex $argv 1] +set COMMAND [lindex $argv 2] +set DEBUG [lindex $argv 3] + +if {[info exists env(USER)]} { + set USERNAME $env(USER) +} else { + set USERNAME "root" +} + +set UNM [lindex $argv 4] +if { $UNM != "" && $UNM != "-" } { + set USERNAME "$UNM" +} +set TTY "" +set TTYOPT [lindex $argv 5] +if { $TTYOPT != "" } { + set TTY "-t" +} +log_user $DEBUG +spawn -noecho /bin/bash +expect -re {[$#] } + +if { $PASSWORD == "ssh" } { + set PASSWORD "" +} + +# +# send command +# +send "ssh $TTY $USERNAME@$SERVER $COMMAND\n" +expect { + "Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit 1} + "service not known" { send_user " FAILED: Invalid Host\n" ; exit 1} + "ssh: connect to host" { send_user " FAILED: Invalid Host\n" ; exit 1 } + "Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + "authenticity" { send "yes\n" + expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + } + } + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + -re {[$#] } { exit 0 } +} +expect { + -re {[$#] } { exit 0 } + "Permission denied" { send_user " FAILED: Invalid password\n" ; exit 1 } + "(y or n)" { send "y\n" + expect -re {[$#] } { exit 0 } + } +} +exit 0 + diff --git a/export/bin/remote_command_verify.sh b/export/bin/remote_command_verify.sh new file mode 100755 index 000000000..d7ceb5207 --- /dev/null +++ b/export/bin/remote_command_verify.sh @@ -0,0 +1,53 @@ +#!/usr/bin/expect +# +# $Id: remote_commend.sh 421 2007-04-05 15:46:55Z dhill $ +# +# Remote command execution script to another server +# Argument 1 - Remote Server Host Name or IP address +# Argument 2 - Remote Server root password +# Argument 3 - Command +# Argument 4 - Good Response +# Argument 5 - Bad Response +# Argument 6 - timeout +# Argument 7 - Debug flag +set timeout 30 +set SERVER [lindex $argv 0] +set USERNAME [lindex $argv 1] +set PASSWORD [lindex $argv 2] +set COMMAND [lindex $argv 3] +set GOOD_RESPONSE [lindex $argv 4] +set BAD_RESPONSE [lindex $argv 5] +set timeout [lindex $argv 6] +set DEBUG [lindex $argv 7] +log_user $DEBUG +spawn -noecho /bin/bash +expect -re {[$#] } +# +# send command +# +send "ssh $USERNAME@$SERVER '$COMMAND'\n" +expect { + -re "authenticity" { send "yes\n" + expect { + timeout { send_user "TIMEOUT\n" ; exit 2 } + -re "word: " { send "$PASSWORD\n" } abort + } + } + timeout { send_user "TIMEOUT\n" ; exit 2 } + -re "service not known" { send_user "FAILED: Invalid Host\n" ; exit 1 } + -re "Permission denied" { send_user "FAILED: Invalid Password\n" ; exit 1 } + -re "word: " { send "$PASSWORD\n" } abort + -re $GOOD_RESPONSE { send_user " " ; exit 0 } + -re $BAD_RESPONSE { send_user "FAILED\n" ; exit 1 } + -re "parser error" { send_user "FAILED: System Calpont.xml parse error\n" ; exit 1 } +} +expect { + timeout { send_user "FAILED-TIMEOUT\n" ; exit 1 } + -re $GOOD_RESPONSE { send_user " " ; exit 0 } + -re $BAD_RESPONSE { send_user "FAILED\n" ; exit 1 } + -re "No such file" { send_user "FAILED\n" ; exit 1 } + -re "parser error" { send_user "FAILED: System Calpont.xml parse error\n" ; exit 1 } +} + +exit 1 + diff --git a/export/bin/remote_scp_get.sh b/export/bin/remote_scp_get.sh new file mode 100755 index 000000000..d361a951f --- /dev/null +++ b/export/bin/remote_scp_get.sh @@ -0,0 +1,53 @@ +#!/usr/bin/expect +# +# $Id: remote_commend.sh 421 2007-04-05 15:46:55Z dhill $ +# +# Remote command execution script to another server +# Argument 1 - Remote Server Host Name or IP address +# Argument 2 - Remote Server root password +# Argument 3 - Command +set timeout 30 +set USERNAME $env(USER)"@" +set SERVER [lindex $argv 0] +set PASSWORD [lindex $argv 1] +set FILE [lindex $argv 2] +set DEBUG [lindex $argv 3] +log_user $DEBUG +spawn -noecho /bin/bash + +if { $PASSWORD == "ssh" } { + set PASSWORD "" +} + +# +# send command +# +expect -re {[$#] } +send "scp $USERNAME$SERVER:$FILE .\n" +expect { + "authenticity" { send "yes\n" + expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + } + } + "service not known" { send_user "FAILED: Invalid Host\n" ; exit 1 } + "Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 } + "Connection timed out" { send_user "FAILED: Connection timed out\n" ; exit 1 } + "lost connection" { send_user "FAILED: Connection refused\n" ; exit 1 } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } +} +expect { + "100%" { send_user "DONE\n" } + "scp:" { send_user "FAILED\n" ; exit 1 } + "Permission denied" { send_user "FAILED: Invalid password\n" ; exit 1 } + "No such file or directory" { send_user "FAILED: No such file or directory\n" ; exit 1 } + "Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } +} +#sleep to make sure it's finished +sleep 5 +exit 0 + diff --git a/export/bin/remote_scp_put.sh b/export/bin/remote_scp_put.sh new file mode 100755 index 000000000..31b3aa552 --- /dev/null +++ b/export/bin/remote_scp_put.sh @@ -0,0 +1,54 @@ +#!/usr/bin/expect +# +# $Id: remote_commend.sh 421 2007-04-05 15:46:55Z dhill $ +# +# Remote command execution script to another server +# Argument 1 - Remote Server Host Name or IP address +# Argument 2 - Remote Server root password +# Argument 3 - Command +set timeout 30 +set USERNAME $env(USER)"@" +set SERVER [lindex $argv 0] +set PASSWORD [lindex $argv 1] +set FILE [lindex $argv 2] +set DEBUG [lindex $argv 3] +log_user $DEBUG +spawn -noecho /bin/bash + +if { $PASSWORD == "ssh" } { + set PASSWORD "" +} + +# +# send command +# +expect -re "# " +send "scp $FILE $USERNAME$SERVER:$FILE\n" +expect { + -re "authenticity" { send "yes\n" + expect { + -re "word: " { send "$PASSWORD\n" } + -re "passphrase" { send "$PASSWORD\n" } + } + } + -re "service not known" { send_user "FAILED: Invalid Host\n" ; exit 1 } + -re "Connection refused" { send_user "FAILED: Connection refused\n" ; exit 1 } + -re "Connection timed out" { send_user "FAILED: Connection timed out\n" ; exit 1 } + -re "lost connection" { send_user "FAILED: Connection refused\n" ; exit 1 } + -re "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + -re "word: " { send "$PASSWORD\n" } + -re "passphrase" { send "$PASSWORD\n" } + -re "WARNING:" { send "rm -f /root/.ssh/known_hosts" ; exit 1 } +} +expect { + -re "100%" { send_user "DONE\n" } + -re "scp:" { send_user "FAILED\n" ; exit 1 } + -re "Permission denied" { send_user "FAILED: Invalid password\n" ; exit 1 } + -re "No such file or directory" { send_user "FAILED: Invalid file\n" ; exit 1 } + -re "Connection refused" { send_user "FAILED: Connection refused\n" ; exit 1 } + -re "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } +} +#sleep to make sure it's finished +sleep 5 +exit 0 + diff --git a/export/bin/remotessh.exp b/export/bin/remotessh.exp new file mode 100755 index 000000000..050339323 --- /dev/null +++ b/export/bin/remotessh.exp @@ -0,0 +1,89 @@ +set PROMPT "(\\$|#) " + +proc auto_ssh_command { username password server commandstr } { + global PROMPT + + # + # send command + # + send "ssh -t $username@$server $commandstr\n" + expect { + -re "Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit 1} + -re "service not known" { send_user " FAILED: Invalid Host\n" ; exit 1} + -re "ssh: connect to host" { send_user " FAILED: Invalid Host\n" ; exit 1 } + -re "Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 } + -re "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + -re "authenticity" { send "yes\n" + expect { + -re "word: " { send "$password\n" } abort + -re "passphrase" { send "$password\n" } abort + } + } + -re "word: " { send "$password\n" } abort + -re "passphrase" { send "$password\n" } abort + } + + set needsudopwd 0 + expect { + -re $PROMPT { exit 0 } + -re "Permission denied, please try again" { send_user " FAILED: Invalid password\n" ; exit 1 } + -re ": Permission denied" { send_user " FAILED: Privilege error\n" ; exit 1 } + -re "(y or n)" { send "y\n" + expect -re $PROMPT { exit 0 } + } + -re "sudo\\] password for $username: " { + send "$password\n"; + set needsudopwd 1 + } abort + } + + if {$needsudopwd} { + expect { + -re $PROMPT { exit 0 } + -re "try again" { send_user " FAILED: Invalid sudo password\n" ; exit 1 } + } + } +} + +proc auto_scp_command { username password server srcpath destpath } { + global PROMPT + send "scp $srcpath $username@$server:$destpath\n" + expect { + -re "Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit 1} + -re "service not known" { send_user " FAILED: Invalid Host\n" ; exit 1} + -re "ssh: connect to host" { send_user " FAILED: Invalid Host\n" ; exit 1 } + -re "Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 } + -re "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + -re "authenticity" { send "yes\n" + expect { + -re "word: " { send "$password\n" } abort + -re "passphrase" { send "$password\n" } abort + } + } + -re "word: " { send "$password\n" } abort + -re "passphrase" { send "$password\n" } abort + } + + expect { + -re $PROMPT { exit 0 } + -re "Permission denied, please try again" { send_user " FAILED: Invalid password\n" ; exit 1 } + -re ": Permission denied" { send_user " FAILED: Privilege error\n" ; exit 1 } + -re "(y or n)" { send "y\n" + expect -re $PROMPT { exit 0 } + } + } + + set timeout 30 + expect { + -re "100%" { send_user "DONE" } abort + -re "directory" { send_user "ERROR\n" ; + send_user "\n*** Installation ERROR\n" ; + exit 1 } + -re "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 } + -re "No such file or directory" { send_user "ERROR: Invalid package\n" ; exit 1 } + } + + send_user "\n" + # sleep to make sure it's finished + sleep 5 +} diff --git a/export/bin/rsync.sh b/export/bin/rsync.sh new file mode 100755 index 000000000..2fa53ee6b --- /dev/null +++ b/export/bin/rsync.sh @@ -0,0 +1,54 @@ +#!/usr/bin/expect +# +# $Id: rsync.sh 2915 2012-05-23 16:01:34Z dhill $ +# +# Remote Install RPM and custom OS files from postConfigure script +# Argument 1 - Remote Server Host Name or IP address +# Argument 2 - Root Password of remote server +# Argument 3 - Debug flag 1 for on, 0 for off +set USERNAME "root@" +set SERVER [lindex $argv 0] +set PASSWORD [lindex $argv 1] +set INSTALLDIR [lindex $argv 2] +set DEBUG 0 +set DEBUG [lindex $argv 3] +log_user $DEBUG +spawn -noecho /bin/bash + + +if { $PASSWORD == "ssh" } { + set USERNAME "" + 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/" + +# +# run command +# +set timeout 60 +send "$COMMAND\n" +expect { + -re "Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit -1} + -re "service not known" { send_user " FAILED: Invalid Host\n" ; exit -1} + -re "ssh: connect to host" { send_user " FAILED: Invalid Host\n" ; exit -1 } + -re "authenticity" { send "yes\n" + expect { + -re "word: " { send "$PASSWORD\n" } + -re "passphrase" { send "$PASSWORD\n" } + } + } + -re "word: " { send "$PASSWORD\n" } + -re "passphrase" { send "$PASSWORD\n" } + -re "failed" { send_user " FAILED: Failure, check tmp log\n" ; exit 1 } + -re "Permission denied" { send_user " FAILED: Invalid password\n" ; exit 1 } + -re "total size" { exit 0 } +} +expect { + -re "failed" { send_user " FAILED: Failure, check tmp log\n" ; exit 1 } + -re "Permission denied" { send_user " FAILED: Invalid password\n" ; exit 1 } + -re "total size" { exit 0 } + } +} + +exit 0 diff --git a/export/bin/run.sh b/export/bin/run.sh new file mode 100755 index 000000000..bcd5dd39e --- /dev/null +++ b/export/bin/run.sh @@ -0,0 +1,67 @@ +#!/bin/bash +# +# $Id$ +# + +usage="usage: run.sh [-vh] [-s sleep] [-t tries] executable" + +vflg=0 +sopt="5" +topt="0" + +while getopts "vs:t:h" flag; do + case $flag in + v) vflg=1 + ;; + s) sopt=$OPTARG + ;; + t) topt=$OPTARG + ;; + h) echo $usage + exit 0 + ;; + \? | *) echo $usage 1>&2 + exit 1 + ;; + esac +done + +shift $((OPTIND - 1)) + +exename="$1" + +if [ -z "$exename" ]; then + echo $usage 1>&2 + exit 1 +fi + +shift +args="$@" + +retries=1 +keep_going=1 + +if [ $vflg -gt 0 ]; then + echo "starting $exename $args with sleep=$sopt and tries=$topt" +fi + +while [ $keep_going -ne 0 ]; do + $exename $args + if [ -e /tmp/StopCalpont ]; then + exit 0 + fi + if [ $topt -gt 0 -a $retries -ge $topt ]; then + keep_going=0 + fi + ((retries++)) + if [ $keep_going -ne 0 -a $sopt -gt 0 ]; then + sleep $sopt + fi +done + +if [ $vflg -gt 0 ]; then + echo "$exename exceeded its try count, quiting!" 1>&2 +fi + +exit 1 + diff --git a/export/bin/slave-rep-columnstore.sh b/export/bin/slave-rep-columnstore.sh new file mode 100755 index 000000000..3b3e1bd3c --- /dev/null +++ b/export/bin/slave-rep-columnstore.sh @@ -0,0 +1,119 @@ +#!/bin/bash +# +# $Id$ +# +# generic InfiniDB Slave Replication script. +# +# Notes: This script gets run by ProcMon during installs and upgrades: + +# check log for error +checkForError() { + grep ERROR /tmp/slave-rep-status.log > /tmp/error.check + if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then + echo "ERROR: check log file: /tmp/slave-rep-status.log" + rm -f /tmp/error.check + exit 1 + fi + rm -f /tmp/error.check +} + +prefix=/usr/local +installdir=$prefix/MariaDB/Columnstore +pwprompt= +for arg in "$@"; do + if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then + prefix="`echo $arg | awk -F= '{print $2}'`" + installdir=$prefix/MariaDB/Columnstore + elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then + password="`echo $arg | awk -F= '{print $2}'`" + pwprompt="--password=$password" + elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then + installdir="`echo $arg | awk -F= '{print $2}'`" + prefix=`dirname $installdir` + elif [ `expr -- "$arg" : '--masteripaddr='` -eq 15 ]; then + masteripaddr="`echo $arg | awk -F= '{print $2}'`" + elif [ `expr -- "$arg" : '--masterlogfile='` -eq 16 ]; then + masterlogfile="`echo $arg | awk -F= '{print $2}'`" + elif [ `expr -- "$arg" : '--masterlogpos='` -eq 15 ]; then + masterlogpos="`echo $arg | awk -F= '{print $2}'`" + elif [ `expr -- "$arg" : '--port='` -eq 7 ]; then + port="`echo $arg | awk -F= '{print $2}'`" + fi +done + +test -f $installdir/post/functions && . $installdir/post/functions + +repUser="idbrep" +password="Calpont1" + +>/tmp/slave-rep-status.log + +# +# Run stop slave command +# +echo "Run stop slave command" >>/tmp/slave-rep-status.log +cat >/tmp/idb_slave-rep.sql <>/tmp/slave-rep-status.log +$installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/slave-rep-status.log + +# +# Run Change Master Command +# +echo "Run Change Master Command" >>/tmp/slave-rep-status.log +cat >/tmp/idb_slave-rep.sql <>/tmp/slave-rep-status.log +$installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/slave-rep-status.log + +# +# Run start slave command +# +echo "Run start slave command" >>/tmp/slave-rep-status.log +cat >/tmp/idb_slave-rep.sql <>/tmp/slave-rep-status.log +$installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/slave-rep-status.log + +# +# Run SHOW SLAVE STATUS +# +echo "Run SHOW SLAVE STATUS to node log" >>/tmp/slave-rep-status.log +cat >/tmp/idb_slave-rep.sql <>/tmp/slave-rep-status.log +$installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/slave-rep-status.log + +checkForError + +#alls good, 'OK' for success +echo "OK" +exit 0 diff --git a/export/bin/slave-rep-infinidb.sh b/export/bin/slave-rep-infinidb.sh new file mode 100755 index 000000000..3b3e1bd3c --- /dev/null +++ b/export/bin/slave-rep-infinidb.sh @@ -0,0 +1,119 @@ +#!/bin/bash +# +# $Id$ +# +# generic InfiniDB Slave Replication script. +# +# Notes: This script gets run by ProcMon during installs and upgrades: + +# check log for error +checkForError() { + grep ERROR /tmp/slave-rep-status.log > /tmp/error.check + if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then + echo "ERROR: check log file: /tmp/slave-rep-status.log" + rm -f /tmp/error.check + exit 1 + fi + rm -f /tmp/error.check +} + +prefix=/usr/local +installdir=$prefix/MariaDB/Columnstore +pwprompt= +for arg in "$@"; do + if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then + prefix="`echo $arg | awk -F= '{print $2}'`" + installdir=$prefix/MariaDB/Columnstore + elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then + password="`echo $arg | awk -F= '{print $2}'`" + pwprompt="--password=$password" + elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then + installdir="`echo $arg | awk -F= '{print $2}'`" + prefix=`dirname $installdir` + elif [ `expr -- "$arg" : '--masteripaddr='` -eq 15 ]; then + masteripaddr="`echo $arg | awk -F= '{print $2}'`" + elif [ `expr -- "$arg" : '--masterlogfile='` -eq 16 ]; then + masterlogfile="`echo $arg | awk -F= '{print $2}'`" + elif [ `expr -- "$arg" : '--masterlogpos='` -eq 15 ]; then + masterlogpos="`echo $arg | awk -F= '{print $2}'`" + elif [ `expr -- "$arg" : '--port='` -eq 7 ]; then + port="`echo $arg | awk -F= '{print $2}'`" + fi +done + +test -f $installdir/post/functions && . $installdir/post/functions + +repUser="idbrep" +password="Calpont1" + +>/tmp/slave-rep-status.log + +# +# Run stop slave command +# +echo "Run stop slave command" >>/tmp/slave-rep-status.log +cat >/tmp/idb_slave-rep.sql <>/tmp/slave-rep-status.log +$installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/slave-rep-status.log + +# +# Run Change Master Command +# +echo "Run Change Master Command" >>/tmp/slave-rep-status.log +cat >/tmp/idb_slave-rep.sql <>/tmp/slave-rep-status.log +$installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/slave-rep-status.log + +# +# Run start slave command +# +echo "Run start slave command" >>/tmp/slave-rep-status.log +cat >/tmp/idb_slave-rep.sql <>/tmp/slave-rep-status.log +$installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/slave-rep-status.log + +# +# Run SHOW SLAVE STATUS +# +echo "Run SHOW SLAVE STATUS to node log" >>/tmp/slave-rep-status.log +cat >/tmp/idb_slave-rep.sql <>/tmp/slave-rep-status.log +$installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/slave-rep-status.log + +checkForError + +#alls good, 'OK' for success +echo "OK" +exit 0 diff --git a/export/bin/startupTests.sh b/export/bin/startupTests.sh new file mode 100755 index 000000000..5836af965 --- /dev/null +++ b/export/bin/startupTests.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# +# $Id: startupTests.sh 2937 2012-05-30 18:17:09Z rdempsey $ +# +# startupTests - perform sanity testing on system DB at system startup time +# called by Process-Monitor + +if [ -z "$INFINIDB_INSTALL_DIR" ]; then + test -f /etc/default/infinidb && . /etc/default/infinidb +fi + +if [ -z "$INFINIDB_INSTALL_DIR" ]; then + INFINIDB_INSTALL_DIR=/usr/local/MariaDB/Columnstore +fi + +export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR + +test -f $INFINIDB_INSTALL_DIR/post/functions && . $INFINIDB_INSTALL_DIR/post/functions + +for testScript in $INFINIDB_INSTALL_DIR/post/*.sh; do + if [ -x $testScript ]; then + eval $testScript + rc=$? + if [ $rc -ne 0 ]; then + cplogger -c 51 $testScript + echo "FAILED, check Critical log for additional info" + exit $rc + fi + fi +done +echo "OK" + +cplogger -i 54 + +exit 0 + diff --git a/export/bin/syslogSetup.sh b/export/bin/syslogSetup.sh new file mode 100755 index 000000000..549ba01d6 --- /dev/null +++ b/export/bin/syslogSetup.sh @@ -0,0 +1,262 @@ +#!/bin/bash +# +# $Id: syslogSetup.sh 421 2007-04-05 15:46:55Z dhill $ +# +# syslogSetup.sh - install / uninstall Calpont InfiniDB system logging configuration + +# no point in going any further if not root... (only works in bash) +test $EUID -eq 0 || exit 0 + +prefix=/usr/local +installdir=$prefix/MariaDB/Columnstore +syslog_conf=nofile +rsyslog7=0 + +for arg in "$@"; do + if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then + prefix="`echo $arg | awk -F= '{print $2}'`" + installdir=$prefix/MariaDB/Columnstore + elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then + installdir="`echo $arg | awk -F= '{print $2}'`" + prefix=`dirname $installdir` + elif [ `expr -- "$arg" : '--..*'` -ge 3 ]; then + echo "ignoring unknown argument: $arg" 1>&2 + elif [ `expr -- "$arg" : '--'` -eq 2 ]; then + shift + break + else + break + fi + shift +done + +if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then + export INFINIDB_INSTALL_DIR=$installdir + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFINIDB_INSTALL_DIR/lib +fi + +columnstoreSyslogFile=$installdir/bin/columnstoreSyslog +columnstoreSyslogFile7=$installdir/bin/columnstoreSyslog7 + +checkSyslog() { +#check which syslog daemon is being used +#first check which is running +daemon="nodaemon" +cnt=`ps -ef | grep -v grep | grep syslog-ng | wc -l` +if [ $cnt -gt 0 ]; then + daemon="syslog-ng" +else cnt=`ps -ef | grep -v grep | grep rsyslog | wc -l` + if [ $cnt -ge 1 ]; then + daemon="rsyslog" + else cnt=`ps -ef | grep -v grep | grep syslogd | wc -l` + if [ $cnt -ge 1 ]; then + if [ "$daemon" != "rsyslog" ]; then + daemon=syslog + fi + fi + fi +fi + +#if none running, check installed +if [ "$daemon" = "nodaemon" ]; then + if [ -f /etc/init.d/syslog ]; then + daemon="syslog" + /etc/init.d/syslog start > /dev/null 2>&1 + elif [ -f /etc/init.d/rsyslog ]; then + daemon="rsyslog" + /etc/init.d/rsyslog start > /dev/null 2>&1 + elif [ -f /etc/init.d/syslog-ng ]; then + daemon="syslog-ng" + /etc/init.d/syslog-ng start > /dev/null 2>&1 + fi +fi + +#if none running or installed, exit +if [ "$daemon" = "nodaemon" ]; then + echo "" + echo "*** No System Logging Application found (syslog, rsyslog, or syslog-ng)" + echo "*** For InfiniDB System Logging functionality, install a System Logging package and reinstall InfiniDB" + echo "" + exit 1 +fi + +#check which syslog config file is installed +if [ "$daemon" = "syslog-ng" ]; then + if [ -f /etc/syslog-ng/syslog-ng.conf ]; then + syslog_conf=/etc/syslog-ng/syslog-ng.conf + columnstoreSyslogFile=$installdir/bin/columnstoreSyslog-ng + echo "" + echo "System logging being used: syslog-ng" + echo "" + fi +elif [ "$daemon" = "rsyslog" ]; then + #check if rsyslog version 7 or greater + rsyslogd -v > /tmp/rsyslog.ver + cnt=`grep "rsyslogd 7" /tmp/rsyslog.ver | wc -l` + if [ $cnt -gt 0 ]; then + rsyslog7=1 + fi + cnt=`grep "rsyslogd 8" /tmp/rsyslog.ver | wc -l` + if [ $cnt -gt 0 ]; then + rsyslog7=1 + fi + cnt=`grep "rsyslogd 9" /tmp/rsyslog.ver | wc -l` + if [ $cnt -gt 0 ]; then + rsyslog7=1 + fi + + if [ -f /etc/rsyslog.conf ]; then + cnt=`grep "/etc/rsyslog.d/" /etc/rsyslog.conf | wc -l` + if [ $cnt -gt 0 ]; then + if [ $rsyslog7 == 1 ]; then + syslog_conf=/etc/rsyslog.d/49-calpont.conf + else + syslog_conf=/etc/rsyslog.d/calpont.conf + fi + else + syslog_conf=/etc/rsyslog.conf + fi + echo "" + echo "System logging being used: rsyslog" + echo "" + fi +elif [ "$daemon" = "syslog" ]; then + if [ -f /etc/syslog.conf ]; then + syslog_conf=/etc/syslog.conf + echo "" + echo "System logging being used: syslog" + echo "" + elif [ -d /etc/syslog-ng/syslog-ng.conf ]; then + syslog_conf=/etc/syslog-ng/syslog-ng.conf + columnstoreSyslogFile=$installdir/bin/columnstoreSyslog-ng + echo "" + echo "System logging being used: syslog-ng" + echo "" + fi +else + echo "" + echo "*** No System Logging Application found (syslog, rsyslog, or syslog-ng)" + echo "*** For InfiniDB System Logging functionality, install a System Logging package and reinstall InfiniDB" + echo "" + exit 1 +fi + +} + +install() { +checkSyslog +if [ ! -z "$syslog_conf" ] ; then + $installdir/bin/setConfig -d Installation SystemLogConfigFile ${syslog_conf} >/dev/null 2>&1 + if [ "$syslog_conf" != /etc/rsyslog.d/calpont.conf ]; then + rm -f ${syslog_conf}.calpontSave + cp ${syslog_conf} ${syslog_conf}.calpontSave >/dev/null 2>&1 + sed -i '/# Calpont/,$d' ${syslog_conf}.calpontSave > /dev/null 2>&1 + fi + + egrep -qs 'Calpont Database Platform Logging' ${syslog_conf} + if [ $? -ne 0 ]; then + #set the syslog for calpont logging + # remove older version incase it was installed by previous build + rm -rf /etc/rsyslog.d/calpont.conf + if [ $rsyslog7 == 1 ]; then + rm -f /etc/rsyslog.d/49-calpont.conf + cat ${columnstoreSyslogFile7} >> ${syslog_conf} + chown syslog:adm /var/log/Calpont + else + cat ${columnstoreSyslogFile} >> ${syslog_conf} + fi + fi + + pkill -hup syslogd > /dev/null 2>&1 + pkill -hup syslog-ng > /dev/null 2>&1 + pkill -hup rsyslogd > /dev/null 2>&1 + /etc/init.d/rsyslog restart > /dev/null 2>&1 + systemctl restart rsyslog.service > /dev/null 2>&1 +fi + +} + +uninstall() { +checkSyslog +if [ ! -z "$syslog_conf" ] ; then + if [ "$syslog_conf" != /etc/rsyslog.d/calpont.conf ]; then + if [ "$syslog_conf" != /etc/rsyslog.d/49-calpont.conf ]; then + egrep -qs 'Calpont Database Platform Logging' ${syslog_conf} + if [ $? -eq 0 ]; then + if [ -f ${syslog_conf}.calpontSave ] ; then + #uninstall the syslog for calpont logging + mv -f ${syslog_conf} ${syslog_conf}.calpontBackup + mv -f ${syslog_conf}.calpontSave ${syslog_conf} >/dev/null 2>&1 + if [ ! -f ${syslog_conf} ] ; then + cp ${syslog_conf}.calpontBackup ${syslog_conf} + fi + fi + fi + sed -i '/# Calpont/,$d' ${syslog_conf} > /dev/null 2>&1 + else + rm -f "$syslog_conf" + fi + else + rm -f "$syslog_conf" + fi + + pkill -hup syslogd > /dev/null 2>&1 + pkill -hup syslog-ng > /dev/null 2>&1 + /etc/init.d/rsyslog restart > /dev/null 2>&1 + systemctl restart rsyslog.service > /dev/null 2>&1 + + $installdir/bin/setConfig -d Installation SystemLogConfigFile "unassigned" + +fi + +} + +status() { +checkSyslog +if [ ! -z "$syslog_conf" ] ; then + egrep -qs 'Calpont Database Platform Logging' ${syslog_conf} + if [ $? -eq 0 ]; then + echo $syslog_conf + else + echo "No System Log Config File configured for InfiniDB System Logging" + fi +fi +} + +check() { +test -f $installdir/post/functions && . $installdir/post/functions +number=$RANDOM +cplogger -i 100 "InfiniDB Log Test: $number" +sleep 3 +egrep -qs "InfiniDB Log Test: $number" /var/log/Calpont/info.log +if [ $? -eq 0 ]; then + echo "InfiniDB System Logging working" + exit 0 +else + echo "InfiniDB System Logging not working" + exit 1 +fi +} + + +case "$1" in + install) + install + ;; + uninstall) + uninstall + ;; + status) + status + ;; + check) + check + ;; + *) + echo $"Usage: $0 {install|uninstall|status|check)" + exit 1 +esac + + +exit 0 +/ diff --git a/export/bin/system_installer.sh b/export/bin/system_installer.sh new file mode 100755 index 000000000..aa21998ca --- /dev/null +++ b/export/bin/system_installer.sh @@ -0,0 +1,161 @@ +#!/usr/bin/expect +# +# $Id: system_installer.sh 2804 2012-03-22 12:57:42Z pleblanc $ +# +# Install RPM and custom OS files on system +# Argument 1 - Remote Module Name +# Argument 2 - Remote Server Host Name or IP address +# Argument 3 - Root Password of remote server +# Argument 4 - Package name being installed +# Argument 5 - Install Type, "initial" or "upgrade" +# Argument 6 - Debug flag 1 for on, 0 for off +set timeout 30 +set USERNAME root +set MODULE [lindex $argv 0] +set SERVER [lindex $argv 1] +set PASSWORD [lindex $argv 2] +set RPMPACKAGE1 [lindex $argv 3] +set RPMPACKAGE2 [lindex $argv 4] +set RPMPACKAGE3 [lindex $argv 5] +set INSTALLTYPE [lindex $argv 6] +set DEBUG [lindex $argv 7] +log_user $DEBUG +spawn -noecho /bin/bash +# +if { $INSTALLTYPE == "initial" || $INSTALLTYPE == "uninstall" } { + # + # erase package + # + send_user "Erase InfiniDB Packages on Module " + expect -re {[$#] } + send "ssh $USERNAME@$SERVER 'rpm -e --nodeps --allmatches calpont >/dev/null 2>&1; rpm -e --nodeps --allmatches infinidb-enterprise >/dev/null 2>&1; rpm -e --nodeps --allmatches infinidb-libs infinidb-platform'\n" + expect { + "Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit } + "service not known" { send_user "FAILED: Invalid Host\n" ; exit } + "authenticity" { send "yes\n" + expect { + "word: " { send "$PASSWORD\n" } + } + } + "word: " { send "$PASSWORD\n" } + } + # password for ssh + send "$PASSWORD\n" + expect { + -re {[$#] } { send_user "DONE" } + "uninstall completed" { send_user "DONE" } + "ERROR dependencies" { send_user "ERROR: ERROR dependencies\n" ; exit -1 } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 } + "error: package" { send_user "INFO: Package not installed" } + "not installed" { send_user "INFO: Package not installed" } + } + send_user "\n" +} +if { $INSTALLTYPE == "uninstall" } { exit 0 } + +# +# send the package +# +expect -re {[$#] } +send_user "Copy New InfiniDB Packages to Module " +send "ssh $USERNAME@$SERVER 'rm -f /root/infinidb-*.rpm'\n" +expect "word: " +# password for ssh +send "$PASSWORD\n" +# check return +expect { + -re {[$#] } { } +} +send "scp $RPMPACKAGE1 $RPMPACKAGE2 $RPMPACKAGE3 $USERNAME@$SERVER:.\n" +expect "word: " +# send the password +send "$PASSWORD\n" +# check return +expect { + "100%" { send_user "DONE" } + "scp" { send_user "ERROR\n" ; + send_user "\n*** Installation ERROR\n" ; + exit -1 } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 } + "No such file or directory" { send_user "ERROR: Invalid package\n" ; exit -1 } +} +send_user "\n" +# +set timeout 60 +if { $INSTALLTYPE == "initial"} { + # + # install package + # + send_user "Install InfiniDB Packages on Module " + send "ssh $USERNAME@$SERVER 'rpm -ivh $RPMPACKAGE1 $RPMPACKAGE2 $RPMPACKAGE3'\n" + expect "word: " + # password for ssh + send "$PASSWORD\n" + # check return + expect { + -re {[$#] } { send_user "DONE" } + "completed" { send_user "DONE" } + "ERROR dependencies" { send_user "ERROR: ERROR dependencies\n" ; + send_user "\n*** Installation ERROR\n" ; + exit -1 } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 } + } +} else { + # + # upgrade package + # + send_user "Upgrade InfiniDB Packages on Module " + send "ssh $USERNAME@$SERVER 'rpm -Uvh --noscripts $RPMPACKAGE1 $RPMPACKAGE2 $RPMPACKAGE3'\n" + expect "word: " + # password for ssh + send "$PASSWORD\n" + # check return + expect { + -re {[$#] } { send_user "DONE" } + "completed" { send_user "DONE" } + "already installed" { send_user "INFO: Already Installed\n" ; exit -1 } + "ERROR dependencies" { send_user "ERROR: ERROR dependencies\n" ; + send_user "\n*** Installation ERROR\n" ; + exit -1 } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 } + } +} +expect -re {[$#] } +send_user "\n" +set timeout 30 +# +if { $INSTALLTYPE == "initial"} { + # + # copy over InfiniDB OS files + # + send_user "Copy InfiniDB OS files to Module " + send "scp /usr/local/MariaDB/Columnstore/local/etc/$MODULE/* $USERNAME@$SERVER:/usr/local/MariaDB/Columnstore/local/.\n" + expect "word: " + # send the password + send "$PASSWORD\n" + expect { + -re {[$#] } { send_user "DONE" } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 } + } + # + send_user "\n" + set timeout 120 + # + # Start module installer to setup Customer OS files + # + send_user "Run Module Installer " + send "ssh $USERNAME@$SERVER '/usr/local/MariaDB/Columnstore/bin/module_installer.sh'\n" + expect "word: " + # send the password + send "$PASSWORD\n" + expect { + "!!!Module" { send_user "DONE" } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 } + "FAILED" { send_user "ERROR: missing OS file\n" ; exit -1 } + } + send_user "\n" +} +# +send_user "\nInstallation Successfully Completed on '$MODULE'\n" +exit 0 + diff --git a/export/bin/transactionLog b/export/bin/transactionLog new file mode 100755 index 000000000..3763b5cd2 --- /dev/null +++ b/export/bin/transactionLog @@ -0,0 +1,12 @@ +# +# Calpont version with Daily running at midnight +# + +SHELL=/bin/bash +PATH=/sbin:/bin:/usr/sbin:/usr/bin +MAILTO=root +HOME=/ + +# Translation Log Archiver, default to every 10 minutes +*/10 * * * * root /usr/local/Calpont/bin/transactionLogArchiver.sh + diff --git a/export/bin/transactionLogArchiver.sh b/export/bin/transactionLogArchiver.sh new file mode 100755 index 000000000..7e5a47f39 --- /dev/null +++ b/export/bin/transactionLogArchiver.sh @@ -0,0 +1,48 @@ +#!/bin/bash +# +# $Id: transactionLogArchiver.sh 1375 2009-04-30 13:53:06Z rdempsey $ + +DATE=`date +'%s'` +CDATA=/var/log/Calpont/data + +if [ ! -d $CDATA/archive ]; then + echo "Installation error: $CDATA/archive is not a directory." 1>&2 + exit 1 +fi + +if [ -f $CDATA/data_mods.log ]; then + # Don't bother rotating an empty log + if [ ! -s $CDATA/data_mods.log ]; then + exit 0 + fi + cp $CDATA/data_mods.log $CDATA/archive >/dev/null 2>&1 + if [ $? -ne 0 ]; then + echo "Could not copy $CDATA/data_mods.log to $CDATA/archive" 1>&2 + exit 1 + fi +else + # Is this a reportable/fatal error? + echo "No such file: $CDATA/data_mods.log" 1>&2 +fi + +rm -f $CDATA/data_mods.log >/dev/null 2>&1 +touch $CDATA/data_mods.log >/dev/null 2>&1 +if [ $? -ne 0 ]; then + echo "Could not create $CDATA/data_mods.log" 1>&2 + exit 1 +fi + +chmod 666 $CDATA/data_mods.log >/dev/null 2>&1 +if [ $? -ne 0 ]; then + echo "Could not set the perms on $CDATA/data_mods.log" 1>&2 + exit 1 +fi + +pkill -HUP syslog >/dev/null 2>&1 + +mv $CDATA/archive/data_mods.log $CDATA/archive/data_mods.log.$DATE >/dev/null 2>&1 +if [ $? -ne 0 ]; then + echo "Could not move $CDATA/archive/data_mods.log to $CDATA/archive/data_mods.log.$DATE" 1>&2 + exit 1 +fi + diff --git a/export/bin/upgrade-columnstore.sh b/export/bin/upgrade-columnstore.sh new file mode 100755 index 000000000..f56539873 --- /dev/null +++ b/export/bin/upgrade-columnstore.sh @@ -0,0 +1,444 @@ +#!/bin/bash +# +# $Id$ +# +# generic InfiniDB upgrade script. +# +# Notes: This script gets run every time InfiniDB starts up so it needs to be: +# 1) able to only do stuff once if needed and nothing if not needed +# 2) reasonably fast when there's nothing to do + +# check log for error +checkForError() { + grep ERROR /tmp/upgrade-status.log.$$ > /tmp/error.check + if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then + echo "ERROR: check log file: /tmp/upgrade-status.log.$$" + rm -f /tmp/error.check + exit 1; + fi + rm -f /tmp/error.check +} + +if [ "x$1" != xdoupgrade ]; then + echo "Don't run this script by hand! You probably want to use install-infinidb.sh." 1>&2 + exit 1 +fi + +prefix=/usr/local +installdir=$prefix/MariaDB/Columnstore +pwprompt= +for arg in "$@"; do + if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then + prefix="`echo $arg | awk -F= '{print $2}'`" + installdir=$prefix/MariaDB/Columnstore + elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then + password="`echo $arg | awk -F= '{print $2}'`" + pwprompt="--password=$password" + elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then + installdir="`echo $arg | awk -F= '{print $2}'`" + prefix=`dirname $installdir` + fi +done + +test -f $installdir/post/functions && . $installdir/post/functions + +mt=`module_type` +mid=`module_id` + +# for CE version +if [ -z "$mt" ]; then + mt=pm +fi +if [ -z "$mid" ]; then + mid=1 +fi + +has_um=`$installdir/bin/getConfig SystemModuleConfig ModuleCount2` +if [ -z "$has_um" ]; then + has_um=0 +fi + +>/tmp/upgrade-status.log.$$ +echo "mt = $mt" >>/tmp/upgrade-status.log.$$ +echo "mid = $mid" >>/tmp/upgrade-status.log.$$ +echo "has_um = $has_um" >>/tmp/upgrade-status.log.$$ + +#This upgrade only for UM or PM with no UM +if [ $has_um -eq 0 -o "x$mt" = xum ]; then + #--------------------------------------------------------------------------- + # See if compressiontype column is in SYSCOLUMN + #--------------------------------------------------------------------------- + echo "checking calpontsys for compressiontype..." >>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe syscolumn;' \ + calpontsys | grep compressiontype >>/tmp/upgrade-status.log.$$ 2>&1 + + # + # Add compressiontype column to SYSCOLUMN if applicable + # + if [ $? -ne 0 ]; then + echo "calpontsys needs upgrade for compressiontype" >>/tmp/upgrade-status.log.$$ + echo "added compressiontype column" >>/tmp/upgrade-status.log.$$ + cat >/tmp/idb_upgrade.sql <>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/upgrade-status.log.$$ 2>&1 + + checkForError + + if [ $mid -eq 1 ]; then + echo "update compressiontype to backend" >>/tmp/upgrade-status.log.$$ + cat >/tmp/idb_upgrade.sql <>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/upgrade-status.log.$$ 2>&1 + + checkForError + fi + + # + # Verify that compressiontype was successfully added to SYSCOLUMN + # + rm -f /tmp/idb_upgrade.sql + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe syscolumn;' \ + calpontsys | grep compressiontype >/tmp/upgrade-status-1.log 2>&1 + rc=$? + cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$ + if [ $rc -ne 0 ]; then + echo "FAILED adding compressiontype to SYSCOLUMN!" + exit 1 + fi + cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'` + rm -f /tmp/upgrade-status-1.log + if [ -z "$cnt" ]; then + cnt=0 + fi + if [ $cnt -ne 1 ]; then + echo "FAILED adding compressiontype to SYSCOLUMN!" + exit 1 + fi + + # + # Verify that compressiontype (OID 1041) was successfully added to BRM + # + if [ $has_um -eq 0 ]; then + $installdir/bin/editem -o1041 1>/tmp/upgrade-status-1.log 2>/dev/null + rc=$? + cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$ + if [ $rc -ne 0 ]; then + echo "FAILED adding compressiontype to BRM!" + exit 1 + fi + cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'` + rm -f /tmp/upgrade-status-1.log + if [ -z "$cnt" ]; then + cnt=0 + fi + if [ $cnt -lt 2 ]; then + echo "FAILED adding compressiontype to BRM!" + exit 1 + fi + fi + fi + + #--------------------------------------------------------------------------- + # See if autoincrement column is in SYSTABLE + #--------------------------------------------------------------------------- + echo "checking calpontsys for autoincrement..." >>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe systable;' \ + calpontsys | grep autoincrement >>/tmp/upgrade-status.log.$$ 2>&1 + + # + # Add autoincrement column to SYSTABLE if applicable + # + if [ $? -ne 0 ]; then + echo "calpontsys needs upgrade for autoincrement" >>/tmp/upgrade-status.log.$$ + echo "add autoincrement columns" >>/tmp/upgrade-status.log.$$ + cat >/tmp/idb_upgrade.sql <>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/upgrade-status.log.$$ 2>&1 + + checkForError + + if [ $mid -eq 1 ]; then + echo "update autoincrement to backend" >>/tmp/upgrade-status.log.$$ + cat >/tmp/idb_upgrade.sql <>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/upgrade-status.log.$$ 2>&1 + + checkForError + fi + + # + #Verify that autoincrement was successfully added to SYSTABLE + # + rm -f /tmp/idb_upgrade.sql + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe systable;' \ + calpontsys | grep autoincrement >/tmp/upgrade-status-1.log 2>&1 + rc=$? + cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$ + if [ $rc -ne 0 ]; then + echo "FAILED adding autoincrement to SYSTABLE!" + exit 1 + fi + cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'` + rm -f /tmp/upgrade-status-1.log + if [ -z "$cnt" ]; then + cnt=0 + fi + if [ $cnt -ne 1 ]; then + echo "FAILED adding autoincrement to SYSTABLE!" + exit 1 + fi + + # + # Verify that autoincrement (OID 1011) was successfully added to BRM + # + if [ $has_um -eq 0 ]; then + $installdir/bin/editem -o1011 1>/tmp/upgrade-status-1.log 2>/dev/null + rc=$? + cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$ + if [ $rc -ne 0 ]; then + echo "FAILED adding autoincrement to BRM!" + exit 1 + fi + cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'` + rm -f /tmp/upgrade-status-1.log + if [ "x$cnt" = x ]; then + cnt=0 + fi + if [ $cnt -lt 2 ]; then + echo "FAILED adding autoincrement to BRM!" + exit 1 + fi + fi + fi + + #--------------------------------------------------------------------------- + # See if nextvalue column is in SYSCOLUMN + #--------------------------------------------------------------------------- + echo "checking calpontsys for nextvalue..." >>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe syscolumn;' \ + calpontsys | grep nextvalue >>/tmp/upgrade-status.log.$$ 2>&1 + + # + # Add nextvalue column to SYSCOLUMN if applicable. + # Also set old autoincrement column in SYSCOLUMN to 'n'. + # + if [ $? -ne 0 ]; then + echo "calpontsys needs upgrade for nextvalue" >>/tmp/upgrade-status.log.$$ + echo "add nextvalue columns" >>/tmp/upgrade-status.log.$$ + cat >/tmp/idb_upgrade.sql <>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/upgrade-status.log.$$ 2>&1 + + checkForError + + if [ $mid -eq 1 ]; then + echo "update nextvalue to backend" >>/tmp/upgrade-status.log.$$ + cat >/tmp/idb_upgrade.sql <>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/upgrade-status.log.$$ 2>&1 + + checkForError + fi + + # + # Verify that nextvalue was successfully added to SYSCOLUMN + # + rm -f /tmp/idb_upgrade.sql + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe syscolumn;' \ + calpontsys | grep nextvalue >/tmp/upgrade-status-1.log 2>&1 + rc=$? + cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$ + if [ $rc -ne 0 ]; then + echo "FAILED adding nextvalue to SYSCOLUMN!" + exit 1 + fi + cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'` + rm -f /tmp/upgrade-status-1.log + if [ -z "$cnt" ]; then + cnt=0 + fi + if [ $cnt -ne 1 ]; then + echo "FAILED adding nextvalue to SYSCOLUMN!" + exit 1 + fi + + # + # Verify that nextvalue (OID 1042) was successfully added to BRM + # + if [ $has_um -eq 0 ]; then + $installdir/bin/editem -o1042 1>/tmp/upgrade-status-1.log 2>/dev/null + rc=$? + cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$ + if [ $rc -ne 0 ]; then + echo "FAILED adding nextvalue to BRM!" + exit 1 + fi + cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'` + rm -f /tmp/upgrade-status-1.log + if [ "x$cnt" = x ]; then + cnt=0 + fi + if [ $cnt -lt 2 ]; then + echo "FAILED adding nextvalue to BRM!" + exit 1 + fi + fi + fi + + #--------------------------------------------------------------------------- + # See if systable schema and tablename columns are varchar(128). + #--------------------------------------------------------------------------- + recreate=0 + echo "checking calpontsys.systable schema and tablename for varchar(128)..." >>/tmp/upgrade-status.log.$$ + colCount=` \ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe systable;' \ + calpontsys | egrep "schema|tablename" | grep "varchar(128)" | wc -l` + if [ $colCount -ne 2 ]; then + recreate=1 + echo "calpontsys needs upgrade to expand systable schema and tablename" >>/tmp/upgrade-status.log.$$ + fi + + #--------------------------------------------------------------------------- + # See if syscolumn schema, tablename, and columname columns are varchar(128). + #--------------------------------------------------------------------------- + if [ $recreate -eq 0 ]; then + echo "checking calpontsys.syscolumn schema, tablename, columnname for varchar(128)..." >>/tmp/upgrade-status.log.$$ + colCount=` \ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe syscolumn;' \ + calpontsys | egrep "schema|tablename|columnname" | grep "varchar(128)" | wc -l` + if [ $colCount -ne 3 ]; then + recreate=1 + echo "calpontsys needs upgrade to expand syscolumn schema, tablename, and columnname" >>/tmp/upgrade-status.log.$$ + fi + fi + + #--------------------------------------------------------------------------- + # See if defaultvalue column in SYSCOLUMN is varchar(64) + #--------------------------------------------------------------------------- + if [ $recreate -eq 0 ]; then + echo "checking calpontsys for defaultvalue varchar(64)..." >>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe syscolumn;' \ + calpontsys | grep defaultvalue | grep 'varchar(64)' >>/tmp/upgrade-status.log.$$ 2>&1 + if [ $? -ne 0 ]; then + recreate=1 + echo "calpontsys needs upgrade to change defaultvalue" >>/tmp/upgrade-status.log.$$ + fi + fi + + # + # Change defaultvalue column to varchar(64) if applicable + # + if [ $recreate -ne 0 ]; then + cat >/tmp/idb_upgrade.sql <>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/upgrade-status.log.$$ 2>&1 + + checkForError + + echo "create systable and syscolumn with schema sync only" >>/tmp/upgrade-status.log.$$ + cat $installdir/mysql/syscatalog_mysql.sql >>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys <$installdir/mysql/syscatalog_mysql.sql >>/tmp/upgrade-status.log.$$ 2>&1 + + checkForError + + # + # Verify column widths: + # varchar(64) for syscolumn.defaultvalue + # varchar(128) for systable (schema, tablename) and syscolumn (schema, tablename, and columnname). + # + rm -f /tmp/idb_upgrade.sql + echo "verify column widths" >>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe syscolumn;' \ + calpontsys | grep defaultvalue | grep 'varchar(64)' >/tmp/upgrade-status-1.log 2>&1 + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe systable; describe syscolumn;' \ + calpontsys | egrep "schema|tablename|columnname" | grep 'varchar(128)' >>/tmp/upgrade-status-1.log 2>&1 + cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$ + cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'` + rm -f /tmp/upgrade-status-1.log + if [ -z "$cnt" ]; then + cnt=0 + fi + if [ $cnt -ne 6 ]; then + echo "FAILED width of schema, tablename, columnname, defaultvalue verification!" + exit 1 + fi + fi +fi + +echo "OK" diff --git a/export/bin/upgrade-infinidb.sh b/export/bin/upgrade-infinidb.sh new file mode 100755 index 000000000..f56539873 --- /dev/null +++ b/export/bin/upgrade-infinidb.sh @@ -0,0 +1,444 @@ +#!/bin/bash +# +# $Id$ +# +# generic InfiniDB upgrade script. +# +# Notes: This script gets run every time InfiniDB starts up so it needs to be: +# 1) able to only do stuff once if needed and nothing if not needed +# 2) reasonably fast when there's nothing to do + +# check log for error +checkForError() { + grep ERROR /tmp/upgrade-status.log.$$ > /tmp/error.check + if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then + echo "ERROR: check log file: /tmp/upgrade-status.log.$$" + rm -f /tmp/error.check + exit 1; + fi + rm -f /tmp/error.check +} + +if [ "x$1" != xdoupgrade ]; then + echo "Don't run this script by hand! You probably want to use install-infinidb.sh." 1>&2 + exit 1 +fi + +prefix=/usr/local +installdir=$prefix/MariaDB/Columnstore +pwprompt= +for arg in "$@"; do + if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then + prefix="`echo $arg | awk -F= '{print $2}'`" + installdir=$prefix/MariaDB/Columnstore + elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then + password="`echo $arg | awk -F= '{print $2}'`" + pwprompt="--password=$password" + elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then + installdir="`echo $arg | awk -F= '{print $2}'`" + prefix=`dirname $installdir` + fi +done + +test -f $installdir/post/functions && . $installdir/post/functions + +mt=`module_type` +mid=`module_id` + +# for CE version +if [ -z "$mt" ]; then + mt=pm +fi +if [ -z "$mid" ]; then + mid=1 +fi + +has_um=`$installdir/bin/getConfig SystemModuleConfig ModuleCount2` +if [ -z "$has_um" ]; then + has_um=0 +fi + +>/tmp/upgrade-status.log.$$ +echo "mt = $mt" >>/tmp/upgrade-status.log.$$ +echo "mid = $mid" >>/tmp/upgrade-status.log.$$ +echo "has_um = $has_um" >>/tmp/upgrade-status.log.$$ + +#This upgrade only for UM or PM with no UM +if [ $has_um -eq 0 -o "x$mt" = xum ]; then + #--------------------------------------------------------------------------- + # See if compressiontype column is in SYSCOLUMN + #--------------------------------------------------------------------------- + echo "checking calpontsys for compressiontype..." >>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe syscolumn;' \ + calpontsys | grep compressiontype >>/tmp/upgrade-status.log.$$ 2>&1 + + # + # Add compressiontype column to SYSCOLUMN if applicable + # + if [ $? -ne 0 ]; then + echo "calpontsys needs upgrade for compressiontype" >>/tmp/upgrade-status.log.$$ + echo "added compressiontype column" >>/tmp/upgrade-status.log.$$ + cat >/tmp/idb_upgrade.sql <>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/upgrade-status.log.$$ 2>&1 + + checkForError + + if [ $mid -eq 1 ]; then + echo "update compressiontype to backend" >>/tmp/upgrade-status.log.$$ + cat >/tmp/idb_upgrade.sql <>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/upgrade-status.log.$$ 2>&1 + + checkForError + fi + + # + # Verify that compressiontype was successfully added to SYSCOLUMN + # + rm -f /tmp/idb_upgrade.sql + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe syscolumn;' \ + calpontsys | grep compressiontype >/tmp/upgrade-status-1.log 2>&1 + rc=$? + cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$ + if [ $rc -ne 0 ]; then + echo "FAILED adding compressiontype to SYSCOLUMN!" + exit 1 + fi + cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'` + rm -f /tmp/upgrade-status-1.log + if [ -z "$cnt" ]; then + cnt=0 + fi + if [ $cnt -ne 1 ]; then + echo "FAILED adding compressiontype to SYSCOLUMN!" + exit 1 + fi + + # + # Verify that compressiontype (OID 1041) was successfully added to BRM + # + if [ $has_um -eq 0 ]; then + $installdir/bin/editem -o1041 1>/tmp/upgrade-status-1.log 2>/dev/null + rc=$? + cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$ + if [ $rc -ne 0 ]; then + echo "FAILED adding compressiontype to BRM!" + exit 1 + fi + cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'` + rm -f /tmp/upgrade-status-1.log + if [ -z "$cnt" ]; then + cnt=0 + fi + if [ $cnt -lt 2 ]; then + echo "FAILED adding compressiontype to BRM!" + exit 1 + fi + fi + fi + + #--------------------------------------------------------------------------- + # See if autoincrement column is in SYSTABLE + #--------------------------------------------------------------------------- + echo "checking calpontsys for autoincrement..." >>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe systable;' \ + calpontsys | grep autoincrement >>/tmp/upgrade-status.log.$$ 2>&1 + + # + # Add autoincrement column to SYSTABLE if applicable + # + if [ $? -ne 0 ]; then + echo "calpontsys needs upgrade for autoincrement" >>/tmp/upgrade-status.log.$$ + echo "add autoincrement columns" >>/tmp/upgrade-status.log.$$ + cat >/tmp/idb_upgrade.sql <>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/upgrade-status.log.$$ 2>&1 + + checkForError + + if [ $mid -eq 1 ]; then + echo "update autoincrement to backend" >>/tmp/upgrade-status.log.$$ + cat >/tmp/idb_upgrade.sql <>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/upgrade-status.log.$$ 2>&1 + + checkForError + fi + + # + #Verify that autoincrement was successfully added to SYSTABLE + # + rm -f /tmp/idb_upgrade.sql + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe systable;' \ + calpontsys | grep autoincrement >/tmp/upgrade-status-1.log 2>&1 + rc=$? + cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$ + if [ $rc -ne 0 ]; then + echo "FAILED adding autoincrement to SYSTABLE!" + exit 1 + fi + cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'` + rm -f /tmp/upgrade-status-1.log + if [ -z "$cnt" ]; then + cnt=0 + fi + if [ $cnt -ne 1 ]; then + echo "FAILED adding autoincrement to SYSTABLE!" + exit 1 + fi + + # + # Verify that autoincrement (OID 1011) was successfully added to BRM + # + if [ $has_um -eq 0 ]; then + $installdir/bin/editem -o1011 1>/tmp/upgrade-status-1.log 2>/dev/null + rc=$? + cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$ + if [ $rc -ne 0 ]; then + echo "FAILED adding autoincrement to BRM!" + exit 1 + fi + cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'` + rm -f /tmp/upgrade-status-1.log + if [ "x$cnt" = x ]; then + cnt=0 + fi + if [ $cnt -lt 2 ]; then + echo "FAILED adding autoincrement to BRM!" + exit 1 + fi + fi + fi + + #--------------------------------------------------------------------------- + # See if nextvalue column is in SYSCOLUMN + #--------------------------------------------------------------------------- + echo "checking calpontsys for nextvalue..." >>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe syscolumn;' \ + calpontsys | grep nextvalue >>/tmp/upgrade-status.log.$$ 2>&1 + + # + # Add nextvalue column to SYSCOLUMN if applicable. + # Also set old autoincrement column in SYSCOLUMN to 'n'. + # + if [ $? -ne 0 ]; then + echo "calpontsys needs upgrade for nextvalue" >>/tmp/upgrade-status.log.$$ + echo "add nextvalue columns" >>/tmp/upgrade-status.log.$$ + cat >/tmp/idb_upgrade.sql <>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/upgrade-status.log.$$ 2>&1 + + checkForError + + if [ $mid -eq 1 ]; then + echo "update nextvalue to backend" >>/tmp/upgrade-status.log.$$ + cat >/tmp/idb_upgrade.sql <>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/upgrade-status.log.$$ 2>&1 + + checkForError + fi + + # + # Verify that nextvalue was successfully added to SYSCOLUMN + # + rm -f /tmp/idb_upgrade.sql + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe syscolumn;' \ + calpontsys | grep nextvalue >/tmp/upgrade-status-1.log 2>&1 + rc=$? + cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$ + if [ $rc -ne 0 ]; then + echo "FAILED adding nextvalue to SYSCOLUMN!" + exit 1 + fi + cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'` + rm -f /tmp/upgrade-status-1.log + if [ -z "$cnt" ]; then + cnt=0 + fi + if [ $cnt -ne 1 ]; then + echo "FAILED adding nextvalue to SYSCOLUMN!" + exit 1 + fi + + # + # Verify that nextvalue (OID 1042) was successfully added to BRM + # + if [ $has_um -eq 0 ]; then + $installdir/bin/editem -o1042 1>/tmp/upgrade-status-1.log 2>/dev/null + rc=$? + cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$ + if [ $rc -ne 0 ]; then + echo "FAILED adding nextvalue to BRM!" + exit 1 + fi + cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'` + rm -f /tmp/upgrade-status-1.log + if [ "x$cnt" = x ]; then + cnt=0 + fi + if [ $cnt -lt 2 ]; then + echo "FAILED adding nextvalue to BRM!" + exit 1 + fi + fi + fi + + #--------------------------------------------------------------------------- + # See if systable schema and tablename columns are varchar(128). + #--------------------------------------------------------------------------- + recreate=0 + echo "checking calpontsys.systable schema and tablename for varchar(128)..." >>/tmp/upgrade-status.log.$$ + colCount=` \ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe systable;' \ + calpontsys | egrep "schema|tablename" | grep "varchar(128)" | wc -l` + if [ $colCount -ne 2 ]; then + recreate=1 + echo "calpontsys needs upgrade to expand systable schema and tablename" >>/tmp/upgrade-status.log.$$ + fi + + #--------------------------------------------------------------------------- + # See if syscolumn schema, tablename, and columname columns are varchar(128). + #--------------------------------------------------------------------------- + if [ $recreate -eq 0 ]; then + echo "checking calpontsys.syscolumn schema, tablename, columnname for varchar(128)..." >>/tmp/upgrade-status.log.$$ + colCount=` \ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe syscolumn;' \ + calpontsys | egrep "schema|tablename|columnname" | grep "varchar(128)" | wc -l` + if [ $colCount -ne 3 ]; then + recreate=1 + echo "calpontsys needs upgrade to expand syscolumn schema, tablename, and columnname" >>/tmp/upgrade-status.log.$$ + fi + fi + + #--------------------------------------------------------------------------- + # See if defaultvalue column in SYSCOLUMN is varchar(64) + #--------------------------------------------------------------------------- + if [ $recreate -eq 0 ]; then + echo "checking calpontsys for defaultvalue varchar(64)..." >>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe syscolumn;' \ + calpontsys | grep defaultvalue | grep 'varchar(64)' >>/tmp/upgrade-status.log.$$ 2>&1 + if [ $? -ne 0 ]; then + recreate=1 + echo "calpontsys needs upgrade to change defaultvalue" >>/tmp/upgrade-status.log.$$ + fi + fi + + # + # Change defaultvalue column to varchar(64) if applicable + # + if [ $recreate -ne 0 ]; then + cat >/tmp/idb_upgrade.sql <>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/upgrade-status.log.$$ 2>&1 + + checkForError + + echo "create systable and syscolumn with schema sync only" >>/tmp/upgrade-status.log.$$ + cat $installdir/mysql/syscatalog_mysql.sql >>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys <$installdir/mysql/syscatalog_mysql.sql >>/tmp/upgrade-status.log.$$ 2>&1 + + checkForError + + # + # Verify column widths: + # varchar(64) for syscolumn.defaultvalue + # varchar(128) for systable (schema, tablename) and syscolumn (schema, tablename, and columnname). + # + rm -f /tmp/idb_upgrade.sql + echo "verify column widths" >>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe syscolumn;' \ + calpontsys | grep defaultvalue | grep 'varchar(64)' >/tmp/upgrade-status-1.log 2>&1 + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe systable; describe syscolumn;' \ + calpontsys | egrep "schema|tablename|columnname" | grep 'varchar(128)' >>/tmp/upgrade-status-1.log 2>&1 + cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$ + cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'` + rm -f /tmp/upgrade-status-1.log + if [ -z "$cnt" ]; then + cnt=0 + fi + if [ $cnt -ne 6 ]; then + echo "FAILED width of schema, tablename, columnname, defaultvalue verification!" + exit 1 + fi + fi +fi + +echo "OK" diff --git a/export/bin/user_installer.sh b/export/bin/user_installer.sh new file mode 100755 index 000000000..1e3986807 --- /dev/null +++ b/export/bin/user_installer.sh @@ -0,0 +1,323 @@ +#!/usr/bin/expect +# +# $Id: user_installer.sh 1066 20081113 21:44:44Z dhill $ +# +# Install RPM and custom OS files on system +# Argument 1 - Remote Module Name +# Argument 2 - Remote Server Host Name or IP address +# Argument 3 - Root Password of remote server +# Argument 4 - Package name being installed +# Argument 5 - Install Type, "initial" or "upgrade" +# Argument 6 - Debug flag 1 for on, 0 for off +set timeout 30 +set USERNAME root +set MODULE [lindex $argv 0] +set SERVER [lindex $argv 1] +set PASSWORD [lindex $argv 2] +set VERSION [lindex $argv 3] +set INSTALLTYPE [lindex $argv 4] +set PKGTYPE [lindex $argv 5] +set NODEPS [lindex $argv 6] +set MYSQLPW [lindex $argv 7] +set MYSQLPORT [lindex $argv 8] +set DEBUG [lindex $argv 9] +set INSTALLDIR "/usr/local/MariaDB/Columnstore" +set IDIR [lindex $argv 10] +if { $IDIR != "" } { + set INSTALLDIR $IDIR +} +set USERNAME "root" +set UNM [lindex $argv 11] +if { $UNM != "" } { + set USERNAME $UNM +} + +if { $MYSQLPW == "none" } { + set MYSQLPW " " +} + +set BASH "/bin/bash " +#if { $DEBUG == "1" } { +# set BASH "/bin/bash -x " +#} + +set HOME "$env(HOME)" + +log_user $DEBUG +spawn -noecho /bin/bash +# +if { $PKGTYPE == "rpm" } { + set PKGERASE "rpm -e --nodeps \$(rpm -qa | grep '^infinidb')" + set PKGERASE1 "rpm -e --nodeps " + + set PKGINSTALL "rpm -ivh $NODEPS --force infinidb*$VERSION*" + set PKGUPGRADE "rpm -Uvh --noscripts infinidb*$VERSION*" +} else { + if { $PKGTYPE == "deb" } { + set PKGERASE "dpkg -P \$(dpkg --get-selections | grep '^infinidb')" + set PKGERASE1 "dpkg -P " + set PKGINSTALL "dpkg -i --force-confnew infinidb*$VERSION*" + set PKGUPGRADE "dpkg -i --force-confnew infinidb*$VERSION*" + } else { + send_user "Invalid Package Type of $PKGTYPE" + exit 1 + } +} + +# check and see if remote server has ssh keys setup, set PASSWORD if so +send_user " " +send "ssh $USERNAME@$SERVER 'time'\n" +set timeout 60 +expect { + "Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit 1 } + "service not known" { send_user "FAILED: Invalid Host\n" ; exit 1 } + "authenticity" { send "yes\n" + expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + } + } + "sys" { set PASSWORD "ssh" } + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 } + "Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + "No route to host" { send_user "ERROR: No route to host\n" ; exit 1 } + timeout { send_user "ERROR: Timeout to host\n" ; exit 1 } +} +set timeout 30 +expect { + -re {[$#] } { } + "sys" { } +} +send_user "\n" +#BUG 5749 - SAS: didn't work on their system until I added the sleep 60 +sleep 60 + +if { $INSTALLTYPE == "initial" || $INSTALLTYPE == "uninstall" } { + # + # erase InfiniDB packages + # + send_user "Erase InfiniDB Packages on Module " + send "ssh $USERNAME@$SERVER '$PKGERASE ;$PKGERASE1 dummy'\n" + if { $PASSWORD != "ssh" } { + set timeout 30 + expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + } + } + set timeout 120 + expect { + "package dummy" { send_user "DONE" } + "error: Failed dependencies" { send_user "ERROR: Failed dependencies\n" ; exit 1 } + "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + } + send_user "\n" +} + +if { $INSTALLTYPE == "uninstall" } { exit 0 } + +# +# send the InfinIDB package +# +set timeout 30 +#expect -re {[$#] } +send_user "Copy new InfiniDB Packages to Module " +send "ssh $USERNAME@$SERVER 'rm -f /root/infinidb-*.$PKGTYPE'\n" +if { $PASSWORD != "ssh" } { + set timeout 30 + expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + } +} +expect { + -re {[$#] } { } + "Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + "No route to host" { send_user "ERROR: No route to host\n" ; exit 1 } +} +set timeout 30 +expect { + -re {[$#] } { } +} + +send "scp $HOME/infinidb*$VERSION* $USERNAME@$SERVER:.;$PKGERASE dummy\n" +if { $PASSWORD != "ssh" } { + set timeout 30 + expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + } +} +set timeout 120 +expect { + "package dummy" { send_user "DONE" } + "directory" { send_user "ERROR\n" ; + send_user "\n*** Installation ERROR\n" ; + exit 1 } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } +} +send_user "\n" + +#sleep to make sure it's finished +sleep 5 +# +set timeout 30 +expect -re {[$#] } +if { $INSTALLTYPE == "initial"} { + # + # install package + # + send_user "Install InfinIDB Packages on Module " + send "ssh $USERNAME@$SERVER '$PKGINSTALL ;$PKGERASE dummy'\n" + if { $PASSWORD != "ssh" } { + set timeout 30 + expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + } + } + set timeout 180 + expect { + "package dummy" { send_user "DONE" } + "error: Failed dependencies" { send_user "ERROR: Failed dependencies\n" ; + send_user "\n*** Installation ERROR\n" ; + exit 1 } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + "needs" { send_user "ERROR: disk space issue\n" ; exit 1 } + "conflicts" { send_user "ERROR: File Conflict issue\n" ; exit 1 } + } + send_user "\n" + + set timeout 30 +} +#sleep to make sure it's finished +sleep 5 +# +if { $INSTALLTYPE == "initial"} { + # + # copy over InfiniDB config file + # + send_user "Copy InfiniDB Config file to Module " + send "scp $INSTALLDIR/etc/* $USERNAME@$SERVER:$INSTALLDIR/etc/.\n" + if { $PASSWORD != "ssh" } { + set timeout 30 + expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + } + } + set timeout 30 + expect { + "directory" { send_user "ERROR\n" ; + send_user "\n*** Installation ERROR\n" ; + exit 1 } + -re {[$#] } { send_user "DONE" } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + } + send_user "\n" + #sleep to make sure it's finished + sleep 5 + # + # copy over custom OS tmp files + # + send_user "Copy Custom OS files to Module " + send "scp -r $INSTALLDIR/local/etc $USERNAME@$SERVER:$INSTALLDIR/local/.\n" + if { $PASSWORD != "ssh" } { + set timeout 30 + expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + } + } + set timeout 30 + expect { + "directory" { send_user "ERROR\n" ; + send_user "\n*** Installation ERROR\n" ; + exit 1 } + -re {[$#] } { send_user "DONE" } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + } + send_user "\n" + #sleep to make sure it's finished + sleep 5 + # + # copy over InfiniDB OS files + # + send_user "Copy InfiniDB OS files to Module " + send "scp $INSTALLDIR/local/etc/$MODULE/* $USERNAME@$SERVER:$INSTALLDIR/local/.\n" + if { $PASSWORD != "ssh" } { + set timeout 30 + expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + } + } + set timeout 30 + expect { + "directory" { send_user "ERROR\n" ; + send_user "\n*** Installation ERROR\n" ; + exit 1 } + -re {[$#] } { send_user "DONE" } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + } + send_user "\n" + #sleep to make sure it's finished + sleep 5 + # + # Start module installer to setup Custom OS files + # + send_user "Run Module Installer " + send "ssh $USERNAME@$SERVER '$BASH $INSTALLDIR/bin/module_installer.sh --module=um --port=$MYSQLPORT'\n" + if { $PASSWORD != "ssh" } { + set timeout 30 + expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + } + } + set timeout 200 + expect { + "!!!Module" { send_user "DONE" } + "FAILED" { send_user "ERROR: missing OS file\n" ; exit 1 } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } + "No such file" { send_user "ERROR: File Not Found\n" ; exit 1 } + } + send_user "\n" + set timeout 30 + #expect -re {[$#] } +} + +# +# check InfiniDB syslog functionality +# + +send_user "Check InfiniDB system logging functionality " +send " \n" +send date\n +send "ssh $USERNAME@$SERVER '$BASH $INSTALLDIR/bin/syslogSetup.sh check'\n" +if { $PASSWORD != "ssh" } { + set timeout 30 + expect { + "word: " { send "$PASSWORD\n" } + "passphrase" { send "$PASSWORD\n" } + } +} +set timeout 30 +expect { + "Logging working" { send_user "DONE" } + timeout { send_user "DONE" } + "not working" { send_user "WARNING: InfiniDB system logging functionality not working" } + "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } +} +send_user "\n" + +send_user "\nInstallation Successfully Completed on '$MODULE'\n" +exit 0 +# vim:ts=4 sw=4: + diff --git a/export/bin/xm_installer.sh b/export/bin/xm_installer.sh new file mode 100755 index 000000000..37d778e39 --- /dev/null +++ b/export/bin/xm_installer.sh @@ -0,0 +1,173 @@ +#!/usr/bin/expect +# +# $Id$ +# +# Install custom OS files on External Module +# Argument 1 - Remote Module Name +# Argument 2 - Remote Server Host Name or IP address +# Argument 3 - OAM Parent Host Name +# Argument 4 - Root Password of remote server +# Argument 5 - Debug flag 1 for on, 0 for off +set timeout 10 +set USERNAME root +set MODULE [lindex $argv 0] +set SERVER [lindex $argv 1] +set OAMHOSTNAME [lindex $argv 2] +set PASSWORD [lindex $argv 3] +set DEBUG [lindex $argv 4] +log_user $DEBUG +spawn -noecho /bin/bash +# +# Validate Calpont RPM is installed +# +send_user "\n" +send_user "Check Calpont RPM installed " +expect -re "# " +send "ssh $USERNAME@$SERVER 'rpm -iq calpont'\n" +expect { + -re "Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit } + -re "service not known" { send_user "FAILED: Invalid Host\n" ; exit } + -re "authenticity" { send "yes\n" + expect { + -re "word: " { send "$PASSWORD\n" } + } + } + -re "word: " { send "$PASSWORD\n" } +} +expect { + -re "tools " { send_user "DONE" } + -re "Permission denied" { send_user "ERROR: Invalid password\n" ; exit -1 } + -re "package calpont" { send_user "ERROR: Calpont RPM not installed on External Module\n" ; exit -1 } +} +# +# Create mount directories +# +send_user "\n" +send_user "Create etc mount directory " +expect -re "# " +send "ssh $USERNAME@$SERVER 'mkdir /mnt/$OAMHOSTNAME\_etc'\n" +expect -re "word: " +# send the password +send "$PASSWORD\n" +expect { + -re "# " { send_user "DONE" } + -re "Permission denied" { send_user "ERROR: Invalid password\n" ; exit -1 } + -re "mkdir: cannot" { send_user "DONE: already installed\n" + send_user "\nInstallation Successfully Completed on '$MODULE'\n"; exit 0 } +} +send_user "\n" +send_user "Create OAM mount directory " +send "ssh $USERNAME@$SERVER 'mkdir /mnt/$OAMHOSTNAME\_OAM'\n" +expect -re "word: " +# send the password +send "$PASSWORD\n" +expect { + -re "# " { send_user "DONE" } + -re "Permission denied" { send_user "ERROR: Invalid password\n" ; exit -1 } + -re "mkdir: cannot" { send_user "DONE: already installed\n" + send_user "\nInstallation Successfully Completed on '$MODULE'\n"; exit 0 } +} +# +# copy over calpont OS files +# +send_user "\n" +send_user "Copy Mount File to Module " +send "scp /tmp/etc/$MODULE/*mount $USERNAME@$SERVER:/mnt/.\n" +expect -re "word: " +# send the password +send "$PASSWORD\n" +expect { + -re "100%" { send_user "DONE" } + -re "scp" { send_user "ERROR\n" ; + send_user "\n*** Installation ERROR\n" ; + exit -1 } + -re "Permission denied" { send_user "ERROR: Invalid password\n" ; exit -1 } + -re "No such file or directory" { send_user "ERROR: Invalid file\n" ; exit -1 } +} +# +send_user "\n" +send_user "Copy Custom inittab to Module " +send "scp /tmp/etc/$MODULE/inittab.calpont $USERNAME@$SERVER:/tmp/.\n" +expect -re "word: " +# send the password +send "$PASSWORD\n" +expect { + -re "100%" { send_user "DONE" } + -re "scp" { send_user "ERROR\n" ; + send_user "\n*** Installation ERROR\n" ; + exit -1 } + -re "Permission denied" { send_user "ERROR: Invalid password\n" ; exit -1 } + -re "No such file or directory" { send_user "ERROR: Invalid file\n" ; exit -1 } +} +# +send_user "\n" +send_user "Copy syslogd.conf to Module " +send "scp /etc/syslog.conf $USERNAME@$SERVER:/etc/.\n" +expect -re "word: " +# send the password +send "$PASSWORD\n" +expect { + -re "100%" { send_user "DONE" } + -re "scp" { send_user "ERROR\n" ; + send_user "\n*** Installation ERROR\n" ; + exit -1 } + -re "Permission denied" { send_user "ERROR: Invalid password\n" ; exit -1 } + -re "No such file or directory" { send_user "ERROR: Invalid file\n" ; exit -1 } +} +# +# chmod of mount file +# +send_user "\n" +send_user "Run chmod on Mount File " +send "ssh $USERNAME@$SERVER 'chmod 755 /mnt/$OAMHOSTNAME\_*mount'\n" +expect -re "word: " +# send the password +send "$PASSWORD\n" +expect { + -re "# " { send_user "DONE" } + -re "Permission denied" { send_user "ERROR: Invalid password\n" ; exit -1 } +} +# +# Update External Module inittab +# +send_user "\n" +send_user "Update inittab " +send "ssh $USERNAME@$SERVER 'cat /tmp/inittab.calpont >> /etc/inittab'\n" +expect -re "word: " +# send the password +send "$PASSWORD\n" +expect { + -re "# " { send_user "DONE" } + -re "Permission denied" { send_user "ERROR: Invalid password\n" ; exit -1 } +} +# +# Restart External Module syslogd +# +send_user "\n" +send_user "Restart syslogd " +send "ssh $USERNAME@$SERVER 'service syslog restart'\n" +expect -re "word: " +# send the password +send "$PASSWORD\n" +expect { + -re "# " { send_user "DONE" } + -re "Permission denied" { send_user "ERROR: Invalid password\n" ; exit -1 } +} +# +# startup ProcMon +# +send_user "\n" +send_user "Startup ProcMon " +send "ssh $USERNAME@$SERVER 'kill -HUP 1'\n" +expect -re "word: " +# send the password +send "$PASSWORD\n" +expect { + -re "# " { send_user "DONE" } + -re "Permission denied" { send_user "ERROR: Invalid password\n" ; exit -1 } +} +send_user "\n" +# +send_user "\nInstallation Successfully Completed on '$MODULE'\n" +exit 0 + diff --git a/export/local/module b/export/local/module new file mode 100755 index 000000000..1516f1d24 --- /dev/null +++ b/export/local/module @@ -0,0 +1 @@ +pm1 diff --git a/net-snmp/net-snmp-5.2.1.2/CalpontConfigure.sh b/net-snmp/net-snmp-5.2.1.2/CalpontConfigure.sh index 02d8776eb..2f27d474d 100755 --- a/net-snmp/net-snmp-5.2.1.2/CalpontConfigure.sh +++ b/net-snmp/net-snmp-5.2.1.2/CalpontConfigure.sh @@ -4,7 +4,7 @@ # # configures and installs net-snmp modules that we need -prefix=/usr/local/Calpont +prefix=/usr/local/MariaDB/Columnstore for arg in "$@"; do if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then prefix="`echo $arg | awk -F= '{print $2}'`" diff --git a/oam/cloud/IDBCloudGetIP.sh b/oam/cloud/IDBCloudGetIP.sh index df35fefb5..9d9003d31 100644 --- a/oam/cloud/IDBCloudGetIP.sh +++ b/oam/cloud/IDBCloudGetIP.sh @@ -9,23 +9,23 @@ prefix=/usr/local #get instance name from called instanceName="$1" -ec2=`$prefix/Calpont/bin/getConfig Installation EC2_HOME` +ec2=`$prefix/MariaDB/Columnstore/bin/getConfig Installation EC2_HOME` if [ $ec2 == "unassigned" ]; then echo "stopped" exit 1 fi -java=`$prefix/Calpont/bin/getConfig Installation JAVA_HOME` -path=`$prefix/Calpont/bin/getConfig Installation EC2_PATH` +java=`$prefix/MariaDB/Columnstore/bin/getConfig Installation JAVA_HOME` +path=`$prefix/MariaDB/Columnstore/bin/getConfig Installation EC2_PATH` export PATH=$path export EC2_HOME=$ec2 export JAVA_HOME=$java # get x509 Certification and Private Key -x509Cert=`$prefix/Calpont/bin/getConfig Installation AmazonX509Certificate` -x509PriKey=`$prefix/Calpont/bin/getConfig Installation AmazonX509PrivateKey` +x509Cert=`$prefix/MariaDB/Columnstore/bin/getConfig Installation AmazonX509Certificate` +x509PriKey=`$prefix/MariaDB/Columnstore/bin/getConfig Installation AmazonX509PrivateKey` #get instance info ec2-describe-instances -C $x509Cert -K $x509PriKey $instanceName > /tmp/instanceInfo 2> /dev/null diff --git a/oam/cloud/IDBInstanceCmds.sh b/oam/cloud/IDBInstanceCmds.sh index 3592f48de..8a0d68af5 100644 --- a/oam/cloud/IDBInstanceCmds.sh +++ b/oam/cloud/IDBInstanceCmds.sh @@ -88,9 +88,9 @@ if [ "$1" = "deassignElasticIP" ]; then fi -test -f /usr/local/Calpont/post/functions && . /usr/local/Calpont/post/functions +test -f /usr/local/MariaDB/Columnstore/post/functions && . /usr/local/MariaDB/Columnstore/post/functions -ec2=`$prefix/Calpont/bin/getConfig Installation EC2_HOME` +ec2=`$prefix/MariaDB/Columnstore/bin/getConfig Installation EC2_HOME` if [ $ec2 == "unassigned" ]; then if [ "$1" = "getPrivateIP" ]; then @@ -102,21 +102,21 @@ if [ $ec2 == "unassigned" ]; then fi fi -java=`$prefix/Calpont/bin/getConfig Installation JAVA_HOME` -path=`$prefix/Calpont/bin/getConfig Installation EC2_PATH` +java=`$prefix/MariaDB/Columnstore/bin/getConfig Installation JAVA_HOME` +path=`$prefix/MariaDB/Columnstore/bin/getConfig Installation EC2_PATH` export PATH=$path export EC2_HOME=$ec2 export JAVA_HOME=$java # get Keys and region -AmazonAccessKeyFile=`$prefix/Calpont/bin/getConfig Installation AmazonAccessKey` +AmazonAccessKeyFile=`$prefix/MariaDB/Columnstore/bin/getConfig Installation AmazonAccessKey` if [ $AmazonAccessKeyFile == "unassigned" ]; then echo "FAILED: missing Config Setting AmazonAccessKey : $AmazonAccessKeyfile" exit 1 fi -AmazonSecretKeyFile=`$prefix/Calpont/bin/getConfig Installation AmazonSecretKey` +AmazonSecretKeyFile=`$prefix/MariaDB/Columnstore/bin/getConfig Installation AmazonSecretKey` if [ $AmazonSecretKeyFile == "unassigned" ]; then echo "FAILED: missing Config Setting AmazonSecretKeyFile : $AmazonSecretKeyFile" exit 1 @@ -125,8 +125,8 @@ fi AmazonAccessKey=`cat $AmazonAccessKeyFile` AmazonSecretKey=`cat $AmazonSecretKeyFile` -Region=`$prefix/Calpont/bin/getConfig Installation AmazonRegion` -subnet=`$prefix/Calpont/bin/getConfig Installation AmazonSubNetID` +Region=`$prefix/MariaDB/Columnstore/bin/getConfig Installation AmazonRegion` +subnet=`$prefix/MariaDB/Columnstore/bin/getConfig Installation AmazonSubNetID` if test ! -f $AmazonAccessKeyfile ; then echo "FAILED: missing AmazonAccessKeyfile : $AmazonAccessKeyfile" @@ -193,7 +193,7 @@ getInstancePrivate() { getZone() { #get from Calpont.xml if it's there, if not, get from instance then store - zone=`$prefix/Calpont/bin/getConfig Installation AmazonZone` + zone=`$prefix/MariaDB/Columnstore/bin/getConfig Installation AmazonZone` if [ "$zone" = "unassigned" ] || [ "$zone" = "" ]; then #get local Instance ID @@ -213,7 +213,7 @@ getZone() { fi zone=`cat $describeInstanceFile | grep -m 1 $instance | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $11}'` fi - $prefix/Calpont/bin/setConfig Installation AmazonZone $zone + $prefix/MariaDB/Columnstore/bin/setConfig Installation AmazonZone $zone fi echo $zone diff --git a/oam/cloud/IDBVolumeCmds.sh b/oam/cloud/IDBVolumeCmds.sh index 82f2dd6a9..ff7bf1a3f 100644 --- a/oam/cloud/IDBVolumeCmds.sh +++ b/oam/cloud/IDBVolumeCmds.sh @@ -93,30 +93,30 @@ if [ "$1" = "createTag" ]; then fi -test -f /usr/local/Calpont/post/functions && . /usr/local/Calpont/post/functions +test -f /usr/local/MariaDB/Columnstore/post/functions && . /usr/local/MariaDB/Columnstore/post/functions -ec2=`$prefix/Calpont/bin/getConfig Installation EC2_HOME` +ec2=`$prefix/MariaDB/Columnstore/bin/getConfig Installation EC2_HOME` if [ $ec2 == "unassigned" ]; then STATUS="unknown" RETVAL=1 fi -java=`$prefix/Calpont/bin/getConfig Installation JAVA_HOME` -path=`$prefix/Calpont/bin/getConfig Installation EC2_PATH` +java=`$prefix/MariaDB/Columnstore/bin/getConfig Installation JAVA_HOME` +path=`$prefix/MariaDB/Columnstore/bin/getConfig Installation EC2_PATH` export PATH=$path export EC2_HOME=$ec2 export JAVA_HOME=$java # get Keys and region -AmazonAccessKeyFile=`$prefix/Calpont/bin/getConfig Installation AmazonAccessKey` +AmazonAccessKeyFile=`$prefix/MariaDB/Columnstore/bin/getConfig Installation AmazonAccessKey` if [ $AmazonAccessKeyFile == "unassigned" ]; then echo "FAILED: missing Config Setting AmazonAccessKey : $AmazonAccessKeyfile" exit 1 fi -AmazonSecretKeyFile=`$prefix/Calpont/bin/getConfig Installation AmazonSecretKey` +AmazonSecretKeyFile=`$prefix/MariaDB/Columnstore/bin/getConfig Installation AmazonSecretKey` if [ $AmazonSecretKeyFile == "unassigned" ]; then echo "FAILED: missing Config Setting AmazonSecretKeyFile : $AmazonSecretKeyFile" exit 1 @@ -135,7 +135,7 @@ if test ! -f $AmazonSecretKeyfile ; then exit 1 fi -Region=`$prefix/Calpont/bin/getConfig Installation AmazonRegion` +Region=`$prefix/MariaDB/Columnstore/bin/getConfig Installation AmazonRegion` checkInfostatus() { @@ -189,21 +189,21 @@ checkInfostatus() { createvolume() { # get zone - zone=`$prefix/Calpont/bin/IDBInstanceCmds.sh getZone` + zone=`$prefix/MariaDB/Columnstore/bin/IDBInstanceCmds.sh getZone` if [ $moduleType == "um" ]; then # get type - volumeType=`$prefix/Calpont/bin/getConfig Installation UMVolumeType` + volumeType=`$prefix/MariaDB/Columnstore/bin/getConfig Installation UMVolumeType` if [ $volumeType == "io1" ]; then # get IOPS - volumeIOPS=`$prefix/Calpont/bin/getConfig Installation UMVolumeIOPS` + volumeIOPS=`$prefix/MariaDB/Columnstore/bin/getConfig Installation UMVolumeIOPS` fi else # pm # get type - volumeType=`$prefix/Calpont/bin/getConfig Installation PMVolumeType` + volumeType=`$prefix/MariaDB/Columnstore/bin/getConfig Installation PMVolumeType` if [ $volumeType == "io1" ]; then # get IOPS - volumeIOPS=`$prefix/Calpont/bin/getConfig Installation PMVolumeIOPS` + volumeIOPS=`$prefix/MariaDB/Columnstore/bin/getConfig Installation PMVolumeIOPS` fi fi @@ -246,7 +246,7 @@ detachvolume() { ((retries++)) sleep 1 done - test -f /usr/local/Calpont/post/functions && . /usr/local/Calpont/post/functions + test -f /usr/local/MariaDB/Columnstore/post/functions && . /usr/local/MariaDB/Columnstore/post/functions cplogger -w 100 "detachvolume failed: $STATUS" echo "failed" exit 1 @@ -257,7 +257,7 @@ detachvolume() { exit 0 fi - test -f /usr/local/Calpont/post/functions && . /usr/local/Calpont/post/functions + test -f /usr/local/MariaDB/Columnstore/post/functions && . /usr/local/MariaDB/Columnstore/post/functions cplogger -w 100 "detachvolume failed status: $STATUS" echo $STATUS exit 1 @@ -281,7 +281,7 @@ attachvolume() { ((retries++)) sleep 1 done - test -f /usr/local/Calpont/post/functions && . /usr/local/Calpont/post/functions + test -f /usr/local/MariaDB/Columnstore/post/functions && . /usr/local/MariaDB/Columnstore/post/functions cplogger -w 100 "attachvolume failed: $STATUS" echo "failed" exit 1 @@ -292,7 +292,7 @@ attachvolume() { exit 0 fi - test -f /usr/local/Calpont/post/functions && . /usr/local/Calpont/post/functions + test -f /usr/local/MariaDB/Columnstore/post/functions && . /usr/local/MariaDB/Columnstore/post/functions cplogger -w 100 "attachvolume failed: $STATUS" echo $STATUS exit 1 diff --git a/oam/install_scripts/Doxyfile b/oam/install_scripts/Doxyfile new file mode 100644 index 000000000..754783f78 --- /dev/null +++ b/oam/install_scripts/Doxyfile @@ -0,0 +1,275 @@ +# Doxyfile 1.4.1-KDevelop + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +PROJECT_NAME = install_scripts.kdevelop +PROJECT_NUMBER = $VERSION$ +OUTPUT_DIRECTORY = +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English +USE_WINDOWS_ENCODING = NO +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = /home/dhill/ +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +DETAILS_AT_TOP = NO +INHERIT_DOCS = YES +DISTRIBUTE_GROUP_DOC = NO +TAB_SIZE = 8 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = NO +OPTIMIZE_OUTPUT_JAVA = NO +SUBGROUPING = YES +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = NO +EXTRACT_PRIVATE = NO +EXTRACT_STATIC = NO +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = YES +HIDE_SCOPE_NAMES = NO +SHOW_INCLUDE_FILES = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = NO +SORT_BY_SCOPE_NAME = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_DIRECTORIES = YES +FILE_VERSION_FILTER = +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = /home/dhill/InfiniDB_MariaDB/oam/install_scripts +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.idl \ + *.odl \ + *.cs \ + *.php \ + *.php3 \ + *.inc \ + *.m \ + *.mm \ + *.dox \ + *.C \ + *.CC \ + *.C++ \ + *.II \ + *.I++ \ + *.H \ + *.HH \ + *.H++ \ + *.CS \ + *.PHP \ + *.PHP3 \ + *.M \ + *.MM \ + *.C \ + *.H \ + *.tlh \ + *.diff \ + *.patch \ + *.moc \ + *.xpm \ + *.dox +RECURSIVE = yes +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = * +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = NO +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES +VERBATIM_HEADERS = YES +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = NO +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +BINARY_TOC = NO +TOC_EXPAND = NO +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = NO +TREEVIEW_WIDTH = 250 +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = YES +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = NO +USE_PDFLATEX = NO +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = yes +XML_OUTPUT = xml +XML_SCHEMA = +XML_DTD = +XML_PROGRAMLISTING = YES +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = install_scripts.tag +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = NO +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +GROUP_GRAPHS = YES +UML_LOOK = NO +TEMPLATE_RELATIONS = NO +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +CALL_GRAPH = NO +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = png +DOT_PATH = +DOTFILE_DIRS = +MAX_DOT_GRAPH_WIDTH = 1024 +MAX_DOT_GRAPH_HEIGHT = 1024 +MAX_DOT_GRAPH_DEPTH = 1000 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO diff --git a/oam/install_scripts/Makefile b/oam/install_scripts/Makefile index 0a3cc8bc7..02f32d771 100755 --- a/oam/install_scripts/Makefile +++ b/oam/install_scripts/Makefile @@ -9,16 +9,16 @@ include ../../rules.mak .PHONY: install clean test docs coverage leakcheck SCRIPTS=post-install pre-uninstall remote_command.sh \ -calpontLogRotate transactionLog transactionLogArchiver.sh system_installer.sh \ -module_installer.sh patch_installer.sh xm_installer.sh startupTests.sh \ -director_installer.sh user_installer.sh performance_installer.sh \ -remote_scp_get.sh calpontAlias run.sh upgrade-infinidb.sh \ +columnstoreLogRotate transactionLog transactionLogArchiver.sh system_installer.sh \ +module_installer.sh startupTests.sh \ +user_installer.sh performance_installer.sh \ +remote_scp_get.sh columnstoreAlias run.sh upgrade-columnstore.sh \ post-mysql-install post-mysqld-install binary_installer.sh \ -os_check.sh infinidb calpontSyslog calpontSyslog-ng syslogSetup.sh \ -remote_scp_put.sh calpontUninstall.sh infinidb.def \ -remotessh.exp master-rep-infinidb.sh slave-rep-infinidb.sh rsync.sh \ +os_check.sh columnstore columnstoreSyslog columnstoreSyslog-ng syslogSetup.sh \ +remote_scp_put.sh columnstoreUninstall.sh columnstore.def \ +remotessh.exp master-rep-columnstore.sh slave-rep-columnstore.sh rsync.sh \ myCnf-include-args.text myCnf-exclude-args.text remote_command_verify.sh \ -calpontSyslog7 disable-rep-infinidb.sh infinidb.conf +columnstoreSyslog7 disable-rep-columnstore.sh columnstore.conf LOCAL=module diff --git a/oam/install_scripts/Makefile~ b/oam/install_scripts/Makefile~ new file mode 100755 index 000000000..0c0b57896 --- /dev/null +++ b/oam/install_scripts/Makefile~ @@ -0,0 +1,57 @@ +include ../../rules.mak +#****************************************************************************************** +# +# $Id: Makefile 3250 2012-09-26 17:44:13Z rdempsey $ +# +# Copyright (C) 2009-2012 Calpont Corporation +# All rights reserved +#*****************************************************************************************/ +.PHONY: install clean test docs coverage leakcheck + +SCRIPTS=post-install pre-uninstall remote_command.sh \ +columnstoreLogRotate transactionLog transactionLogArchiver.sh system_installer.sh \ +module_installer.sh patch_installer.sh xm_installer.sh startupTests.sh \ +director_installer.sh user_installer.sh performance_installer.sh \ +remote_scp_get.sh columnstoreAlias run.sh upgrade-columnstore.sh \ +post-mysql-install post-mysqld-install binary_installer.sh \ +os_check.sh columnstore columnstoreSyslog columnstoreSyslog-ng syslogSetup.sh \ +remote_scp_put.sh columnstoreUninstall.sh columnstore.def \ +remotessh.exp master-rep-columnstore.sh slave-rep-columnstore.sh rsync.sh \ +myCnf-include-args.text myCnf-exclude-args.text remote_command_verify.sh \ +columnstoreSyslog7 disable-rep-columnstore.sh columnstore.conf + +LOCAL=module + +bootstrap: + umask 002; \ + mkdir -p $(INSTALL_ROOT_BIN); \ + pushd $(INSTALL_ROOT_BIN) >/dev/null; \ + rm -f $(SCRIPTS); \ + popd >/dev/null; \ + $(INSTALL) $(SCRIPTS) $(INSTALL_ROOT_BIN) + pushd $(INSTALL_ROOT_BIN) >/dev/null; \ + chmod -f 555 $(SCRIPTS); \ + popd >/dev/null + umask 002; \ + mkdir -p $(INSTALL_ROOT_LOCAL); \ + pushd $(INSTALL_ROOT_LOCAL) >/dev/null; \ + rm -f $(LOCAL); \ + popd >/dev/null; \ + $(INSTALL) $(LOCAL) $(INSTALL_ROOT_LOCAL) + pushd $(INSTALL_ROOT_LOCAL) >/dev/null; \ + chmod -f 555 $(LOCAL); \ + popd >/dev/null + +clean: + rm -f $(OBJS) $(PROGRAM) core *~ *.tag *.d *.d.* + +install: bootstrap + +test: + +docs: + +coverage: + +leakcheck: + diff --git a/oam/install_scripts/binary_installer.sh b/oam/install_scripts/binary_installer.sh index a6fe2709c..c8a20ee38 100644 --- a/oam/install_scripts/binary_installer.sh +++ b/oam/install_scripts/binary_installer.sh @@ -24,7 +24,7 @@ set PKGTYPE "binary" set SERVERTYPE [lindex $argv 6] set MYSQLPORT [lindex $argv 7] set DEBUG [lindex $argv 8] -set INSTALLDIR "/usr/local/Calpont" +set INSTALLDIR "/usr/local/MariaDB/Columnstore" set IDIR [lindex $argv 9] if { $IDIR != "" } { set INSTALLDIR $IDIR diff --git a/oam/install_scripts/calpontInstall.sh b/oam/install_scripts/calpontInstall.sh index 57e80c5d0..60474f042 100755 --- a/oam/install_scripts/calpontInstall.sh +++ b/oam/install_scripts/calpontInstall.sh @@ -13,7 +13,7 @@ set PACKAGE " " set CONFIGFILE " " set DEBUG 0 set NODEPS "-h" -set INSTALLDIR "/usr/local/Calpont" +set INSTALLDIR "/usr/local/MariaDB/Columnstore" spawn -noecho /bin/bash diff --git a/oam/install_scripts/calpontUninstall.sh b/oam/install_scripts/calpontUninstall.sh index 6c35ae75b..59c285a72 100755 --- a/oam/install_scripts/calpontUninstall.sh +++ b/oam/install_scripts/calpontUninstall.sh @@ -4,7 +4,7 @@ # # Uninstall Package from system -set INFINIDB_INSTALL_DIR "/usr/local/Calpont" +set INFINIDB_INSTALL_DIR "/usr/local/MariaDB/Columnstore" set env(INFINIDB_INSTALL_DIR) $INFINIDB_INSTALL_DIR set USERNAME $env(USER) diff --git a/oam/install_scripts/columnstore b/oam/install_scripts/columnstore new file mode 100644 index 000000000..c5d44a947 --- /dev/null +++ b/oam/install_scripts/columnstore @@ -0,0 +1,184 @@ +#!/bin/bash +# +# $Id: columnstore 3704 2013-08-07 03:33:20Z bwilkinson $ +# +# columnstore Starts MariaDB Columnstore database platform +# +# +# chkconfig: 2345 99 99 +# description: MariaDB Columnstore is a database platform that utilizes Mysql +# +### BEGIN INIT INFO +# Provides: columnstore +# Required-Start: $local_fs $remote_fs $network $syslog $all +# Required-Stop: $local_fs $remote_fs $network $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start/stop InfiniDB DW DBMS +### END INIT INFO + +# Source function library. +if [ -f /etc/init.d/functions ]; then + . /etc/init.d/functions +fi + +if [ -z "$INFINIDB_INSTALL_DIR" ]; then + test -f /etc/default/columnstore && . /etc/default/columnstore +fi + +if [ -z "$INFINIDB_INSTALL_DIR" ]; then + INFINIDB_INSTALL_DIR=/usr/local/MariaDB/Columnstore +fi + +export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR + +InstallDir=$INFINIDB_INSTALL_DIR + +if [ $InstallDir != "/usr/local/Calpont" ]; then + export PATH=$InstallDir/bin:$InstallDir/mysql/bin:/bin:/usr/bin + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$InstallDir/lib:$InstallDir/mysql/lib/mysql +fi + +#hadoop +plugin=`$INFINIDB_INSTALL_DIR/bin/getConfig SystemConfig DataFilePlugin` +if [ -n "$plugin" ]; then + setenv=`$InstallDir/bin/getConfig SystemConfig DataFileEnvFile` + . $InstallDir/bin/$setenv >/dev/null 2>&1 +fi + +if [ -e $InstallDir/lib/libjemalloc.so ]; then + export LD_PRELOAD=$InstallDir/lib/libjemalloc.so +elif [ -e $InstallDir/lib/libjemalloc.so.1 ]; then + export LD_PRELOAD=$InstallDir/lib/libjemalloc.so.1 +fi + +test -f $InstallDir/post/functions && . $InstallDir/post/functions + +mt=`module_type` +mid=`module_id` + +has_um=`$InstallDir/bin/getConfig SystemModuleConfig ModuleCount2` +if [ "x$has_um" = x ]; then + has_um=0 +fi + +user=$USER +if [ -z "$user" ]; then + user=root +fi + +checkInstallSetup() { + InitialInstallFlag=`$InstallDir/bin/getConfig -c $InstallDir/etc/Calpont.xml Installation InitialInstallFlag` + if [ $InitialInstallFlag != "y" ]; then + echo "Please run the postConfigure install script, check the Installation Guide" + echo "for additional details" + rm -f /var/lock/subsys/columnstore + exit 1 + fi +} + +[ -f $InstallDir/bin/ProcMon ] || exit 0 + +start() { + if [ -f /var/lock/subsys/columnstore ]; then + echo "MariaDB Columnstore Database Platform already running" + exit 0 + fi + + (mkdir -p /var/lock/subsys && touch /var/lock/subsys/columnstore) >/dev/null 2>&1 + + if [ -x $InstallDir/bin/columnstore.pre-start ]; then + $InstallDir/bin/columnstore.pre-start + if [ $? -ne 0 ]; then + echo "Error running MariaDB Columnstore pre-start script, not starting MariaDB Columnstore" + rm -f /var/lock/subsys/columnstore + exit 1 + fi + fi + checkInstallSetup + + CoreFileFlag=`$InstallDir/bin/getConfig -c $InstallDir/etc/Calpont.xml Installation CoreFileFlag` + if [ $CoreFileFlag = "y" ]; then + SUDO= + if [ "$user" != "root" ]; then + SUDO="sudo" + fi + + #columnstore core files + $SUDO ulimit -c unlimited > /dev/null 2>&1 + $SUDO sysctl -q -w kernel.core_uses_pid=1 > /dev/null 2>&1 + $SUDO sysctl -q -w kernel.core_pattern=/var/log/Calpont/corefiles/core.%e.%p > /dev/null 2>&1 + fi + + RETVAL=0 + echo "Starting MariaDB Columnstore Database Platform" + rm -f /tmp/StopCalpont + exec $InstallDir/bin/run.sh $InstallDir/bin/ProcMon > /dev/null 2>&1 & + + return $RETVAL +} +stop() { + echo "Shutting down MariaDB Columnstore Database Platform" + touch /tmp/StopCalpont + pkill -9 ProcMon + pkill -9 ProcMgr + pkill -9 snmptrapd + sleep 1 + $InstallDir/bin/clearShm + RETVAL=$? + rm -f /var/lock/subsys/columnstore + fuser -k 8604/tcp > /dev/null 2>&1 + test -f $InstallDir/mysql/mysql-Calpont || return $RETVAL + $InstallDir/mysql/mysql-Calpont stop > /dev/null 2>&1 + if [ -x $InstallDir/bin/columnstore.post-stop ]; then + $InstallDir/bin/columnstore.post-stop + fi + return $RETVAL +} +restart() { + stop + start +} +status() { + isrunning=0 + if [ $EUID -eq 0 ]; then + if [ -f /var/lock/subsys/columnstore ]; then + isrunning=1 + fi + else + pgrep ProcMon >/dev/null 2>&1 + if [ $? -eq 0 ]; then + isrunning=1 + fi + fi + if [ $isrunning -ne 0 ]; then + echo "MariaDB Columnstore is running" + else + echo "MariaDB Columnstore is not running" + exit 3 + fi +} + +case "$1" in +start) + start + ;; +stop) + stop + ;; +restart) + restart + ;; +condrestart) + [ -f /var/lock/subsys/columnstore ] && restart || : + ;; +status) + status + ;; +*) + echo $"Usage: $0 {start|stop|restart|condrestart|status}" + exit 1 +esac + +exit $? + diff --git a/oam/install_scripts/columnstore.conf b/oam/install_scripts/columnstore.conf new file mode 100644 index 000000000..abb2e8fd4 --- /dev/null +++ b/oam/install_scripts/columnstore.conf @@ -0,0 +1,2 @@ +/usr/local/Calpont/lib + diff --git a/oam/install_scripts/columnstore.def b/oam/install_scripts/columnstore.def new file mode 100644 index 000000000..4ebfb2019 --- /dev/null +++ b/oam/install_scripts/columnstore.def @@ -0,0 +1,9 @@ +#!/bin/bash +# Copy this file to /etc/default and rename it to 'infinidb'. + +# Change this line to your InfiniDB installation directory +INFINIDB_INSTALL_DIR=/usr/local/Calpont + +LD_LIBRARY_PATH=$INFINIDB_INSTALL_DIR/lib:$INFINIDB_INSTALL_DIR/mysql/lib/mysql +export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH diff --git a/oam/install_scripts/columnstore.upstart b/oam/install_scripts/columnstore.upstart new file mode 100644 index 000000000..bb53d6901 --- /dev/null +++ b/oam/install_scripts/columnstore.upstart @@ -0,0 +1,16 @@ +# $Id$ + +description "Starts the InfiniDB Enterprise Process Monitor" + +start on runlevel 2 +start on runlevel 3 + +stop on runlevel 0 +stop on runlevel 1 +stop on runlevel 4 +stop on runlevel 5 +stop on runlevel 6 + +respawn +exec /usr/local/Calpont/bin/ProcMon + diff --git a/oam/install_scripts/columnstoreAlias b/oam/install_scripts/columnstoreAlias new file mode 100644 index 000000000..bf34a4e9a --- /dev/null +++ b/oam/install_scripts/columnstoreAlias @@ -0,0 +1,13 @@ +# InfiniDB Alias Commands +# +alias mcsmysql='/usr/local/Calpont/mysql/bin/mysql --defaults-file=/usr/local/Calpont/mysql/my.cnf -u root' +alias ma=/usr/local/Calpont/bin/mcsadmin +alias mcsadmin=/usr/local/Calpont/bin/mcsadmin +alias home='cd /usr/local/Calpont/' +alias log='cd /var/log/Calpont/' +alias core='cd /var/log/Calpont/corefiles' +alias tmsg='tail -f /var/log/messages' +alias tdebug='tail -f /var/log/Calpont/debug.log' +alias tinfo='tail -f /var/log/Calpont/info.log' +alias dbrm='cd /usr/local/Calpont/data1/systemFiles/dbrm' +alias module='cat /usr/local/Calpont/local/module' diff --git a/oam/install_scripts/columnstoreInstall.sh b/oam/install_scripts/columnstoreInstall.sh new file mode 100755 index 000000000..60474f042 --- /dev/null +++ b/oam/install_scripts/columnstoreInstall.sh @@ -0,0 +1,167 @@ +#!/usr/bin/expect +# +# $Id$ +# +# Install Package on system + +set timeout 30 +set USERNAME "root" +set RPMVERSION " " +set PASSWORD " " +set MYSQLPASSWORD dummymysqlpw +set PACKAGE " " +set CONFIGFILE " " +set DEBUG 0 +set NODEPS "-h" +set INSTALLDIR "/usr/local/MariaDB/Columnstore" + +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 "'calpontInstaller.sh' performs a system install of the Calpont InfiniDB Packages\n" + send_user "from the /root/ directory. These Packages would have already been installed\n" + send_user "on the local Module.\n" + send_user "Usage: calpontInstaller.sh -v 'infinidb-version' -p 'password' -t 'package-type' -c 'config-file'-m 'mysql-password' -d\n" + send_user " infinidb-version - InfiniDB Version, i.e. 1.0.0-1\n" + send_user " password - root password on the servers being installed'\n" + send_user " package-type - Package Type being installed (rpm, deb, or binary)\n" + send_user " config-file - Optional: Calpont.xml config file with directory location, i.e. /root/Calpont.xml\n" + send_user " Default version is $INSTALLDIR/etc/Calpont.xml.rpmsave\n" + send_user " mysql-password - MySQL password on the servers being installed'\n" + send_user " -d - Debug flag, output verbose information\n" + exit 0 + } elseif { $arg($i) == "-v" } { + incr i + set RPMVERSION $arg($i) + } elseif { $arg($i) == "-p" } { + incr i + set PASSWORD $arg($i) + } elseif { $arg($i) == "-t" } { + incr i + set PACKAGE $arg($i) + } elseif { $arg($i) == "-c" } { + incr i + set CONFIGFILE $arg($i) + } elseif { $arg($i) == "-d" } { + set DEBUG 1 + } elseif { $arg($i) == "-f" } { + set NODEPS "--nodeps" + } elseif { $arg($i) == "-m" } { + incr i + set MYSQLPASSWORD $arg($i) + } elseif { $arg($i) == "-i" } { + incr i + set INSTALLDIR $arg($i) + } elseif { $arg($i) == "-u" } { + incr i + set USERNAME $arg($i) + } + incr i +} + +log_user $DEBUG + +set timeout 2 +send "$INSTALLDIR/bin/infinidb status\n" +expect { + "is running" { puts "InfiniDB is running, can't run calpontInstall.sh while InfiniDB is running. Exiting..\n"; + exit 1 + } +} + +if { $CONFIGFILE == " " } { + set CONFIGFILE $INSTALLDIR/etc/Calpont.xml.rpmsave +} + +if { [catch { open $CONFIGFILE "r"} handle ] } { + puts "Calpont Config file not found: $CONFIGFILE"; exit 1 +} + +exec rm -f $INSTALLDIR/etc/Calpont.xml.new > /dev/null 2>&1 +exec mv -f $INSTALLDIR/etc/Calpont.xml $INSTALLDIR/etc/Calpont.xml.new > /dev/null 2>&1 +exec /bin/cp -f $CONFIGFILE $INSTALLDIR/etc/Calpont.xml > /dev/null 2>&1 + +set timeout 2 +set INSTALL 2 +send "$INSTALLDIR/bin/getConfig DBRM_Controller NumWorkers\n" +expect { + 1 { set INSTALL 1 + set PASSWORD "dummy" + set RPMVERSION "rpm" } +} + + +if { $INSTALL == "2" && $PASSWORD == " "} {puts "please enter the remote server root password, enter ./calpontInstaller.sh -h for additional info"; exit 1} + +if { $INSTALL == "2" && $RPMVERSION == " " } {puts "please enter Package version, enter ./calpontInstaller.sh -h for additional info"; exit 1} + +send_user "\n" + +if { $INSTALL == "2" } { + if { $PACKAGE == "rpm" } { + set CALPONTPACKAGE1 /root/infinidb-libs-$RPMVERSION*.rpm + set CALPONTPACKAGE2 /root/infinidb-platform-$RPMVERSION*.rpm + set CALPONTPACKAGE3 /root/infinidb-enterprise-$RPMVERSION*.rpm + set CONNECTORPACKAGE1 /root/infinidb-mysql-$RPMVERSION*.rpm + set CONNECTORPACKAGE2 /root/infinidb-storage-engine-$RPMVERSION*.rpm + send_user "Installing InfiniDB Packages: $CALPONTPACKAGE1, $CALPONTPACKAGE2, $CALPONTPACKAGE3, $CONNECTORPACKAGE1, $CONNECTORPACKAGE2\n\n" + set EEPKG "rpm" + } elseif { $PACKAGE == "deb" } { + set CALPONTPACKAGE1 /root/infinidb-libs_$RPMVERSION*.deb + set CALPONTPACKAGE2 /root/infinidb-platform_$RPMVERSION*.deb + set CALPONTPACKAGE3 /root/infinidb-enterprise_$RPMVERSION*.deb + set CONNECTORPACKAGE1 /root/infinidb-mysql_$RPMVERSION*.deb + set CONNECTORPACKAGE2 /root/infinidb-storage-engine_$RPMVERSION*.deb + send_user "Installing InfiniDB Packages: $CALPONTPACKAGE1, $CALPONTPACKAGE2, $CALPONTPACKAGE3, $CONNECTORPACKAGE1, $CONNECTORPACKAGE2\n\n" + set EEPKG "deb" + } elseif { $PACKAGE == "binary" } { + set CALPONTPACKAGE /root/infinidb-ent-$RPMVERSION*bin.tar.gz + set CONNECTORPACKAGE1 "nopkg" + set CONNECTORPACKAGE2 "nopkg" + send_user "Installing InfiniDB Package: $CALPONTPACKAGE\n\n" + set EEPKG "binary" + } else { + puts "please enter Valid Package Type, enter ./calpontInstaller.sh -h for additional info"; exit 1 + } +} else { + set CALPONTPACKAGE1 "dummy.rpm" + set CALPONTPACKAGE2 "dummy.rpm" + set CALPONTPACKAGE3 "dummy.rpm" + set CONNECTORPACKAGE1 "dummy.rpm" + set CONNECTORPACKAGE2 "dummy.rpm" + set EEPKG "rpm" +} + +send_user "Performing InfiniDB System Install, please wait...\n" + +send "$INSTALLDIR/bin/setConfig -d Installation EEPackageType $EEPKG\n" +expect { + -re {[$#] } { } +} + +send_user "\n" +set timeout 600 +# +# Run installer +# +send "$INSTALLDIR/bin/installer $CALPONTPACKAGE1 $CALPONTPACKAGE2 $CALPONTPACKAGE3 $CONNECTORPACKAGE1 $CONNECTORPACKAGE2 initial $PASSWORD n $NODEPS $MYSQLPASSWORD $DEBUG\n" +expect { + "InfiniDB Install Successfully Completed" { } + "ERROR" { send_user "FAILED: error returned from installer, execute with debug mode on to determine error\n" ; exit 1 } + "Enter MySQL password" { send_user "FAILED: a MySQL password is set\n" ; exit 1 } + timeout { send_user "FAILED: Timeout while running installer, execute with debug mode on to determine error\n" ; exit 1 } +} + +send_user "\nCalpont Package System Install Completed\n\n" + +exit 0 +# vim:ts=4 sw=4: + diff --git a/oam/install_scripts/columnstoreLogRotate b/oam/install_scripts/columnstoreLogRotate new file mode 100644 index 000000000..48dec8381 --- /dev/null +++ b/oam/install_scripts/columnstoreLogRotate @@ -0,0 +1,35 @@ +# +# Calpont Log Rotate file that gets installed in /etc/logrotate.d +# as part of the RPM installation +# + +/var/log/Calpont/*.log { + missingok + rotate 7 + daily + dateext + copytruncate + olddir /var/log/Calpont/archive +} +/var/log/Calpont/*.log1 { + missingok + rotate 7 + daily + nocreate + compress + olddir /var/log/Calpont/archive +} +/usr/local/Calpont/etc/Calpont.xml { + daily + dateext + copy + olddir /usr/local/Calpont/etc/ +} +/usr/local/Calpont/mysql/db/*.err { + missingok + rotate 7 + daily + dateext + copytruncate + olddir /usr/local/Calpont/mysql/db +} diff --git a/oam/install_scripts/columnstoreSyslog b/oam/install_scripts/columnstoreSyslog new file mode 100644 index 000000000..8bc56eb3e --- /dev/null +++ b/oam/install_scripts/columnstoreSyslog @@ -0,0 +1,7 @@ +# Calpont Database Platform Logging +local1.=crit -/var/log/Calpont/crit.log +local1.=err -/var/log/Calpont/err.log +local1.=warning -/var/log/Calpont/warning.log +local1.=info -/var/log/Calpont/info.log +local1.=debug -/var/log/Calpont/debug.log +local2.=crit -/var/log/Calpont/data/data_mods.log diff --git a/oam/install_scripts/columnstoreSyslog-ng b/oam/install_scripts/columnstoreSyslog-ng new file mode 100755 index 000000000..6b7051bf7 --- /dev/null +++ b/oam/install_scripts/columnstoreSyslog-ng @@ -0,0 +1,78 @@ +# Calpont Database Platform Logging + +source s_infinidb { + # message generated by Syslog-NG + internal(); + # standard Linux log source (this is the default place for the syslog() + # function to send logs to) + unix-stream("/dev/log"); + # messages from the kernel + file("/proc/kmsg" log_prefix("kernel: ")); + # use the following line if you want to receive remote UDP logging messages + # (this is equivalent to the "-r" syslogd flag) + # udp(); +}; + +filter f_local1crit { facility(local1) and level(crit); }; +filter f_local1err { facility(local1) and level(err); }; +filter f_local1warning { facility(local1) and level(warning); }; +filter f_local1info { facility(local1) and level(info); }; +filter f_local1debug { facility(local1) and level(debug); }; +filter f_local2crit { facility(local2) and level(crit); }; + +destination d_crit{ + file("/var/log/Calpont/crit.log"); +}; + +destination d_err{ + file("/var/log/Calpont/err.log"); +}; + +destination d_warning{ + file("/var/log/Calpont/warning.log"); +}; + +destination d_info{ + file("/var/log/Calpont/info.log"); +}; + +destination d_debug{ + file("/var/log/Calpont/debug.log"); +}; + +destination d_data_mods{ + file("/var/log/Calpont/data/data_mods.log"); +}; + +log{ + source(s_infinidb); + filter(f_local1crit); + destination(d_crit); +}; + +log{ + source(s_infinidb); + filter(f_local1err); + destination(d_err); +}; +log{ + source(s_infinidb); + filter(f_local1warning); + destination(d_warning); +}; +log{ + source(s_infinidb); + filter(f_local1info); + destination(d_info); +}; +log{ + source(s_infinidb); + filter(f_local1debug); + destination(d_debug); +}; +log{ + source(s_infinidb); + filter(f_local2crit); + destination(d_data_mods); +}; + diff --git a/oam/install_scripts/columnstoreSyslog7 b/oam/install_scripts/columnstoreSyslog7 new file mode 100644 index 000000000..e5dcd33b9 --- /dev/null +++ b/oam/install_scripts/columnstoreSyslog7 @@ -0,0 +1,8 @@ +# Calpont Database Platform Logging +local1.crit -/var/log/Calpont/crit.log +local1.err -/var/log/Calpont/err.log +local1.warning -/var/log/Calpont/warning.log +local1.info -/var/log/Calpont/info.log +local1.debug -/var/log/Calpont/debug.log +local2.crit -/var/log/Calpont/data/data_mods.log + diff --git a/oam/install_scripts/columnstoreUninstall.sh b/oam/install_scripts/columnstoreUninstall.sh new file mode 100755 index 000000000..59c285a72 --- /dev/null +++ b/oam/install_scripts/columnstoreUninstall.sh @@ -0,0 +1,118 @@ +#!/usr/bin/expect +# +# $Id$ +# +# Uninstall Package from system + +set INFINIDB_INSTALL_DIR "/usr/local/MariaDB/Columnstore" +set env(INFINIDB_INSTALL_DIR) $INFINIDB_INSTALL_DIR + +set USERNAME $env(USER) +set PASSWORD " " +set DEBUG 0 + +set INFINIDBRPM1 "infinidb-libs" +set INFINIDBRPM2 "infinidb-platform" +set INFINIDBRPM3 "infinidb-enterprise" +set CONNECTORRPM1 "infinidb-mysql" +set CONNECTORRPM2 "infinidb-storage-engine" + +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 "'calpontUninstall.sh' performs a system uninstall of the Calpont InfiniDB Packages.\n" + send_user "It will perform a shutdown of the InfiniDB software and the \n" + send_user "remove the Packages from all configured servers of the InfiniDB System.\n" + send_user "\n" + send_user "Usage: calpontUninstall.sh -p 'password' -d\n" + send_user " password - root password of the remote servers being un-installed'\n" + send_user " -d - Debug flag, output verbose information\n" + exit + } elseif { $arg($i) == "-p" } { + incr i + set PASSWORD $arg($i) + } elseif { $arg($i) == "-d" } { + set DEBUG 1 + } elseif { $arg($i) == "-i" } { + incr i + set INSTALLDIR $arg($i) + } elseif { $arg($i) == "-u" } { + incr i + set USERNAME $arg($i) + } + incr i +} + +log_user $DEBUG + +set timeout 2 +set INSTALL 2 +send "$INFINIDB_INSTALL_DIR/bin/getConfig DBRM_Controller NumWorkers\n" +expect { + 1 { set INSTALL 1 } +} + +set PACKAGE "rpm" +send "$INFINIDB_INSTALL_DIR/bin/getConfig Installation EEPackageType\n" +expect { + rpm { set PACKAGE rpm } + deb { set PACKAGE deb } + binary { set PACKAGE binary } +} + +set timeout 60 +log_user $DEBUG +if { $INSTALL == "2" && $PASSWORD == " "} {puts "please enter the remote server root password, enter ./calpontUninstall.sh -h for additional info"; exit -1} + +send_user "\nPerforming InfiniDB System Uninstall\n\n" + +# +# shutdownSystem +# +send_user "Shutdown InfiniDB System " +expect -re {[$#] } +send "$INFINIDB_INSTALL_DIR/bin/mcsadmin shutdownsystem y\n" +expect { + "shutdownSystem " { send_user "DONE" } +} +send_user "\n" + + +if { $INSTALL == "2"} { + set timeout 600 + # + # Run installer + # + send_user "Run System Uninstaller " + send "$INFINIDB_INSTALL_DIR/bin/installer $INFINIDBRPM1 $INFINIDBRPM2 $INFINIDBRPM3 $CONNECTORRPM1 $CONNECTORRPM2 uninstall $PASSWORD n --nodeps dummymysqlpw $DEBUG\n" + expect { + "uninstall request successful" { send_user "DONE" } + "ERROR" { send_user "FAILED" ; exit -1 } + } + send_user "\n" +} + +if { $PACKAGE == "binary" } { + send "$INFINIDB_INSTALL_DIR/bin/pre-uninstall\n" + expect { + -re {[$#] } { } + } + + send_user "\n" + + send_user "\nCalpont Package System Uninstall Completed\n\n" + + exit 0 +} + +send_user "\nCalpont Package System Uninstall Completed\n\n" + +exit 0 diff --git a/oam/install_scripts/columnstore~ b/oam/install_scripts/columnstore~ new file mode 100644 index 000000000..cba5ddd4d --- /dev/null +++ b/oam/install_scripts/columnstore~ @@ -0,0 +1,184 @@ +#!/bin/bash +# +# $Id: infinidb 3704 2013-08-07 03:33:20Z bwilkinson $ +# +# infinidb Starts Calpont InfiniDB database platform +# +# +# chkconfig: 2345 99 99 +# description: Calpont InfiniDB is a database platform that utilizes Mysql +# +### BEGIN INIT INFO +# Provides: infinidb +# Required-Start: $local_fs $remote_fs $network $syslog $all +# Required-Stop: $local_fs $remote_fs $network $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start/stop InfiniDB DW DBMS +### END INIT INFO + +# Source function library. +if [ -f /etc/init.d/functions ]; then + . /etc/init.d/functions +fi + +if [ -z "$INFINIDB_INSTALL_DIR" ]; then + test -f /etc/default/infinidb && . /etc/default/infinidb +fi + +if [ -z "$INFINIDB_INSTALL_DIR" ]; then + INFINIDB_INSTALL_DIR=/usr/local/Calpont +fi + +export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR + +InstallDir=$INFINIDB_INSTALL_DIR + +if [ $InstallDir != "/usr/local/Calpont" ]; then + export PATH=$InstallDir/bin:$InstallDir/mysql/bin:/bin:/usr/bin + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$InstallDir/lib:$InstallDir/mysql/lib/mysql +fi + +#hadoop +plugin=`$INFINIDB_INSTALL_DIR/bin/getConfig SystemConfig DataFilePlugin` +if [ -n "$plugin" ]; then + setenv=`$InstallDir/bin/getConfig SystemConfig DataFileEnvFile` + . $InstallDir/bin/$setenv >/dev/null 2>&1 +fi + +if [ -e $InstallDir/lib/libjemalloc.so ]; then + export LD_PRELOAD=$InstallDir/lib/libjemalloc.so +elif [ -e $InstallDir/lib/libjemalloc.so.1 ]; then + export LD_PRELOAD=$InstallDir/lib/libjemalloc.so.1 +fi + +test -f $InstallDir/post/functions && . $InstallDir/post/functions + +mt=`module_type` +mid=`module_id` + +has_um=`$InstallDir/bin/getConfig SystemModuleConfig ModuleCount2` +if [ "x$has_um" = x ]; then + has_um=0 +fi + +user=$USER +if [ -z "$user" ]; then + user=root +fi + +checkInstallSetup() { + InitialInstallFlag=`$InstallDir/bin/getConfig -c $InstallDir/etc/Calpont.xml Installation InitialInstallFlag` + if [ $InitialInstallFlag != "y" ]; then + echo "Please run the postConfigure install script, check the Installation Guide" + echo "for additional details" + rm -f /var/lock/subsys/infinidb + exit 1 + fi +} + +[ -f $InstallDir/bin/ProcMon ] || exit 0 + +start() { + if [ -f /var/lock/subsys/infinidb ]; then + echo "InfiniDB Database Platform already running" + exit 0 + fi + + (mkdir -p /var/lock/subsys && touch /var/lock/subsys/infinidb) >/dev/null 2>&1 + + if [ -x $InstallDir/bin/infinidb.pre-start ]; then + $InstallDir/bin/infinidb.pre-start + if [ $? -ne 0 ]; then + echo "Error running InfiniDB pre-start script, not starting InfiniDB" + rm -f /var/lock/subsys/infinidb + exit 1 + fi + fi + checkInstallSetup + + CoreFileFlag=`$InstallDir/bin/getConfig -c $InstallDir/etc/Calpont.xml Installation CoreFileFlag` + if [ $CoreFileFlag = "y" ]; then + SUDO= + if [ "$user" != "root" ]; then + SUDO="sudo" + fi + + #infinidb core files + $SUDO ulimit -c unlimited > /dev/null 2>&1 + $SUDO sysctl -q -w kernel.core_uses_pid=1 > /dev/null 2>&1 + $SUDO sysctl -q -w kernel.core_pattern=/var/log/Calpont/corefiles/core.%e.%p > /dev/null 2>&1 + fi + + RETVAL=0 + echo "Starting InfiniDB Database Platform" + rm -f /tmp/StopCalpont + exec $InstallDir/bin/run.sh $InstallDir/bin/ProcMon > /dev/null 2>&1 & + + return $RETVAL +} +stop() { + echo "Shutting down InfiniDB Database Platform" + touch /tmp/StopCalpont + pkill -9 ProcMon + pkill -9 ProcMgr + pkill -9 snmptrapd + sleep 1 + $InstallDir/bin/clearShm + RETVAL=$? + rm -f /var/lock/subsys/infinidb + fuser -k 8604/tcp > /dev/null 2>&1 + test -f $InstallDir/mysql/mysql-Calpont || return $RETVAL + $InstallDir/mysql/mysql-Calpont stop > /dev/null 2>&1 + if [ -x $InstallDir/bin/infinidb.post-stop ]; then + $InstallDir/bin/infinidb.post-stop + fi + return $RETVAL +} +restart() { + stop + start +} +status() { + isrunning=0 + if [ $EUID -eq 0 ]; then + if [ -f /var/lock/subsys/infinidb ]; then + isrunning=1 + fi + else + pgrep ProcMon >/dev/null 2>&1 + if [ $? -eq 0 ]; then + isrunning=1 + fi + fi + if [ $isrunning -ne 0 ]; then + echo "InfiniDB is running" + else + echo "InfiniDB is not running" + exit 3 + fi +} + +case "$1" in +start) + start + ;; +stop) + stop + ;; +restart) + restart + ;; +condrestart) + [ -f /var/lock/subsys/infinidb ] && restart || : + ;; +status) + status + ;; +*) + echo $"Usage: $0 {start|stop|restart|condrestart|status}" + exit 1 +esac + +exit $? + diff --git a/oam/install_scripts/director_installer.sh b/oam/install_scripts/director_installer.sh index 6ccb8c98d..d10bd1cbe 100755 --- a/oam/install_scripts/director_installer.sh +++ b/oam/install_scripts/director_installer.sh @@ -20,7 +20,7 @@ set CALPONTMYSQLRPM [lindex $argv 6] set CALPONTMYSQLDRPM [lindex $argv 7] set INSTALLTYPE [lindex $argv 8] set DEBUG [lindex $argv 9] -set INSTALLDIR "/usr/local/Calpont" +set INSTALLDIR "/usr/local/MariaDB/Columnstore" set IDIR [lindex $argv 10] if { $IDIR != "" } { set INSTALLDIR $IDIR diff --git a/oam/install_scripts/disable-rep-columnstore.sh b/oam/install_scripts/disable-rep-columnstore.sh new file mode 100644 index 000000000..edd3fc19a --- /dev/null +++ b/oam/install_scripts/disable-rep-columnstore.sh @@ -0,0 +1,74 @@ +#!/bin/bash +# +# $Id$ +# +# generic InfiniDB Disable Replication script. +# +# Notes: This script gets run by ProcMon: + +# check log for error +checkForError() { + grep ERROR /tmp/disable-rep-status.log > /tmp/error.check + if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then + echo "ERROR: check log file: /tmp/disable-rep-status.log" + rm -f /tmp/error.check + exit 1 + fi + rm -f /tmp/error.check +} + +prefix=/usr/local +installdir=$prefix/MariaDB/Columnstore +pwprompt= +for arg in "$@"; do + if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then + prefix="`echo $arg | awk -F= '{print $2}'`" + installdir=$prefix/MariaDB/Columnstore + elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then + password="`echo $arg | awk -F= '{print $2}'`" + pwprompt="--password=$password" + elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then + installdir="`echo $arg | awk -F= '{print $2}'`" + prefix=`dirname $installdir` + fi +done + +test -f $installdir/post/functions && . $installdir/post/functions + +>/tmp/disable-rep-status.log + +# +# Run stop slave command +# +echo "Run stop slave command" >>/tmp/disable-rep-status.log +cat >/tmp/idb_disable-rep.sql <>/tmp/disable-rep-status.log +$installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/disable-rep-status.log + +checkForError + +# +# Run reset slave command +# +echo "Run start slave command" >>/tmp/disable-rep-status.log +cat >/tmp/idb_disable-rep.sql <>/tmp/disable-rep-status.log +$installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/disable-rep-status.log + +checkForError + +#alls good, 'OK' for success +echo "OK" +exit 0 diff --git a/oam/install_scripts/disable-rep-infinidb.sh b/oam/install_scripts/disable-rep-infinidb.sh index ba8090f1f..edd3fc19a 100644 --- a/oam/install_scripts/disable-rep-infinidb.sh +++ b/oam/install_scripts/disable-rep-infinidb.sh @@ -18,12 +18,12 @@ checkForError() { } prefix=/usr/local -installdir=$prefix/Calpont +installdir=$prefix/MariaDB/Columnstore pwprompt= for arg in "$@"; do if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then prefix="`echo $arg | awk -F= '{print $2}'`" - installdir=$prefix/Calpont + installdir=$prefix/MariaDB/Columnstore elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then password="`echo $arg | awk -F= '{print $2}'`" pwprompt="--password=$password" diff --git a/oam/install_scripts/install-columnstore.sh b/oam/install_scripts/install-columnstore.sh new file mode 100755 index 000000000..d19d0090d --- /dev/null +++ b/oam/install_scripts/install-columnstore.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# +# $Id: install-infinidb.sh 421 2007-04-05 15:46:55Z dhill $ +# +# install-infinidb.sh dummy EE version + +echo " " 1>&2 +echo " This install-infinidb.sh script is only used to install the Community Edition." 1>&2 +echo " Please use the 'postConfigure' for installing the Enterprise Edition." 1>&2 +echo " Check the Calpont InfiniDB Installation Document for further details." 1>&2 + +exit 1 + diff --git a/oam/install_scripts/install_scripts.kdevelop b/oam/install_scripts/install_scripts.kdevelop new file mode 100644 index 000000000..73f404ef2 --- /dev/null +++ b/oam/install_scripts/install_scripts.kdevelop @@ -0,0 +1,102 @@ + + + + + dhill@srvhill04.calpont.com + $VERSION$ + KDevCustomProject + C + + + + + install_scripts + executable + + + + + + + + + + ada + ada_bugs_gcc + bash + bash_bugs + clanlib + fortran_bugs_gcc + gnome1 + gnustep + gtk + gtk_bugs + haskell + haskell_bugs_ghc + java_bugs_gcc + java_bugs_sun + kde2book + libstdc++ + opengl + pascal_bugs_fp + php + php_bugs + perl + perl_bugs + python + python_bugs + qt-kdev3 + ruby + ruby_bugs + sdl + stl + sw + w3c-dom-level2-html + w3c-svg + w3c-uaag10 + wxwidgets_bugs + + + Guide to the Qt Translation Tools + Qt Assistant Manual + Qt Designer Manual + Qt Reference Documentation + qmake User Guide + + + KDE Libraries (Doxygen) + + + + + + + + + + + + + true + true + true + false + true + true + true + 250 + 400 + 250 + + + + + false + false + + + *.o,*.lo,CVS + false + + + diff --git a/oam/install_scripts/install_scripts.kdevelop.filelist b/oam/install_scripts/install_scripts.kdevelop.filelist new file mode 100644 index 000000000..b565523cc --- /dev/null +++ b/oam/install_scripts/install_scripts.kdevelop.filelist @@ -0,0 +1,4 @@ +# KDevelop Custom Project File List +Makefile +Makefile.am +Makefile.in diff --git a/oam/install_scripts/install_scripts.kdevelop.pcs b/oam/install_scripts/install_scripts.kdevelop.pcs new file mode 100644 index 000000000..164edbc42 Binary files /dev/null and b/oam/install_scripts/install_scripts.kdevelop.pcs differ diff --git a/oam/install_scripts/install_scripts.kdevses b/oam/install_scripts/install_scripts.kdevses new file mode 100644 index 000000000..06482d2a3 --- /dev/null +++ b/oam/install_scripts/install_scripts.kdevses @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/oam/install_scripts/master-rep-columnstore.sh b/oam/install_scripts/master-rep-columnstore.sh new file mode 100644 index 000000000..f6a4a5d0f --- /dev/null +++ b/oam/install_scripts/master-rep-columnstore.sh @@ -0,0 +1,112 @@ +#!/bin/bash +# +# $Id$ +# +# generic InfiniDB Master Replication script. +# +# Notes: This script gets run by ProcMon during installs and upgrades: + +# check log for error +checkForError() { + grep ERROR /tmp/master-rep-status-$hostipaddr.log > /tmp/error.check + if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then + echo "ERROR: check log file: /tmp/master-rep-status-$hostipaddr.log" + rm -f /tmp/error.check + exit 1 + fi + rm -f /tmp/error.check +} + +prefix=/usr/local +installdir=$prefix/MariaDB/Columnstore +pwprompt= +for arg in "$@"; do + if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then + prefix="`echo $arg | awk -F= '{print $2}'`" + installdir=$prefix/MariaDB/Columnstore + elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then + password="`echo $arg | awk -F= '{print $2}'`" + pwprompt="--password=$password" + elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then + installdir="`echo $arg | awk -F= '{print $2}'`" + prefix=`dirname $installdir` + elif [ `expr -- "$arg" : '--hostIP='` -eq 9 ]; then + hostipaddr="`echo $arg | awk -F= '{print $2}'`" + fi +done + +test -f $installdir/post/functions && . $installdir/post/functions + +repUser="idbrep" +password="Calpont1" + +>/tmp/master-rep-status-$hostipaddr.log + +# +# Create Replication User +# +echo "Create Replication User $repUser for node $hostipaddr" >>/tmp/master-rep-status-$hostipaddr.log +cat >/tmp/idb_master-rep.sql <>/tmp/master-rep-status-$hostipaddr.log +$installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/master-rep-status-$hostipaddr.log + +checkForError + +# +# Grant table access for created user +# +echo "Grant table access for $repUser for node $hostipaddr" >>/tmp/master-rep-status-$hostipaddr.log +cat >/tmp/idb_master-rep.sql <>/tmp/master-rep-status-$hostipaddr.log +$installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/master-rep-status-$hostipaddr.log + +checkForError + +# +# Run SHOW MASTER STATUS +# +echo "Run SHOW MASTER STATUS to node log" >>/tmp/master-rep-status-$hostipaddr.log +cat >/tmp/idb_master-rep.sql <>/tmp/master-rep-status-$hostipaddr.log +$installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/master-rep-status-$hostipaddr.log + +checkForError + +echo "Run SHOW MASTER STATUS to master status log /tmp/show-master-status.log" >>/tmp/master-rep-status-$hostipaddr.log +cat >/tmp/idb_master-rep.sql </tmp/show-master-status.log +$installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/show-master-status.log + + +#alls good, 'OK' for success +echo "OK" +exit 0 + + diff --git a/oam/install_scripts/master-rep-infinidb.sh b/oam/install_scripts/master-rep-infinidb.sh index 5c32b4e3d..f6a4a5d0f 100644 --- a/oam/install_scripts/master-rep-infinidb.sh +++ b/oam/install_scripts/master-rep-infinidb.sh @@ -18,12 +18,12 @@ checkForError() { } prefix=/usr/local -installdir=$prefix/Calpont +installdir=$prefix/MariaDB/Columnstore pwprompt= for arg in "$@"; do if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then prefix="`echo $arg | awk -F= '{print $2}'`" - installdir=$prefix/Calpont + installdir=$prefix/MariaDB/Columnstore elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then password="`echo $arg | awk -F= '{print $2}'`" pwprompt="--password=$password" diff --git a/oam/install_scripts/module_installer.sh b/oam/install_scripts/module_installer.sh index 69531940e..8a4ad0c0a 100755 --- a/oam/install_scripts/module_installer.sh +++ b/oam/install_scripts/module_installer.sh @@ -5,12 +5,12 @@ # Setup the Custom OS files during a System install on a module # # -# append calpont OS files to Linux OS file +# append columnstore OS files to Linux OS file # # prefix=/usr/local -installdir=$prefix/Calpont +installdir=$prefix/MariaDB/Columnstore rpmmode=install user=$USER if [ -z "$user" ]; then @@ -22,7 +22,7 @@ shiftcnt=0 for arg in "$@"; do if [ $(expr -- "$arg" : '--prefix=') -eq 9 ]; then prefix="$(echo $arg | awk -F= '{print $2}')" - installdir=$prefix/Calpont + installdir=$prefix/MariaDB/Columnstore ((shiftcnt++)) elif [ $(expr -- "$arg" : '--rpmmode=') -eq 10 ]; then rpmmode="$(echo $arg | awk -F= '{print $2}')" @@ -47,7 +47,7 @@ for arg in "$@"; do done shift $shiftcnt -if [ $installdir != "/usr/local/Calpont" ]; then +if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFINIDB_INSTALL_DIR/lib:$INFINIDB_INSTALL_DIR/mysql/lib/mysql fi @@ -60,8 +60,8 @@ if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then if test -f $INFINIDB_INSTALL_DIR/local/etc/pm1/fstab ; then echo "Setup fstab on Module" touch /etc/fstab - rm -f /etc/fstab.calpontSave - mv /etc/fstab /etc/fstab.calpontSave + rm -f /etc/fstab.columnstoreSave + mv /etc/fstab /etc/fstab.columnstoreSave cat $INFINIDB_INSTALL_DIR/local/etc/pm1/fstab >> /etc/fstab fi fi @@ -97,17 +97,17 @@ if [ $module = "pm" ]; then fi echo "Setup rc.local on Module" -if [ $EUID -eq 0 -a -f $INFINIDB_INSTALL_DIR/local/rc.local.calpont ]; then +if [ $EUID -eq 0 -a -f $INFINIDB_INSTALL_DIR/local/rc.local.columnstore ]; then if [ $user = "root" ]; then touch /etc/rc.local - rm -f /etc/rc.local.calpontSave - cp /etc/rc.local /etc/rc.local.calpontSave - cat $INFINIDB_INSTALL_DIR/local/rc.local.calpont >> /etc/rc.local + rm -f /etc/rc.local.columnstoreSave + cp /etc/rc.local /etc/rc.local.columnstoreSave + cat $INFINIDB_INSTALL_DIR/local/rc.local.columnstore >> /etc/rc.local else sudo touch /etc/rc.local - sudo rm -f /etc/rc.local.calpontSave - sudo cp /etc/rc.local /etc/rc.local.calpontSave - sudo cat $INFINIDB_INSTALL_DIR/local/rc.local.calpont >> /etc/rc.local + sudo rm -f /etc/rc.local.columnstoreSave + sudo cp /etc/rc.local /etc/rc.local.columnstoreSave + sudo cat $INFINIDB_INSTALL_DIR/local/rc.local.columnstore >> /etc/rc.local fi fi diff --git a/oam/install_scripts/module_installer.sh~ b/oam/install_scripts/module_installer.sh~ new file mode 100755 index 000000000..cec9428fb --- /dev/null +++ b/oam/install_scripts/module_installer.sh~ @@ -0,0 +1,167 @@ +#!/bin/bash +# +# $Id: module_installer.sh 421 2007-04-05 15:46:55Z dhill $ +# +# Setup the Custom OS files during a System install on a module +# +# +# append calpont OS files to Linux OS file +# +# + +prefix=/usr/local +installdir=$prefix/MariaDB/Columnstore +rpmmode=install +user=$USER +if [ -z "$user" ]; then + user=root +fi +quiet=0 +shiftcnt=0 + +for arg in "$@"; do + if [ $(expr -- "$arg" : '--prefix=') -eq 9 ]; then + prefix="$(echo $arg | awk -F= '{print $2}')" + installdir=$prefix/MariaDB/Columnstore + ((shiftcnt++)) + elif [ $(expr -- "$arg" : '--rpmmode=') -eq 10 ]; then + rpmmode="$(echo $arg | awk -F= '{print $2}')" + ((shiftcnt++)) + elif [ $(expr -- "$arg" : '--installdir=') -eq 13 ]; then + installdir="$(echo $arg | awk -F= '{print $2}')" + prefix=$(dirname $installdir) + ((shiftcnt++)) + elif [ $(expr -- "$arg" : '--user=') -eq 7 ]; then + user="$(echo $arg | awk -F= '{print $2}')" + ((shiftcnt++)) + elif [ $(expr -- "$arg" : '--quiet') -eq 7 ]; then + quiet=1 + ((shiftcnt++)) + elif [ $(expr -- "$arg" : '--port') -eq 6 ]; then + mysqlPort="$(echo $arg | awk -F= '{print $2}')" + ((shiftcnt++)) + elif [ $(expr -- "$arg" : '--module') -eq 8 ]; then + module="$(echo $arg | awk -F= '{print $2}')" + ((shiftcnt++)) + fi +done +shift $shiftcnt + +if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFINIDB_INSTALL_DIR/lib:$INFINIDB_INSTALL_DIR/mysql/lib/mysql +fi + +export INFINIDB_INSTALL_DIR=$installdir + +cloud=`$INFINIDB_INSTALL_DIR/bin/getConfig Installation Cloud` +if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then + cp $INFINIDB_INSTALL_DIR/local/etc/*.pem /root/. > /dev/null 2>&1 + + if test -f $INFINIDB_INSTALL_DIR/local/etc/pm1/fstab ; then + echo "Setup fstab on Module" + touch /etc/fstab + rm -f /etc/fstab.calpontSave + mv /etc/fstab /etc/fstab.calpontSave + cat $INFINIDB_INSTALL_DIR/local/etc/pm1/fstab >> /etc/fstab + fi +fi + +test -f $INFINIDB_INSTALL_DIR/post/functions && . $INFINIDB_INSTALL_DIR/post/functions + +mid=`module_id` + +#if um, cloud, separate system type, external um storage, then setup mount +if [ $module = "um" ]; then + if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then + systemtype=`$INFINIDB_INSTALL_DIR/bin/getConfig Installation ServerTypeInstall` + if [ $systemtype = "1" ]; then + umstoragetype=`$INFINIDB_INSTALL_DIR/bin/getConfig Installation UMStorageType` + if [ $umstoragetype = "external" ]; then + echo "Setup UM Volume Mount" + device=`$INFINIDB_INSTALL_DIR/bin/getConfig Installation UMVolumeDeviceName$mid` + mkdir -p $INFINIDB_INSTALL_DIR/mysql/db > /dev/null 2>&1 + mount $device $INFINIDB_INSTALL_DIR/mysql/db -t ext2 -o defaults + chown mysql:mysql -R $INFINIDB_INSTALL_DIR/mysql > /dev/null 2>&1 + fi + fi + fi +fi + +#if pm, create dbroot directories +if [ $module = "pm" ]; then + numdbroots=`$INFINIDB_INSTALL_DIR/bin/getConfig SystemConfig DBRootCount` + for (( id=1; id<$numdbroots+1; id++ )); do + mkdir -p $INFINIDB_INSTALL_DIR/data$id > /dev/null 2>&1 + chmod 755 $INFINIDB_INSTALL_DIR/data$id + done +fi + +echo "Setup rc.local on Module" +if [ $EUID -eq 0 -a -f $INFINIDB_INSTALL_DIR/local/rc.local.calpont ]; then + if [ $user = "root" ]; then + touch /etc/rc.local + rm -f /etc/rc.local.calpontSave + cp /etc/rc.local /etc/rc.local.calpontSave + cat $INFINIDB_INSTALL_DIR/local/rc.local.calpont >> /etc/rc.local + else + sudo touch /etc/rc.local + sudo rm -f /etc/rc.local.calpontSave + sudo cp /etc/rc.local /etc/rc.local.calpontSave + sudo cat $INFINIDB_INSTALL_DIR/local/rc.local.calpont >> /etc/rc.local + fi +fi + +if [ $user != "root" ]; then + echo "Setup .bashrc on Module for non-root" + + eval userhome=~$user + bashFile=$userhome/.bashrc + touch ${bashFile} + + echo " " >> ${bashFile} + echo "export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR" >> ${bashFile} + echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFINIDB_INSTALL_DIR/lib:$INFINIDB_INSTALL_DIR/mysql/lib/mysql" >> ${bashFile} +fi + +plugin=`$INFINIDB_INSTALL_DIR/bin/getConfig SystemConfig DataFilePlugin` +if [ -n "$plugin" ]; then + echo "Setup .bashrc on Module for local-query" + + setenv=`$INFINIDB_INSTALL_DIR/bin/getConfig SystemConfig DataFileEnvFile` + + eval userhome=~$user + bashFile=$userhome/.bashrc + touch ${bashFile} + + echo " " >> ${bashFile} + echo ". $INFINIDB_INSTALL_DIR/bin/$setenv" >> ${bashFile} +fi + +# if mysqlrep is on and module has a my.cnf file, upgrade it + +MySQLRep=`$INFINIDB_INSTALL_DIR/bin/getConfig Installation MySQLRep` +if [ $MySQLRep = "y" ]; then + if test -f $INFINIDB_INSTALL_DIR/mysql/my.cnf ; then + echo "Run Upgrade on my.cnf on Module" + $INFINIDB_INSTALL_DIR/bin/mycnfUpgrade > /tmp/mycnfUpgrade.log 2>&1 + fi +fi + +if test -f $INFINIDB_INSTALL_DIR/mysql/my.cnf ; then + echo "Run Mysql Port update on my.cnf on Module" + $INFINIDB_INSTALL_DIR/bin/mycnfUpgrade $mysqlPort > /tmp/mycnfUpgrade_port.log 2>&1 +fi + +# if um, run mysql install scripts +if [ $module = "um" ]; then + echo "Run post-mysqld-install" + $INFINIDB_INSTALL_DIR/bin/post-mysqld-install > /tmp/post-mysqld-install.log 2>&1 + echo "Run post-mysql-install" + $INFINIDB_INSTALL_DIR/bin/post-mysql-install > /tmp/post-mysql-install.log 2>&1 +fi + + +echo " " +echo "!!!Module Installation Successfully Completed!!!" + +exit 0 diff --git a/oam/install_scripts/performance_installer.sh b/oam/install_scripts/performance_installer.sh index ae47890be..bc9e7a6ef 100644 --- a/oam/install_scripts/performance_installer.sh +++ b/oam/install_scripts/performance_installer.sh @@ -19,7 +19,7 @@ set INSTALLTYPE [lindex $argv 4] set PKGTYPE [lindex $argv 5] set NODEPS [lindex $argv 6] set DEBUG [lindex $argv 7] -set INSTALLDIR "/usr/local/Calpont" +set INSTALLDIR "/usr/local/MariaDB/Columnstore" set IDIR [lindex $argv 8] if { $IDIR != "" } { set INSTALLDIR $IDIR diff --git a/oam/install_scripts/post-install b/oam/install_scripts/post-install index b73bee865..c55bab2ec 100755 --- a/oam/install_scripts/post-install +++ b/oam/install_scripts/post-install @@ -2,10 +2,10 @@ # # $Id: post-install 3705 2013-08-07 19:47:20Z dhill $ # -# Post-install steps for calpont install +# Post-install steps for columnstore install prefix=/usr/local -installdir=$prefix/Calpont +installdir=$prefix/MariaDB/Columnstore rpmmode=install user=$USER if [ -z "$user" ]; then @@ -16,7 +16,7 @@ quiet=0 for arg in "$@"; do if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then prefix="`echo $arg | awk -F= '{print $2}'`" - installdir=$prefix/Calpont + installdir=$prefix/MariaDB/Columnstore elif [ `expr -- "$arg" : '--rpmmode='` -eq 10 ]; then rpmmode="`echo $arg | awk -F= '{print $2}'`" elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then @@ -33,7 +33,7 @@ for arg in "$@"; do fi done -if [ $installdir != "/usr/local/Calpont" ]; then +if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then export INFINIDB_INSTALL_DIR=$installdir export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib else @@ -141,7 +141,7 @@ mkdir /var/log/Calpont/data/archive > /dev/null 2>&1 # install Calpont Log Rotate File test -d $installdir/mysql/db || mkdir -p $installdir/mysql/db -cp $installdir/bin/calpontLogRotate /etc/logrotate.d/calpont > /dev/null 2>&1 +cp $installdir/bin/columnstoreLogRotate /etc/logrotate.d/columnstore > /dev/null 2>&1 rm -rf $installdir/mysql/db/infinidb_log_archive > /dev/null 2>&1 # delete Calpont shared memory segments @@ -174,7 +174,7 @@ else sudo rm -f /var/lock/subsys/mysql-Calpont sudo rm -f /tmp/StopCalpont - sed -i -e s@/usr/local/Calpont@$installdir@g $installdir/bin/infinidb.def + sed -i -e s@/usr/local/MariaDB/Columnstore@$installdir@g $installdir/bin/infinidb.def sudo cp $installdir/bin/infinidb.def /etc/default/infinidb fi @@ -188,17 +188,17 @@ fi eval userhome=~$user bashFile=$userhome/.bashrc touch ${bashFile} -if [ $installdir != "/usr/local/Calpont" ]; then - sed -i -e s@/usr/local/Calpont@$installdir@g $installdir/bin/calpontAlias +if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then + sed -i -e s@/usr/local/MariaDB/Columnstore@$installdir@g $installdir/bin/columnstoreAlias fi egrep -qs 'Calpont Database Platform Alias Commands' ${bashFile} rc1=$? egrep -qs 'InfiniDB Alias Commands' ${bashFile} rc2=$? if [ $rc1 -ne 0 -a $rc2 -ne 0 ]; then - rm -f ${bashFile}.calpontSave - cp ${bashFile} ${bashFile}.calpontSave >/dev/null 2>&1 - cat $installdir/bin/calpontAlias >> ${bashFile} + rm -f ${bashFile}.columnstoreSave + cp ${bashFile} ${bashFile}.columnstoreSave >/dev/null 2>&1 + cat $installdir/bin/columnstoreAlias >> ${bashFile} echo " " >> ${bashFile} fi @@ -221,7 +221,7 @@ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib $installdir/bin/cplogger -i 19 hadoop=`which hadoop 2>/dev/null` if [ -z $hadoop ]; then #check for non-root user - if [ $installdir != "/usr/local/Calpont" -a $quiet -eq 0 ]; then + if [ $installdir != "/usr/local/MariaDB/Columnstore" -a $quiet -eq 0 ]; then cat <&2 + fi +done + +if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then + export INFINIDB_INSTALL_DIR=$installdir + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib +else + # add library config file + /bin/cp -f $installdir/bin/infinidb.conf /etc/ld.so.conf.d/. + ldconfig +fi + +#check 64-bit OS compatiable +arch=`uname -m` +patcnt=`expr "$arch" : 'i.86'` +is64bitos=1 +if [ $patcnt -ne 0 ]; then + is64bitos=0 +fi +is64bitpkg=1 +file $installdir/bin/PrimProc | grep '64-bit' >/dev/null 2>&1 +if [ $? -ne 0 ]; then + is64bitpkg=0 +fi +if [ $is64bitpkg -eq 1 -a $is64bitos -ne 1 ]; then + echo "ERROR: Incompatiable Version, package is intended for a x86_64 architecture" + echo "exiting...." + exit 1 +fi + +if [ ! -f $installdir/etc/Calpont.xml ]; then + echo "$installdir/etc/Calpont.xml not found, exiting" + exit 1 +fi + +cd $installdir/lib || exit 1 +for lib in *.so.1.0.0; do + blib=`basename $lib .1.0.0` + ln -sf $lib $blib +done +chown -h $user.$user *.so >/dev/null 2>&1 +if [ -f libnetsnmp.so.5.2.1 ]; then + for lib in *.so.5.2.1; do + blib=`basename $lib .5.2.1` + ln -sf $lib $blib + ln -sf $lib ${blib}.5 + done + chown -h $user.$user *.so *.so.5 >/dev/null 2>&1 +fi +if [ -f libstdc++.so.6.0.14 ]; then + ln -sf libstdc++.so.6.0.14 libstdc++.so.6 + chown -h $user.$user libstdc++.so.6 >/dev/null 2>&1 +fi + +ln -sf libjemalloc.so.3.3.0 libjemalloc.so +chown -h $user.$user libjemalloc.so >/dev/null 2>&1 + +# TODO-based on early experience with HDP it doesn't install bigtop +# so the code below will not correctly detect JAVA_HOME. Need to +# decide how to handle +# Autodetect JAVA_HOME if not defined +#if [ -e /usr/libexec/bigtop-detect-javahome ]; then +#. /usr/libexec/bigtop-detect-javahome +#elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then +#. /usr/lib/bigtop-utils/bigtop-detect-javahome +#fi +#ln -sf $JAVA_HOME/jre/lib/amd64/server/libjvm.so +#chown -h $user.$user libjvm.so >/dev/null 2>&1 + +cd / + +test -d /var/log/Calpont || mkdir /var/log/Calpont >/dev/null 2>&1 +test -d /var/log/Calpont/archive || mkdir /var/log/Calpont/archive >/dev/null 2>&1 +test -d /var/log/Calpont/corefiles || mkdir /var/log/Calpont/corefiles >/dev/null 2>&1 +test -d /var/log/Calpont/trace || mkdir /var/log/Calpont/trace >/dev/null 2>&1 +test -h /var/log/Calpont/data && rm -f /var/log/Calpont/data +test -d /var/log/Calpont/data || mkdir /var/log/Calpont/data >/dev/null 2>&1 +# make sure trace dir is world-writable and sticky +chmod 1755 /var/log/Calpont/trace >/dev/null 2>&1 +test -d $installdir/data || mkdir $installdir/data +test -d $installdir/data1 || mkdir $installdir/data1 +test -d $installdir/data1/systemFiles || mkdir $installdir/data1/systemFiles +test -d $installdir/data1/systemFiles/dbrm || mkdir $installdir/data1/systemFiles/dbrm +test -d $installdir/data1/systemFiles/dataTransaction || rmdir $installdir/data1/systemFiles/dataTransaction >/dev/null 2>&1 +test -d $installdir/data1/systemFiles/dataTransaction/archive || rmdir $installdir/data1/systemFiles/dataTransaction/archive >/dev/null 2>&1 +chmod 1755 $installdir/data1 >/dev/null 2>&1 +chmod -R 1755 $installdir/data1/systemFiles >/dev/null 2>&1 +chmod 1755 $installdir/etc > /dev/null 2>&1 + +#create the bulk-load dirs +mkdir -p $installdir/data/bulk/data/import >/dev/null 2>&1 +mkdir -p $installdir/data/bulk/log >/dev/null 2>&1 +mkdir -p $installdir/data/bulk/job >/dev/null 2>&1 +mkdir -p $installdir/data/bulk/rollback >/dev/null 2>&1 +mkdir -p $installdir/data/bulk/tmpjob >/dev/null 2>&1 +rm -f $installdir/data/bulk/tmpjob/* >/dev/null 2>&1 +chmod -R 755 $installdir/data/bulk >/dev/null 2>&1 + +#create infinidb temp file directory +mkdir -p /tmp/infinidb_tmp_files >/dev/null 2>&1 + +#setup core file directory and link +mkdir /var/log/Calpont/corefiles > /dev/null 2>&1 +chmod 755 /var/log/Calpont/corefiles > /dev/null 2>&1 + +#create mount directories +mkdir /mnt/tmp > /dev/null 2>&1 +mkdir /var/log/Calpont/data/archive > /dev/null 2>&1 + +# install Calpont Log Rotate File +test -d $installdir/mysql/db || mkdir -p $installdir/mysql/db +cp $installdir/bin/calpontLogRotate /etc/logrotate.d/calpont > /dev/null 2>&1 +rm -rf $installdir/mysql/db/infinidb_log_archive > /dev/null 2>&1 + +# delete Calpont shared memory segments +$installdir/bin/Calpont/bin/clearShm > /dev/null 2>&1 + +#setup the infinidb service script +rm -f /etc/init.d/infinidb >/dev/null 2>&1 +cp $installdir/bin/infinidb /etc/init.d >/dev/null 2>&1 +if [ -x /sbin/chkconfig ]; then + /sbin/chkconfig --add infinidb > /dev/null 2>&1 + /sbin/chkconfig infinidb on > /dev/null 2>&1 +elif [ -x /usr/sbin/update-rc.d ]; then + /usr/sbin/update-rc.d infinidb defaults 99 > /dev/null 2>&1 +else + echo "" + echo "Package 'chkconfig' or 'update-rc.d' not installed, contact your sysadmin if you want to setup to autostart for infinidb" +fi + +#setup InfiniDB system logging +if [ $user = "root" ]; then + $installdir/bin/syslogSetup.sh install > /tmp/syslog_install.log 2>&1 + chmod 777 -R /dev/shm + rm -f /etc/default/infinidb +else + sudo $installdir/bin/syslogSetup.sh --installdir=$installdir install > /tmp/syslog_install.log 2>&1 + sudo chown $user:$user $installdir/etc/Calpont.xml + sudo chmod 755 /var/log + sudo chmod -R 755 /var/log/Calpont + sudo chmod -R 777 /dev/shm + sudo rm -f /var/lock/subsys/mysql-Calpont + sudo rm -f /tmp/StopCalpont + + sed -i -e s@/usr/local/MariaDB/Columnstore@$installdir@g $installdir/bin/infinidb.def + sudo cp $installdir/bin/infinidb.def /etc/default/infinidb +fi + +#check if InfiniDB system logging was setup +cat /tmp/syslog_install.log | grep 'No System Logging' >/dev/null 2>&1 +if [ $? -eq 0 ]; then + cat /tmp/syslog_install.log +fi + +#setup alias commands +eval userhome=~$user +bashFile=$userhome/.bashrc +touch ${bashFile} +if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then + sed -i -e s@/usr/local/MariaDB/Columnstore@$installdir@g $installdir/bin/calpontAlias +fi +egrep -qs 'Calpont Database Platform Alias Commands' ${bashFile} +rc1=$? +egrep -qs 'InfiniDB Alias Commands' ${bashFile} +rc2=$? +if [ $rc1 -ne 0 -a $rc2 -ne 0 ]; then + rm -f ${bashFile}.calpontSave + cp ${bashFile} ${bashFile}.calpontSave >/dev/null 2>&1 + cat $installdir/bin/calpontAlias >> ${bashFile} + echo " " >> ${bashFile} +fi + +#check and get amazon EC2 env variables +if [ -n "$EC2_HOME" ]; then + $installdir/bin/setConfig -d Installation EC2_HOME $EC2_HOME + + if [ -n "$EC2_HOME" ]; then + $installdir/bin/setConfig -d Installation JAVA_HOME $JAVA_HOME + fi + + $installdir/bin/setConfig -d Installation EC2_PATH $PATH:/home/ec2/bin:/opt/aws/bin +fi + +#log install message +test -f $installdir/post/functions && . $installdir/post/functions +LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib $installdir/bin/cplogger -i 19 "***** InfiniDB Installed *****" + +#setup hadoop +hadoop=`which hadoop 2>/dev/null` +if [ -z $hadoop ]; then + #check for non-root user + if [ $installdir != "/usr/local/MariaDB/Columnstore" -a $quiet -eq 0 ]; then +cat < /tmp/hdfs-20-test.log 2>&1 + if [ $? -eq 0 ]; then + #Passed set in config file + $installdir/bin/setConfig -d SystemConfig DataFilePlugin $installdir/lib/hdfs-20.so + $installdir/bin/setConfig -d SystemConfig DataFileEnvFile setenv-hdfs-20 + + #check for non-root user + if [ $installdir != "/usr/local/MariaDB/Columnstore" -a $quiet -eq 0 ]; then +cat < /tmp/hdfs-12-test.log 2>&1 + if [ $? -eq 0 ]; then + #Passed set in config file + $installdir/bin/setConfig -d SystemConfig DataFilePlugin $installdir/lib/hdfs-12.so + $installdir/bin/setConfig -d SystemConfig DataFileEnvFile setenv-hdfs-12 + + if [ $installdir != "/usr/local/MariaDB/Columnstore" -a $quiet -eq 0 ]; then +cat <&2 + fi +done + +#stop services +$installdir/bin/infinidb stop > /dev/null 2>&1 +if test -f /etc/init.d/calpont-Mysql ; then + $installdir/myql/calpont-Mysql stop > /dev/null 2>&1 +fi + +if [ $installdir == "/usr/local/MariaDB/Columnstore" ]; then + # remove library config file + rm -f /etc/ld.so.conf.d/infinidb.conf + rm -f /etc/ld.so.cache + ldconfig +fi + +# uninstall OS scripts updated by postConfigure +if test -f /root/.bashrc.calpontSave ; then + $sudo mv -f /root/.bashrc.calpontSave /root/.bashrc > /dev/null 2>&1 +fi +if test -f /etc/exports.calpontSave ; then + $sudo mv -f /etc/exports.calpontSave /etc/exports > /dev/null 2>&1 +else + $sudo rm -f /etc/exports > /dev/null 2>&1 +fi +if test -f /etc/rc.d/rc.local.calpontSave ; then + $sudo mv -f /etc/rc.d/rc.local.calpontSave /etc/rc.d/rc.local > /dev/null 2>&1 +fi +if test -f /etc/rc.local.calpontSave ; then + $sudo mv -f /etc/rc.local.calpontSave /etc/rc.local > /dev/null 2>&1 +fi + +export INFINIDB_INSTALL_DIR=$installdir + +cloud=`$INFINIDB_INSTALL_DIR/bin/getConfig Installation Cloud` +if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then + if test -f /etc/fstab ; then + $sudo sed -i '/Calpont\/data/d' /etc/fstab > /dev/null 2>&1 + fi +fi + +#remove log file directories +#rm -rf /var/log/Calpont > /dev/null 2>&1 +#rm -f $installdir/mysql/db/*.err > /dev/null 2>&1 +rm -f /var/log/Calpont/activeAlarms > /dev/null 2>&1 +rm -f /var/log/Calpont/*.log1 > /dev/null 2>&1 +rm -rf $installdir/mysql/db/infinidb_log_archive > /dev/null 2>&1 +sudo rm -f /etc/default/infinidb + +# remove Calpont Log Rotate File abd Transaction Log File +rm -f /etc/logrotate.d/calpont > /dev/null 2>&1 +rm -f /etc/cron.d/transactionLog > /dev/null 2>&1 + +# delete Calpont shared memory segments +pkill -9 ProcMon +$installdir/bin/clearShm > /dev/null 2>&1 + +# delete prat files +rm -f /etc/cron.d/ps > /dev/null 2>&1 +rm -f /etc/pscollect > /dev/null 2>&1 +/etc/init.d/crond reload > /dev/null 2>&1 +systemctl reload crond.service > /dev/null 2>&1 + +# delete tmp files +rm -f $installdir/local/*.calpont +rm -rf $installdir/local/etc/ +rm -rf /tmp/bucketreuse +rm -f /tmp/calpont.txt +rm -f /tmp/dbbuilder.* +rm -f /tmp/dbrmfiles +rm -f /var/lock/subsys/infinidb +rm -f /tmp/pkgcheck +rm -f /tmp/upgrade-status.log.* +rm -f /tmp/mount.log +rm -f $installdir/data/bulk/tmpjob/* >/dev/null 2>&1 +rm -rf /tmp/infinidb_tmp_files +rm -f $installdir/local/moveDbrootTransactionLog + +#delete any old setenv files under home directory +if [ $user = "root" ]; then + rm -f /root/setenv-hdfs* +else + rm -f /home/$user/setenv-hdfs* +fi + +# delete core files +#rm -f /var/log/Calpont/corefiles/* > /dev/null 2>&1 + +#uninstall InfiniDB system logging +if [ -x $installdir/bin/syslogSetup.sh ]; then + if [ $user = "root" ]; then + $installdir/bin/syslogSetup.sh uninstall >/dev/null 2>&1 + rm -f /etc/init.d/infinidb > /dev/null 2>&1 + else + sudo $installdir/bin/syslogSetup.sh uninstall >/dev/null 2>&1 + fi +fi + +if [ -x /sbin/chkconfig ]; then + /sbin/chkconfig infinidb off > /dev/null 2>&1 + /sbin/chkconfig --del infinidb > /dev/null 2>&1 +elif [ -x /usr/sbin/update-rc.d ]; then + /usr/sbin/update-rc.d -f infinidb remove > /dev/null 2>&1 +fi + +if [ $quiet != 1 ]; then + #make copy of Calpont.xml + /bin/cp -f $installdir/etc/Calpont.xml $installdir/etc/Calpont.xml.rpmsave > /dev/null 2>&1 + /bin/cp -f $installdir/mysql/my.cnf $installdir/mysql/my.cnf.rpmsave > /dev/null 2>&1 +fi + +#umount file systems +if [ $user = "root" ]; then + rm -f $installdir/data*/OAMdbrootCheck > /dev/null 2>&1 +else + sudo rm -f $installdir/data*/OAMdbrootCheck > /dev/null 2>&1 +fi + +#tell user to run post configure script +echo " " +echo "Calpont uninstall completed" + +exit 0 + diff --git a/oam/install_scripts/remote_installer.sh b/oam/install_scripts/remote_installer.sh index c701ab198..9d1e4f608 100755 --- a/oam/install_scripts/remote_installer.sh +++ b/oam/install_scripts/remote_installer.sh @@ -86,7 +86,7 @@ send_user "\n" # copy over custom OS files # send_user "Copy Custom OS files to Module" -send "scp /usr/local/Calpont/local/etc/$MODULE/* $USERNAME@$SERVER:/etc/.\n" +send "scp /usr/local/MariaDB/Columnstore/local/etc/$MODULE/* $USERNAME@$SERVER:/etc/.\n" expect -re "word: " # send the password send "$PASSWORD\n" diff --git a/oam/install_scripts/slave-rep-columnstore.sh b/oam/install_scripts/slave-rep-columnstore.sh new file mode 100644 index 000000000..3b3e1bd3c --- /dev/null +++ b/oam/install_scripts/slave-rep-columnstore.sh @@ -0,0 +1,119 @@ +#!/bin/bash +# +# $Id$ +# +# generic InfiniDB Slave Replication script. +# +# Notes: This script gets run by ProcMon during installs and upgrades: + +# check log for error +checkForError() { + grep ERROR /tmp/slave-rep-status.log > /tmp/error.check + if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then + echo "ERROR: check log file: /tmp/slave-rep-status.log" + rm -f /tmp/error.check + exit 1 + fi + rm -f /tmp/error.check +} + +prefix=/usr/local +installdir=$prefix/MariaDB/Columnstore +pwprompt= +for arg in "$@"; do + if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then + prefix="`echo $arg | awk -F= '{print $2}'`" + installdir=$prefix/MariaDB/Columnstore + elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then + password="`echo $arg | awk -F= '{print $2}'`" + pwprompt="--password=$password" + elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then + installdir="`echo $arg | awk -F= '{print $2}'`" + prefix=`dirname $installdir` + elif [ `expr -- "$arg" : '--masteripaddr='` -eq 15 ]; then + masteripaddr="`echo $arg | awk -F= '{print $2}'`" + elif [ `expr -- "$arg" : '--masterlogfile='` -eq 16 ]; then + masterlogfile="`echo $arg | awk -F= '{print $2}'`" + elif [ `expr -- "$arg" : '--masterlogpos='` -eq 15 ]; then + masterlogpos="`echo $arg | awk -F= '{print $2}'`" + elif [ `expr -- "$arg" : '--port='` -eq 7 ]; then + port="`echo $arg | awk -F= '{print $2}'`" + fi +done + +test -f $installdir/post/functions && . $installdir/post/functions + +repUser="idbrep" +password="Calpont1" + +>/tmp/slave-rep-status.log + +# +# Run stop slave command +# +echo "Run stop slave command" >>/tmp/slave-rep-status.log +cat >/tmp/idb_slave-rep.sql <>/tmp/slave-rep-status.log +$installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/slave-rep-status.log + +# +# Run Change Master Command +# +echo "Run Change Master Command" >>/tmp/slave-rep-status.log +cat >/tmp/idb_slave-rep.sql <>/tmp/slave-rep-status.log +$installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/slave-rep-status.log + +# +# Run start slave command +# +echo "Run start slave command" >>/tmp/slave-rep-status.log +cat >/tmp/idb_slave-rep.sql <>/tmp/slave-rep-status.log +$installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/slave-rep-status.log + +# +# Run SHOW SLAVE STATUS +# +echo "Run SHOW SLAVE STATUS to node log" >>/tmp/slave-rep-status.log +cat >/tmp/idb_slave-rep.sql <>/tmp/slave-rep-status.log +$installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/slave-rep-status.log + +checkForError + +#alls good, 'OK' for success +echo "OK" +exit 0 diff --git a/oam/install_scripts/slave-rep-infinidb.sh b/oam/install_scripts/slave-rep-infinidb.sh index 497a26512..3b3e1bd3c 100644 --- a/oam/install_scripts/slave-rep-infinidb.sh +++ b/oam/install_scripts/slave-rep-infinidb.sh @@ -18,12 +18,12 @@ checkForError() { } prefix=/usr/local -installdir=$prefix/Calpont +installdir=$prefix/MariaDB/Columnstore pwprompt= for arg in "$@"; do if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then prefix="`echo $arg | awk -F= '{print $2}'`" - installdir=$prefix/Calpont + installdir=$prefix/MariaDB/Columnstore elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then password="`echo $arg | awk -F= '{print $2}'`" pwprompt="--password=$password" diff --git a/oam/install_scripts/startupTests.sh b/oam/install_scripts/startupTests.sh index 8f7e3787c..5836af965 100755 --- a/oam/install_scripts/startupTests.sh +++ b/oam/install_scripts/startupTests.sh @@ -10,7 +10,7 @@ if [ -z "$INFINIDB_INSTALL_DIR" ]; then fi if [ -z "$INFINIDB_INSTALL_DIR" ]; then - INFINIDB_INSTALL_DIR=/usr/local/Calpont + INFINIDB_INSTALL_DIR=/usr/local/MariaDB/Columnstore fi export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR diff --git a/oam/install_scripts/syslogSetup.sh b/oam/install_scripts/syslogSetup.sh index 6d4d1477c..549ba01d6 100644 --- a/oam/install_scripts/syslogSetup.sh +++ b/oam/install_scripts/syslogSetup.sh @@ -8,14 +8,14 @@ test $EUID -eq 0 || exit 0 prefix=/usr/local -installdir=$prefix/Calpont +installdir=$prefix/MariaDB/Columnstore syslog_conf=nofile rsyslog7=0 for arg in "$@"; do if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then prefix="`echo $arg | awk -F= '{print $2}'`" - installdir=$prefix/Calpont + installdir=$prefix/MariaDB/Columnstore elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then installdir="`echo $arg | awk -F= '{print $2}'`" prefix=`dirname $installdir` @@ -30,13 +30,13 @@ for arg in "$@"; do shift done -if [ $installdir != "/usr/local/Calpont" ]; then +if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then export INFINIDB_INSTALL_DIR=$installdir export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFINIDB_INSTALL_DIR/lib fi -calpontSyslogFile=$installdir/bin/calpontSyslog -calpontSyslogFile7=$installdir/bin/calpontSyslog7 +columnstoreSyslogFile=$installdir/bin/columnstoreSyslog +columnstoreSyslogFile7=$installdir/bin/columnstoreSyslog7 checkSyslog() { #check which syslog daemon is being used @@ -84,7 +84,7 @@ fi if [ "$daemon" = "syslog-ng" ]; then if [ -f /etc/syslog-ng/syslog-ng.conf ]; then syslog_conf=/etc/syslog-ng/syslog-ng.conf - calpontSyslogFile=$installdir/bin/calpontSyslog-ng + columnstoreSyslogFile=$installdir/bin/columnstoreSyslog-ng echo "" echo "System logging being used: syslog-ng" echo "" @@ -128,7 +128,7 @@ elif [ "$daemon" = "syslog" ]; then echo "" elif [ -d /etc/syslog-ng/syslog-ng.conf ]; then syslog_conf=/etc/syslog-ng/syslog-ng.conf - calpontSyslogFile=$installdir/bin/calpontSyslog-ng + columnstoreSyslogFile=$installdir/bin/columnstoreSyslog-ng echo "" echo "System logging being used: syslog-ng" echo "" @@ -160,10 +160,10 @@ if [ ! -z "$syslog_conf" ] ; then rm -rf /etc/rsyslog.d/calpont.conf if [ $rsyslog7 == 1 ]; then rm -f /etc/rsyslog.d/49-calpont.conf - cat ${calpontSyslogFile7} >> ${syslog_conf} + cat ${columnstoreSyslogFile7} >> ${syslog_conf} chown syslog:adm /var/log/Calpont else - cat ${calpontSyslogFile} >> ${syslog_conf} + cat ${columnstoreSyslogFile} >> ${syslog_conf} fi fi diff --git a/oam/install_scripts/syslogSetup.sh~ b/oam/install_scripts/syslogSetup.sh~ new file mode 100644 index 000000000..60ac3c7bb --- /dev/null +++ b/oam/install_scripts/syslogSetup.sh~ @@ -0,0 +1,262 @@ +#!/bin/bash +# +# $Id: syslogSetup.sh 421 2007-04-05 15:46:55Z dhill $ +# +# syslogSetup.sh - install / uninstall Calpont InfiniDB system logging configuration + +# no point in going any further if not root... (only works in bash) +test $EUID -eq 0 || exit 0 + +prefix=/usr/local +installdir=$prefix/MariaDB/Columnstore +syslog_conf=nofile +rsyslog7=0 + +for arg in "$@"; do + if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then + prefix="`echo $arg | awk -F= '{print $2}'`" + installdir=$prefix/MariaDB/Columnstore + elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then + installdir="`echo $arg | awk -F= '{print $2}'`" + prefix=`dirname $installdir` + elif [ `expr -- "$arg" : '--..*'` -ge 3 ]; then + echo "ignoring unknown argument: $arg" 1>&2 + elif [ `expr -- "$arg" : '--'` -eq 2 ]; then + shift + break + else + break + fi + shift +done + +if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then + export INFINIDB_INSTALL_DIR=$installdir + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFINIDB_INSTALL_DIR/lib +fi + +calpontSyslogFile=$installdir/bin/calpontSyslog +calpontSyslogFile7=$installdir/bin/calpontSyslog7 + +checkSyslog() { +#check which syslog daemon is being used +#first check which is running +daemon="nodaemon" +cnt=`ps -ef | grep -v grep | grep syslog-ng | wc -l` +if [ $cnt -gt 0 ]; then + daemon="syslog-ng" +else cnt=`ps -ef | grep -v grep | grep rsyslog | wc -l` + if [ $cnt -ge 1 ]; then + daemon="rsyslog" + else cnt=`ps -ef | grep -v grep | grep syslogd | wc -l` + if [ $cnt -ge 1 ]; then + if [ "$daemon" != "rsyslog" ]; then + daemon=syslog + fi + fi + fi +fi + +#if none running, check installed +if [ "$daemon" = "nodaemon" ]; then + if [ -f /etc/init.d/syslog ]; then + daemon="syslog" + /etc/init.d/syslog start > /dev/null 2>&1 + elif [ -f /etc/init.d/rsyslog ]; then + daemon="rsyslog" + /etc/init.d/rsyslog start > /dev/null 2>&1 + elif [ -f /etc/init.d/syslog-ng ]; then + daemon="syslog-ng" + /etc/init.d/syslog-ng start > /dev/null 2>&1 + fi +fi + +#if none running or installed, exit +if [ "$daemon" = "nodaemon" ]; then + echo "" + echo "*** No System Logging Application found (syslog, rsyslog, or syslog-ng)" + echo "*** For InfiniDB System Logging functionality, install a System Logging package and reinstall InfiniDB" + echo "" + exit 1 +fi + +#check which syslog config file is installed +if [ "$daemon" = "syslog-ng" ]; then + if [ -f /etc/syslog-ng/syslog-ng.conf ]; then + syslog_conf=/etc/syslog-ng/syslog-ng.conf + calpontSyslogFile=$installdir/bin/calpontSyslog-ng + echo "" + echo "System logging being used: syslog-ng" + echo "" + fi +elif [ "$daemon" = "rsyslog" ]; then + #check if rsyslog version 7 or greater + rsyslogd -v > /tmp/rsyslog.ver + cnt=`grep "rsyslogd 7" /tmp/rsyslog.ver | wc -l` + if [ $cnt -gt 0 ]; then + rsyslog7=1 + fi + cnt=`grep "rsyslogd 8" /tmp/rsyslog.ver | wc -l` + if [ $cnt -gt 0 ]; then + rsyslog7=1 + fi + cnt=`grep "rsyslogd 9" /tmp/rsyslog.ver | wc -l` + if [ $cnt -gt 0 ]; then + rsyslog7=1 + fi + + if [ -f /etc/rsyslog.conf ]; then + cnt=`grep "/etc/rsyslog.d/" /etc/rsyslog.conf | wc -l` + if [ $cnt -gt 0 ]; then + if [ $rsyslog7 == 1 ]; then + syslog_conf=/etc/rsyslog.d/49-calpont.conf + else + syslog_conf=/etc/rsyslog.d/calpont.conf + fi + else + syslog_conf=/etc/rsyslog.conf + fi + echo "" + echo "System logging being used: rsyslog" + echo "" + fi +elif [ "$daemon" = "syslog" ]; then + if [ -f /etc/syslog.conf ]; then + syslog_conf=/etc/syslog.conf + echo "" + echo "System logging being used: syslog" + echo "" + elif [ -d /etc/syslog-ng/syslog-ng.conf ]; then + syslog_conf=/etc/syslog-ng/syslog-ng.conf + calpontSyslogFile=$installdir/bin/calpontSyslog-ng + echo "" + echo "System logging being used: syslog-ng" + echo "" + fi +else + echo "" + echo "*** No System Logging Application found (syslog, rsyslog, or syslog-ng)" + echo "*** For InfiniDB System Logging functionality, install a System Logging package and reinstall InfiniDB" + echo "" + exit 1 +fi + +} + +install() { +checkSyslog +if [ ! -z "$syslog_conf" ] ; then + $installdir/bin/setConfig -d Installation SystemLogConfigFile ${syslog_conf} >/dev/null 2>&1 + if [ "$syslog_conf" != /etc/rsyslog.d/calpont.conf ]; then + rm -f ${syslog_conf}.calpontSave + cp ${syslog_conf} ${syslog_conf}.calpontSave >/dev/null 2>&1 + sed -i '/# Calpont/,$d' ${syslog_conf}.calpontSave > /dev/null 2>&1 + fi + + egrep -qs 'Calpont Database Platform Logging' ${syslog_conf} + if [ $? -ne 0 ]; then + #set the syslog for calpont logging + # remove older version incase it was installed by previous build + rm -rf /etc/rsyslog.d/calpont.conf + if [ $rsyslog7 == 1 ]; then + rm -f /etc/rsyslog.d/49-calpont.conf + cat ${calpontSyslogFile7} >> ${syslog_conf} + chown syslog:adm /var/log/Calpont + else + cat ${calpontSyslogFile} >> ${syslog_conf} + fi + fi + + pkill -hup syslogd > /dev/null 2>&1 + pkill -hup syslog-ng > /dev/null 2>&1 + pkill -hup rsyslogd > /dev/null 2>&1 + /etc/init.d/rsyslog restart > /dev/null 2>&1 + systemctl restart rsyslog.service > /dev/null 2>&1 +fi + +} + +uninstall() { +checkSyslog +if [ ! -z "$syslog_conf" ] ; then + if [ "$syslog_conf" != /etc/rsyslog.d/calpont.conf ]; then + if [ "$syslog_conf" != /etc/rsyslog.d/49-calpont.conf ]; then + egrep -qs 'Calpont Database Platform Logging' ${syslog_conf} + if [ $? -eq 0 ]; then + if [ -f ${syslog_conf}.calpontSave ] ; then + #uninstall the syslog for calpont logging + mv -f ${syslog_conf} ${syslog_conf}.calpontBackup + mv -f ${syslog_conf}.calpontSave ${syslog_conf} >/dev/null 2>&1 + if [ ! -f ${syslog_conf} ] ; then + cp ${syslog_conf}.calpontBackup ${syslog_conf} + fi + fi + fi + sed -i '/# Calpont/,$d' ${syslog_conf} > /dev/null 2>&1 + else + rm -f "$syslog_conf" + fi + else + rm -f "$syslog_conf" + fi + + pkill -hup syslogd > /dev/null 2>&1 + pkill -hup syslog-ng > /dev/null 2>&1 + /etc/init.d/rsyslog restart > /dev/null 2>&1 + systemctl restart rsyslog.service > /dev/null 2>&1 + + $installdir/bin/setConfig -d Installation SystemLogConfigFile "unassigned" + +fi + +} + +status() { +checkSyslog +if [ ! -z "$syslog_conf" ] ; then + egrep -qs 'Calpont Database Platform Logging' ${syslog_conf} + if [ $? -eq 0 ]; then + echo $syslog_conf + else + echo "No System Log Config File configured for InfiniDB System Logging" + fi +fi +} + +check() { +test -f $installdir/post/functions && . $installdir/post/functions +number=$RANDOM +cplogger -i 100 "InfiniDB Log Test: $number" +sleep 3 +egrep -qs "InfiniDB Log Test: $number" /var/log/Calpont/info.log +if [ $? -eq 0 ]; then + echo "InfiniDB System Logging working" + exit 0 +else + echo "InfiniDB System Logging not working" + exit 1 +fi +} + + +case "$1" in + install) + install + ;; + uninstall) + uninstall + ;; + status) + status + ;; + check) + check + ;; + *) + echo $"Usage: $0 {install|uninstall|status|check)" + exit 1 +esac + + +exit 0 +/ diff --git a/oam/install_scripts/system_installer.sh b/oam/install_scripts/system_installer.sh index 241be291b..aa21998ca 100755 --- a/oam/install_scripts/system_installer.sh +++ b/oam/install_scripts/system_installer.sh @@ -129,7 +129,7 @@ if { $INSTALLTYPE == "initial"} { # copy over InfiniDB OS files # send_user "Copy InfiniDB OS files to Module " - send "scp /usr/local/Calpont/local/etc/$MODULE/* $USERNAME@$SERVER:/usr/local/Calpont/local/.\n" + send "scp /usr/local/MariaDB/Columnstore/local/etc/$MODULE/* $USERNAME@$SERVER:/usr/local/MariaDB/Columnstore/local/.\n" expect "word: " # send the password send "$PASSWORD\n" @@ -144,7 +144,7 @@ if { $INSTALLTYPE == "initial"} { # Start module installer to setup Customer OS files # send_user "Run Module Installer " - send "ssh $USERNAME@$SERVER '/usr/local/Calpont/bin/module_installer.sh'\n" + send "ssh $USERNAME@$SERVER '/usr/local/MariaDB/Columnstore/bin/module_installer.sh'\n" expect "word: " # send the password send "$PASSWORD\n" diff --git a/oam/install_scripts/upgrade-columnstore.sh b/oam/install_scripts/upgrade-columnstore.sh new file mode 100755 index 000000000..f56539873 --- /dev/null +++ b/oam/install_scripts/upgrade-columnstore.sh @@ -0,0 +1,444 @@ +#!/bin/bash +# +# $Id$ +# +# generic InfiniDB upgrade script. +# +# Notes: This script gets run every time InfiniDB starts up so it needs to be: +# 1) able to only do stuff once if needed and nothing if not needed +# 2) reasonably fast when there's nothing to do + +# check log for error +checkForError() { + grep ERROR /tmp/upgrade-status.log.$$ > /tmp/error.check + if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then + echo "ERROR: check log file: /tmp/upgrade-status.log.$$" + rm -f /tmp/error.check + exit 1; + fi + rm -f /tmp/error.check +} + +if [ "x$1" != xdoupgrade ]; then + echo "Don't run this script by hand! You probably want to use install-infinidb.sh." 1>&2 + exit 1 +fi + +prefix=/usr/local +installdir=$prefix/MariaDB/Columnstore +pwprompt= +for arg in "$@"; do + if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then + prefix="`echo $arg | awk -F= '{print $2}'`" + installdir=$prefix/MariaDB/Columnstore + elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then + password="`echo $arg | awk -F= '{print $2}'`" + pwprompt="--password=$password" + elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then + installdir="`echo $arg | awk -F= '{print $2}'`" + prefix=`dirname $installdir` + fi +done + +test -f $installdir/post/functions && . $installdir/post/functions + +mt=`module_type` +mid=`module_id` + +# for CE version +if [ -z "$mt" ]; then + mt=pm +fi +if [ -z "$mid" ]; then + mid=1 +fi + +has_um=`$installdir/bin/getConfig SystemModuleConfig ModuleCount2` +if [ -z "$has_um" ]; then + has_um=0 +fi + +>/tmp/upgrade-status.log.$$ +echo "mt = $mt" >>/tmp/upgrade-status.log.$$ +echo "mid = $mid" >>/tmp/upgrade-status.log.$$ +echo "has_um = $has_um" >>/tmp/upgrade-status.log.$$ + +#This upgrade only for UM or PM with no UM +if [ $has_um -eq 0 -o "x$mt" = xum ]; then + #--------------------------------------------------------------------------- + # See if compressiontype column is in SYSCOLUMN + #--------------------------------------------------------------------------- + echo "checking calpontsys for compressiontype..." >>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe syscolumn;' \ + calpontsys | grep compressiontype >>/tmp/upgrade-status.log.$$ 2>&1 + + # + # Add compressiontype column to SYSCOLUMN if applicable + # + if [ $? -ne 0 ]; then + echo "calpontsys needs upgrade for compressiontype" >>/tmp/upgrade-status.log.$$ + echo "added compressiontype column" >>/tmp/upgrade-status.log.$$ + cat >/tmp/idb_upgrade.sql <>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/upgrade-status.log.$$ 2>&1 + + checkForError + + if [ $mid -eq 1 ]; then + echo "update compressiontype to backend" >>/tmp/upgrade-status.log.$$ + cat >/tmp/idb_upgrade.sql <>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/upgrade-status.log.$$ 2>&1 + + checkForError + fi + + # + # Verify that compressiontype was successfully added to SYSCOLUMN + # + rm -f /tmp/idb_upgrade.sql + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe syscolumn;' \ + calpontsys | grep compressiontype >/tmp/upgrade-status-1.log 2>&1 + rc=$? + cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$ + if [ $rc -ne 0 ]; then + echo "FAILED adding compressiontype to SYSCOLUMN!" + exit 1 + fi + cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'` + rm -f /tmp/upgrade-status-1.log + if [ -z "$cnt" ]; then + cnt=0 + fi + if [ $cnt -ne 1 ]; then + echo "FAILED adding compressiontype to SYSCOLUMN!" + exit 1 + fi + + # + # Verify that compressiontype (OID 1041) was successfully added to BRM + # + if [ $has_um -eq 0 ]; then + $installdir/bin/editem -o1041 1>/tmp/upgrade-status-1.log 2>/dev/null + rc=$? + cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$ + if [ $rc -ne 0 ]; then + echo "FAILED adding compressiontype to BRM!" + exit 1 + fi + cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'` + rm -f /tmp/upgrade-status-1.log + if [ -z "$cnt" ]; then + cnt=0 + fi + if [ $cnt -lt 2 ]; then + echo "FAILED adding compressiontype to BRM!" + exit 1 + fi + fi + fi + + #--------------------------------------------------------------------------- + # See if autoincrement column is in SYSTABLE + #--------------------------------------------------------------------------- + echo "checking calpontsys for autoincrement..." >>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe systable;' \ + calpontsys | grep autoincrement >>/tmp/upgrade-status.log.$$ 2>&1 + + # + # Add autoincrement column to SYSTABLE if applicable + # + if [ $? -ne 0 ]; then + echo "calpontsys needs upgrade for autoincrement" >>/tmp/upgrade-status.log.$$ + echo "add autoincrement columns" >>/tmp/upgrade-status.log.$$ + cat >/tmp/idb_upgrade.sql <>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/upgrade-status.log.$$ 2>&1 + + checkForError + + if [ $mid -eq 1 ]; then + echo "update autoincrement to backend" >>/tmp/upgrade-status.log.$$ + cat >/tmp/idb_upgrade.sql <>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/upgrade-status.log.$$ 2>&1 + + checkForError + fi + + # + #Verify that autoincrement was successfully added to SYSTABLE + # + rm -f /tmp/idb_upgrade.sql + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe systable;' \ + calpontsys | grep autoincrement >/tmp/upgrade-status-1.log 2>&1 + rc=$? + cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$ + if [ $rc -ne 0 ]; then + echo "FAILED adding autoincrement to SYSTABLE!" + exit 1 + fi + cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'` + rm -f /tmp/upgrade-status-1.log + if [ -z "$cnt" ]; then + cnt=0 + fi + if [ $cnt -ne 1 ]; then + echo "FAILED adding autoincrement to SYSTABLE!" + exit 1 + fi + + # + # Verify that autoincrement (OID 1011) was successfully added to BRM + # + if [ $has_um -eq 0 ]; then + $installdir/bin/editem -o1011 1>/tmp/upgrade-status-1.log 2>/dev/null + rc=$? + cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$ + if [ $rc -ne 0 ]; then + echo "FAILED adding autoincrement to BRM!" + exit 1 + fi + cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'` + rm -f /tmp/upgrade-status-1.log + if [ "x$cnt" = x ]; then + cnt=0 + fi + if [ $cnt -lt 2 ]; then + echo "FAILED adding autoincrement to BRM!" + exit 1 + fi + fi + fi + + #--------------------------------------------------------------------------- + # See if nextvalue column is in SYSCOLUMN + #--------------------------------------------------------------------------- + echo "checking calpontsys for nextvalue..." >>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe syscolumn;' \ + calpontsys | grep nextvalue >>/tmp/upgrade-status.log.$$ 2>&1 + + # + # Add nextvalue column to SYSCOLUMN if applicable. + # Also set old autoincrement column in SYSCOLUMN to 'n'. + # + if [ $? -ne 0 ]; then + echo "calpontsys needs upgrade for nextvalue" >>/tmp/upgrade-status.log.$$ + echo "add nextvalue columns" >>/tmp/upgrade-status.log.$$ + cat >/tmp/idb_upgrade.sql <>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/upgrade-status.log.$$ 2>&1 + + checkForError + + if [ $mid -eq 1 ]; then + echo "update nextvalue to backend" >>/tmp/upgrade-status.log.$$ + cat >/tmp/idb_upgrade.sql <>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/upgrade-status.log.$$ 2>&1 + + checkForError + fi + + # + # Verify that nextvalue was successfully added to SYSCOLUMN + # + rm -f /tmp/idb_upgrade.sql + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe syscolumn;' \ + calpontsys | grep nextvalue >/tmp/upgrade-status-1.log 2>&1 + rc=$? + cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$ + if [ $rc -ne 0 ]; then + echo "FAILED adding nextvalue to SYSCOLUMN!" + exit 1 + fi + cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'` + rm -f /tmp/upgrade-status-1.log + if [ -z "$cnt" ]; then + cnt=0 + fi + if [ $cnt -ne 1 ]; then + echo "FAILED adding nextvalue to SYSCOLUMN!" + exit 1 + fi + + # + # Verify that nextvalue (OID 1042) was successfully added to BRM + # + if [ $has_um -eq 0 ]; then + $installdir/bin/editem -o1042 1>/tmp/upgrade-status-1.log 2>/dev/null + rc=$? + cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$ + if [ $rc -ne 0 ]; then + echo "FAILED adding nextvalue to BRM!" + exit 1 + fi + cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'` + rm -f /tmp/upgrade-status-1.log + if [ "x$cnt" = x ]; then + cnt=0 + fi + if [ $cnt -lt 2 ]; then + echo "FAILED adding nextvalue to BRM!" + exit 1 + fi + fi + fi + + #--------------------------------------------------------------------------- + # See if systable schema and tablename columns are varchar(128). + #--------------------------------------------------------------------------- + recreate=0 + echo "checking calpontsys.systable schema and tablename for varchar(128)..." >>/tmp/upgrade-status.log.$$ + colCount=` \ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe systable;' \ + calpontsys | egrep "schema|tablename" | grep "varchar(128)" | wc -l` + if [ $colCount -ne 2 ]; then + recreate=1 + echo "calpontsys needs upgrade to expand systable schema and tablename" >>/tmp/upgrade-status.log.$$ + fi + + #--------------------------------------------------------------------------- + # See if syscolumn schema, tablename, and columname columns are varchar(128). + #--------------------------------------------------------------------------- + if [ $recreate -eq 0 ]; then + echo "checking calpontsys.syscolumn schema, tablename, columnname for varchar(128)..." >>/tmp/upgrade-status.log.$$ + colCount=` \ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe syscolumn;' \ + calpontsys | egrep "schema|tablename|columnname" | grep "varchar(128)" | wc -l` + if [ $colCount -ne 3 ]; then + recreate=1 + echo "calpontsys needs upgrade to expand syscolumn schema, tablename, and columnname" >>/tmp/upgrade-status.log.$$ + fi + fi + + #--------------------------------------------------------------------------- + # See if defaultvalue column in SYSCOLUMN is varchar(64) + #--------------------------------------------------------------------------- + if [ $recreate -eq 0 ]; then + echo "checking calpontsys for defaultvalue varchar(64)..." >>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe syscolumn;' \ + calpontsys | grep defaultvalue | grep 'varchar(64)' >>/tmp/upgrade-status.log.$$ 2>&1 + if [ $? -ne 0 ]; then + recreate=1 + echo "calpontsys needs upgrade to change defaultvalue" >>/tmp/upgrade-status.log.$$ + fi + fi + + # + # Change defaultvalue column to varchar(64) if applicable + # + if [ $recreate -ne 0 ]; then + cat >/tmp/idb_upgrade.sql <>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys >/tmp/upgrade-status.log.$$ 2>&1 + + checkForError + + echo "create systable and syscolumn with schema sync only" >>/tmp/upgrade-status.log.$$ + cat $installdir/mysql/syscatalog_mysql.sql >>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + calpontsys <$installdir/mysql/syscatalog_mysql.sql >>/tmp/upgrade-status.log.$$ 2>&1 + + checkForError + + # + # Verify column widths: + # varchar(64) for syscolumn.defaultvalue + # varchar(128) for systable (schema, tablename) and syscolumn (schema, tablename, and columnname). + # + rm -f /tmp/idb_upgrade.sql + echo "verify column widths" >>/tmp/upgrade-status.log.$$ + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe syscolumn;' \ + calpontsys | grep defaultvalue | grep 'varchar(64)' >/tmp/upgrade-status-1.log 2>&1 + $installdir/mysql/bin/mysql \ + --defaults-file=$installdir/mysql/my.cnf \ + --user=root $pwprompt \ + --execute='describe systable; describe syscolumn;' \ + calpontsys | egrep "schema|tablename|columnname" | grep 'varchar(128)' >>/tmp/upgrade-status-1.log 2>&1 + cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$ + cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'` + rm -f /tmp/upgrade-status-1.log + if [ -z "$cnt" ]; then + cnt=0 + fi + if [ $cnt -ne 6 ]; then + echo "FAILED width of schema, tablename, columnname, defaultvalue verification!" + exit 1 + fi + fi +fi + +echo "OK" diff --git a/oam/install_scripts/upgrade-infinidb.sh b/oam/install_scripts/upgrade-infinidb.sh index 958848a56..f56539873 100755 --- a/oam/install_scripts/upgrade-infinidb.sh +++ b/oam/install_scripts/upgrade-infinidb.sh @@ -25,12 +25,12 @@ if [ "x$1" != xdoupgrade ]; then fi prefix=/usr/local -installdir=$prefix/Calpont +installdir=$prefix/MariaDB/Columnstore pwprompt= for arg in "$@"; do if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then prefix="`echo $arg | awk -F= '{print $2}'`" - installdir=$prefix/Calpont + installdir=$prefix/MariaDB/Columnstore elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then password="`echo $arg | awk -F= '{print $2}'`" pwprompt="--password=$password" diff --git a/oam/install_scripts/user_installer.sh b/oam/install_scripts/user_installer.sh index f1ec1226c..1e3986807 100644 --- a/oam/install_scripts/user_installer.sh +++ b/oam/install_scripts/user_installer.sh @@ -21,7 +21,7 @@ set NODEPS [lindex $argv 6] set MYSQLPW [lindex $argv 7] set MYSQLPORT [lindex $argv 8] set DEBUG [lindex $argv 9] -set INSTALLDIR "/usr/local/Calpont" +set INSTALLDIR "/usr/local/MariaDB/Columnstore" set IDIR [lindex $argv 10] if { $IDIR != "" } { set INSTALLDIR $IDIR diff --git a/oam/oamcpp/Makefile b/oam/oamcpp/Makefile index a611ea3b3..bc730ad2a 100755 --- a/oam/oamcpp/Makefile +++ b/oam/oamcpp/Makefile @@ -14,7 +14,7 @@ LIBRARY=$(PROGRAM).$(VERSION) CPPFLAGS=-I. -I$(EXPORT_ROOT)/include -I/usr/include/libxml2 CXXFLAGS+=$(DEBUG_FLAGS) -Wall -fpic -CLIBS=-L$(EXPORT_ROOT)/lib -loamcpp -lmessageqcpp -lloggingcpp -lconfigcpp -lxml2 -lsnmpmanager -lnetsnmpmibs -lnetsnmpagent -L/usr/local/Calpont/lib -lnetsnmp -lnetsnmphelpers -lcppunit -ldl -lrpm -lrwlock -lbrm +CLIBS=-L$(EXPORT_ROOT)/lib -loamcpp -lmessageqcpp -lloggingcpp -lconfigcpp -lxml2 -lsnmpmanager -lnetsnmpmibs -lnetsnmpagent -L/usr/local/MariaDB/Columnstore/lib -lnetsnmp -lnetsnmphelpers -lcppunit -ldl -lrpm -lrwlock -lbrm TLIBS=-L. -loamcpp $(CLIBS) GLIBS=$(CLIBS) diff --git a/oam/post/test-001.sh b/oam/post/test-001.sh index 1ba6f9bd6..3bf2926e0 100755 --- a/oam/post/test-001.sh +++ b/oam/post/test-001.sh @@ -7,7 +7,7 @@ if [ -z "$INFINIDB_INSTALL_DIR" ]; then fi if [ -z "$INFINIDB_INSTALL_DIR" ]; then - INFINIDB_INSTALL_DIR=/usr/local/Calpont + INFINIDB_INSTALL_DIR=/usr/local/MariaDB/Columnstore fi export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR diff --git a/oam/post/test-002.sh b/oam/post/test-002.sh index 00c65a77d..d61008611 100755 --- a/oam/post/test-002.sh +++ b/oam/post/test-002.sh @@ -7,7 +7,7 @@ if [ -z "$INFINIDB_INSTALL_DIR" ]; then fi if [ -z "$INFINIDB_INSTALL_DIR" ]; then - INFINIDB_INSTALL_DIR=/usr/local/Calpont + INFINIDB_INSTALL_DIR=/usr/local/MariaDB/Columnstore fi export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR diff --git a/oam/post/test-003.sh b/oam/post/test-003.sh index 16258b6f8..95ccdff07 100755 --- a/oam/post/test-003.sh +++ b/oam/post/test-003.sh @@ -7,7 +7,7 @@ if [ -z "$INFINIDB_INSTALL_DIR" ]; then fi if [ -z "$INFINIDB_INSTALL_DIR" ]; then - INFINIDB_INSTALL_DIR=/usr/local/Calpont + INFINIDB_INSTALL_DIR=/usr/local/MariaDB/Columnstore fi export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR diff --git a/oam/post/test-004.sh b/oam/post/test-004.sh index 0884cb5ae..d5bd326ad 100644 --- a/oam/post/test-004.sh +++ b/oam/post/test-004.sh @@ -11,7 +11,7 @@ if [ -z "$INFINIDB_INSTALL_DIR" ]; then fi if [ -z "$INFINIDB_INSTALL_DIR" ]; then - INFINIDB_INSTALL_DIR=/usr/local/Calpont + INFINIDB_INSTALL_DIR=/usr/local/MariaDB/Columnstore fi export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR diff --git a/oam/replaytxnlog/Makefile b/oam/replaytxnlog/Makefile index 846fac744..d7ae88e2f 100644 --- a/oam/replaytxnlog/Makefile +++ b/oam/replaytxnlog/Makefile @@ -14,7 +14,7 @@ LIBRARY=$(PROGRAM).$(VERSION) CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2 CXXFLAGS+=$(DEBUG_FLAGS) -Wall -fpic -CLIBS=-L../oamcpp -L$(EXPORT_ROOT)/lib -loamcpp -lmessageqcpp -lloggingcpp -loamcpp -lconfigcpp -lxml2 -lsnmpmanager -lnetsnmpmibs -lnetsnmpagent -L/usr/local/Calpont/lib -lnetsnmp -lnetsnmphelpers -lcppunit -ldl -lrwlock -lbrm +CLIBS=-L../oamcpp -L$(EXPORT_ROOT)/lib -loamcpp -lmessageqcpp -lloggingcpp -loamcpp -lconfigcpp -lxml2 -lsnmpmanager -lnetsnmpmibs -lnetsnmpagent -L/usr/local/MariaDB/Columnstore/lib -lnetsnmp -lnetsnmphelpers -lcppunit -ldl -lrwlock -lbrm TLIBS=-L. -loamcpp $(CLIBS) GLIBS=$(CLIBS) diff --git a/oamapps/Makefile b/oamapps/Makefile index 4c9cbad11..8b8f6477c 100755 --- a/oamapps/Makefile +++ b/oamapps/Makefile @@ -14,14 +14,14 @@ all: $(MAKE) -C traphandler $(MAKE) -C serverMonitor $(MAKE) -C postConfigure - $(MAKE) -C calpontDB + $(MAKE) -C columnstoreDB $(MAKE) -C sendtrap - $(MAKE) -C calpontSupport + $(MAKE) -C columnstoreSupport $(TARGETS): $(MAKE) -C mcsadmin $@ $(MAKE) -C traphandler $@ $(MAKE) -C serverMonitor $@ $(MAKE) -C postConfigure $@ - $(MAKE) -C calpontDB $@ + $(MAKE) -C columnstoreDB $@ $(MAKE) -C sendtrap $@ - $(MAKE) -C calpontSupport $@ + $(MAKE) -C columnstoreSupport $@ diff --git a/oamapps/calpontConsole/Makefile b/oamapps/calpontConsole/Makefile index ee408925f..55a73ad1c 100755 --- a/oamapps/calpontConsole/Makefile +++ b/oamapps/calpontConsole/Makefile @@ -27,7 +27,7 @@ CXXFLAGS+=$(DEBUG_FLAGS) -Wall # we need to add some search paths here because on a boostrap build we won't find liboamcpp # anywhere except in ../oamcpp CLIBS=-L../oamcpp -L$(EXPORT_ROOT)/lib $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib TLIBS=-L/usr/local/lib -lcppunit -ldl GLIBS=$(CLIBS) diff --git a/oamapps/calpontDB/Makefile b/oamapps/calpontDB/Makefile index 8e440182d..7acae2b5a 100755 --- a/oamapps/calpontDB/Makefile +++ b/oamapps/calpontDB/Makefile @@ -17,7 +17,7 @@ CXXFLAGS+=$(DEBUG_FLAGS) -Wall -D_DEBUG # we need to add some search paths here because on a bootstrap build we won't find liboamcpp # anywhere except in ../oamcpp CLIBS=-L$(EXPORT_ROOT)/lib $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib TLIBS=-lcppunit -ldl GLIBS=$(CLIBS) -lcppunit -ldl diff --git a/oamapps/calpontSupport/Makefile b/oamapps/calpontSupport/Makefile index ccf4eef34..ca5f11177 100755 --- a/oamapps/calpontSupport/Makefile +++ b/oamapps/calpontSupport/Makefile @@ -16,8 +16,8 @@ VERSION=1.0.0 CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2 CXXFLAGS+=$(DEBUG_FLAGS) -Wall -CLIBS=-L$(EXPORT_ROOT)/lib -L/usr/local/Calpont/lib $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +CLIBS=-L$(EXPORT_ROOT)/lib -L/usr/local/MariaDB/Columnstore/lib $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) +LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib SRCS=calpontSupport.cpp diff --git a/oamapps/calpontSupport/approximateRowCount.sh b/oamapps/calpontSupport/approximateRowCount.sh index 44bb63692..09652fded 100755 --- a/oamapps/calpontSupport/approximateRowCount.sh +++ b/oamapps/calpontSupport/approximateRowCount.sh @@ -9,7 +9,7 @@ # if [ -z "$MYSQLCMD" ]; then - INSTALLDIR="/usr/local/Calpont" + INSTALLDIR="/usr/local/MariaDB/Columnstore" MYSQLCNF=$INSTALLDIR/mysql/my.cnf MYSQLCMD="$INSTALLDIR/mysql/bin/mysql --defaults-file=$MYSQLCNF -u root" fi @@ -51,7 +51,7 @@ colWidth=`$MYSQLCMD calpontsys --skip-column-names -e "$sql"` # # Use editem to count the extents. # -extentCount=`/usr/local/Calpont/bin/editem -o $objectid | wc -l` +extentCount=`/usr/local/MariaDB/Columnstore/bin/editem -o $objectid | wc -l` let extentCount-=2 # Take out the 2 extra rows for header and blank line at end. let approximateRowCount=$extentCount*8192*1024; diff --git a/oamapps/calpontSupport/bulklogReport.sh b/oamapps/calpontSupport/bulklogReport.sh index 3510f11cf..631c3a83c 100755 --- a/oamapps/calpontSupport/bulklogReport.sh +++ b/oamapps/calpontSupport/bulklogReport.sh @@ -11,7 +11,7 @@ fi if [ $2 ] ; then INSTALLDIR=$2 else - INSTALLDIR="/usr/local/Calpont" + INSTALLDIR="/usr/local/MariaDB/Columnstore" fi if [ $USER = "root" ]; then diff --git a/oamapps/calpontSupport/configReport.sh b/oamapps/calpontSupport/configReport.sh index e517e027d..14d72a4b2 100755 --- a/oamapps/calpontSupport/configReport.sh +++ b/oamapps/calpontSupport/configReport.sh @@ -11,7 +11,7 @@ fi if [ $2 ] ; then INSTALLDIR=$2 else - INSTALLDIR="/usr/local/Calpont" + INSTALLDIR="/usr/local/MariaDB/Columnstore" fi if [ $USER = "root" ]; then diff --git a/oamapps/calpontSupport/findStranded.sh b/oamapps/calpontSupport/findStranded.sh index 0f45e3266..8f7314333 100755 --- a/oamapps/calpontSupport/findStranded.sh +++ b/oamapps/calpontSupport/findStranded.sh @@ -11,12 +11,12 @@ # Close enough for hand grenades. if [ -z "$INFINIDB_INSTALL_DIR" ]; then - INFINIDB_INSTALL_DIR=/usr/local/Calpont + INFINIDB_INSTALL_DIR=/usr/local/MariaDB/Columnstore fi export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR -if [ $INFINIDB_INSTALL_DIR != "/usr/local/Calpont" ]; then +if [ $INFINIDB_INSTALL_DIR != "/usr/local/MariaDB/Columnstore" ]; then export PATH=$INFINIDB_INSTALL_DIR/bin:$INFINIDB_INSTALL_DIR/mysql/bin:/bin:/usr/bin export LD_LIBRARY_PATH=$INFINIDB_INSTALL_DIR/lib:$INFINIDB_INSTALL_DIR/mysql/lib/mysql fi diff --git a/oamapps/calpontSupport/getMinMax.sh b/oamapps/calpontSupport/getMinMax.sh index ad0b78e7f..7c69c5fad 100755 --- a/oamapps/calpontSupport/getMinMax.sh +++ b/oamapps/calpontSupport/getMinMax.sh @@ -9,7 +9,7 @@ # if [ -z "$MYSQLCMD" ]; then - INSTALLDIR="/usr/local/Calpont" + INSTALLDIR="/usr/local/MariaDB/Columnstore" MYSQLCNF=$INSTALLDIR/mysql/my.cnf MYSQLCMD="$INSTALLDIR/mysql/bin/mysql --defaults-file=$MYSQLCNF -u root" fi @@ -77,7 +77,7 @@ fi # # Use the editem utility to get the min and max value. # -/usr/local/Calpont/bin/editem -o $objectid $parm | grep max | awk -v dataType=$dataType ' +/usr/local/MariaDB/Columnstore/bin/editem -o $objectid $parm | grep max | awk -v dataType=$dataType ' BEGIN { allValid=1; foundValidExtent=0; diff --git a/oamapps/calpontSupport/hadoopReport.sh b/oamapps/calpontSupport/hadoopReport.sh index bbd8f0fc7..983ee19ef 100755 --- a/oamapps/calpontSupport/hadoopReport.sh +++ b/oamapps/calpontSupport/hadoopReport.sh @@ -10,7 +10,7 @@ fi if [ $2 ] ; then INSTALLDIR=$2 else - INSTALLDIR="/usr/local/Calpont" + INSTALLDIR="/usr/local/MariaDB/Columnstore" fi if [ $USER = "hdfs" ]; then diff --git a/oamapps/calpontSupport/hardwareReport.sh b/oamapps/calpontSupport/hardwareReport.sh index b39155f8e..f2865f327 100755 --- a/oamapps/calpontSupport/hardwareReport.sh +++ b/oamapps/calpontSupport/hardwareReport.sh @@ -11,7 +11,7 @@ fi if [ $2 ] ; then INSTALLDIR=$2 else - INSTALLDIR="/usr/local/Calpont" + INSTALLDIR="/usr/local/MariaDB/Columnstore" fi if [ $USER = "root" ]; then diff --git a/oamapps/calpontSupport/logReport.sh b/oamapps/calpontSupport/logReport.sh index 4097804ac..b02aec7de 100755 --- a/oamapps/calpontSupport/logReport.sh +++ b/oamapps/calpontSupport/logReport.sh @@ -11,7 +11,7 @@ fi if [ $2 ] ; then INSTALLDIR=$2 else - INSTALLDIR="/usr/local/Calpont" + INSTALLDIR="/usr/local/MariaDB/Columnstore" fi if [ $USER = "root" ]; then diff --git a/oamapps/calpontSupport/minMaxCheck.sh b/oamapps/calpontSupport/minMaxCheck.sh index b20eb1898..e1afd9669 100755 --- a/oamapps/calpontSupport/minMaxCheck.sh +++ b/oamapps/calpontSupport/minMaxCheck.sh @@ -45,11 +45,11 @@ # if [ -z "$MYSQLCMD" ]; then - MYSQLCMD="/usr/local/Calpont/mysql/bin/mysql --defaults-file=/usr/local/Calpont/mysql/my.cnf -u root" + MYSQLCMD="/usr/local/MariaDB/Columnstore/mysql/bin/mysql --defaults-file=/usr/local/MariaDB/Columnstore/mysql/my.cnf -u root" fi if [ -z "$INSTALLDIR" ]; then - INSTALLDIR="/usr/local/Calpont" + INSTALLDIR="/usr/local/MariaDB/Columnstore" fi if [ -z "$PGMPATH" ]; then diff --git a/oamapps/calpontSupport/resourceReport.sh b/oamapps/calpontSupport/resourceReport.sh index 7728c89d0..5bd0e0c06 100755 --- a/oamapps/calpontSupport/resourceReport.sh +++ b/oamapps/calpontSupport/resourceReport.sh @@ -11,7 +11,7 @@ fi if [ $2 ] ; then INSTALLDIR=$2 else - INSTALLDIR="/usr/local/Calpont" + INSTALLDIR="/usr/local/MariaDB/Columnstore" fi if [ $USER = "root" ]; then diff --git a/oamapps/calpontSupport/softwareReport.sh b/oamapps/calpontSupport/softwareReport.sh index 3877743e0..880a4e11a 100755 --- a/oamapps/calpontSupport/softwareReport.sh +++ b/oamapps/calpontSupport/softwareReport.sh @@ -11,7 +11,7 @@ fi if [ $2 ] ; then INSTALLDIR=$2 else - INSTALLDIR="/usr/local/Calpont" + INSTALLDIR="/usr/local/MariaDB/Columnstore" fi if [ $USER = "root" ]; then diff --git a/oamapps/calpontSupport/sqlLogs.sh b/oamapps/calpontSupport/sqlLogs.sh index fc867dea2..958d9cc09 100755 --- a/oamapps/calpontSupport/sqlLogs.sh +++ b/oamapps/calpontSupport/sqlLogs.sh @@ -7,12 +7,12 @@ DB=idb_idb_sqllogs TABLE=statements if [ -z "$INFINIDB_INSTALL_DIR" ]; then - INFINIDB_INSTALL_DIR=/usr/local/Calpont + INFINIDB_INSTALL_DIR=/usr/local/MariaDB/Columnstore fi export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR -if [ $INFINIDB_INSTALL_DIR != "/usr/local/Calpont" ]; then +if [ $INFINIDB_INSTALL_DIR != "/usr/local/MariaDB/Columnstore" ]; then export PATH=$INFINIDB_INSTALL_DIR/bin:$INFINIDB_INSTALL_DIR/mysql/bin:/bin:/usr/bin export LD_LIBRARY_PATH=$INFINIDB_INSTALL_DIR/lib:$INFINIDB_INSTALL_DIR/mysql/lib/mysql fi diff --git a/oamapps/columnstoreDB/Makefile b/oamapps/columnstoreDB/Makefile new file mode 100755 index 000000000..215bd6325 --- /dev/null +++ b/oamapps/columnstoreDB/Makefile @@ -0,0 +1,63 @@ +#****************************************************************************************** +# $Id: Makefile 203 2007-04-04 20:30:53Z jrodriguez $ +# +# Copyright (C) 2009-2012 Columnstore Corporation +# All rights reserved +# +#*****************************************************************************************/ +include ../../rules.mak +.PHONY: install clean docs test coverage leakcheck + +PROGRAM=columnstoreDBWrite +VERSION=1.0.0 + +CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2 +CXXFLAGS+=$(DEBUG_FLAGS) -Wall -D_DEBUG + +# we need to add some search paths here because on a bootstrap build we won't find liboamcpp +# anywhere except in ../oamcpp +CLIBS=-L$(EXPORT_ROOT)/lib $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) +LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib +TLIBS=-lcppunit -ldl +GLIBS=$(CLIBS) -lcppunit -ldl + +SRCS=columnstoreDB.cpp +LINCLUDES= + +OBJS=$(SRCS:.cpp=.o) + +$(PROGRAM): $(OBJS) + $(LINK.cpp) -o $@ $^ + +install: bootstrap $(PROGRAM) + mkdir -p $(INSTALL_ROOT_BIN) + $(INSTALL) $(PROGRAM) $(INSTALL_ROOT_BIN) + +bootstrap: + +clean: + rm -f $(OBJS) tdriver.o $(PROGRAM) $(LIBRARY) tdriver core *~ *.tag *-gcov.* *.gcov tdriver-gcov *.d + rm -rf html + +docs: + doxygen $(EXPORT_ROOT)/etc/Doxyfile + +tdriver: tdriver.o + $(LINK.cpp) -o $@ $^ $(TLIBS) + +test: + +leakcheck: + +xleakcheck: $(PROGRAM) + LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) valgrind --tool=memcheck --leak-check=yes ./$(PROGRAM) + +%.d: %.cpp + @set -e; rm -f $@; \ + $(CC) -MM $(CPPFLAGS) $< > $@.$$$$; \ + sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \ + rm -f $@.$$$$ + +ifndef BOOTSTRAP +-include $(SRCS:.cpp=.d) tdriver.d +endif diff --git a/oamapps/columnstoreDB/columnstoreDB.cpp b/oamapps/columnstoreDB/columnstoreDB.cpp new file mode 100644 index 000000000..1cb05018b --- /dev/null +++ b/oamapps/columnstoreDB/columnstoreDB.cpp @@ -0,0 +1,154 @@ +/* Copyright (C) 2014 Columnstore, 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: columnstoreDB.cpp 419 2007-07-22 17:18:00Z dhill $ + * + ******************************************************************************************/ +/** + * @file + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "liboamcpp.h" +#include "configcpp.h" +#include "installdir.h" + +using namespace std; +using namespace oam; +using namespace config; + +namespace { + +void usage(char *prog) +{ + + cout << endl; + cout << "Usage: " << prog << " [options]" << endl; + + cout << endl; + cout << "This utility is used to suspend and resume Columnstore Database Writes." << endl; + cout << "Normally this would be done while performing Database Backups and" << endl; + cout << "Restores " << endl; + cout << endl; + + cout << "Options:" << endl; + cout << "-c Command: suspend or resume" << endl << endl; + cout << "-h Display this help." << endl << endl; +} +} + +int main(int argc, char **argv) +{ + string command; + Oam oam; + BRM::DBRM dbrm; + + char c; + + // Invokes member function `int operator ()(void);' + while ((c = getopt(argc, argv, "c:h")) != -1) { + switch (c) { + case 'c': + command = optarg; + break; + case 'h': + usage(argv[0]); + exit(-1); + break; + default: + usage(argv[0]); + exit(1); + break; + } + } + + if ( command == "suspend" ) + { + try + { + std::vector tableLocks = dbrm.getAllTableLocks(); + if (!tableLocks.empty()) + { + oam.DisplayLockedTables(tableLocks, &dbrm); + } + else + { + dbrm.setSystemSuspended(true); + sleep(5); + string cmd = startup::StartUp::installDir() + "/bin/save_brm > /var/log/MariaDB/Columnstore/save_brm.log1 2>&1"; + int rtnCode = system(cmd.c_str()); + if (rtnCode == 0) + { + cout << endl << "Suspend Columnstore Database Writes Request successfully completed" << endl; + } + else + { + cout << endl << "Suspend Columnstore Database Writes Failed: save_brm Failed" << endl; + dbrm.setSystemSuspended(false); + } + } + } + catch (exception& e) + { + cout << endl << "**** Suspend Columnstore Database Writes Failed: " << e.what() << endl; + } + catch(...) + { + cout << endl << "**** Suspend Columnstore Database Writes Failed" << endl; + } + } + else + { + if ( command == "resume" ) + { + try{ + dbrm.setSystemSuspended(false); + cout << endl << "Resume Columnstore Database Writes Request successfully completed" << endl; + } + catch (exception& e) + { + cout << endl << "**** Resume Columnstore Database Writes Failed: " << e.what() << endl; + } + catch(...) + { + cout << endl << "**** Resume Columnstore Database Writes Failed" << endl; + } + } + else + { + cout << "Invalid Command Entered, please try again" << endl; + exit(-1); + } + } + + exit(0); +} + diff --git a/oamapps/columnstoreDB/columnstoreDB.d.5020 b/oamapps/columnstoreDB/columnstoreDB.d.5020 new file mode 100644 index 000000000..e69de29bb diff --git a/oamapps/columnstoreSupport/Makefile b/oamapps/columnstoreSupport/Makefile new file mode 100755 index 000000000..e95f81ee8 --- /dev/null +++ b/oamapps/columnstoreSupport/Makefile @@ -0,0 +1,61 @@ +#****************************************************************************************** +# $Id$ +# +# Copyright (C) 2009-2012 Columnstore Corporation +# All rights reserved +#*****************************************************************************************/ +include ../../rules.mak +.PHONY: install clean test docs coverage leakcheck + +SCRIPTS=hardwareReport.sh softwareReport.sh configReport.sh logReport.sh resourceReport.sh alarmReport.sh bulklogReport.sh hadoopReport.sh + +PROGRAM=columnstoreSupport + +VERSION=1.0.0 + +CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2 +CXXFLAGS+=$(DEBUG_FLAGS) -Wall + +CLIBS=-L$(EXPORT_ROOT)/lib -L/usr/local/MariaDB/Columnstore/lib $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) +LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib + +SRCS=columnstoreSupport.cpp + +OBJS=$(SRCS:.cpp=.o) + +all: $(PROGRAM) + +$(PROGRAM): columnstoreSupport.o + $(LINK.cpp) -o $@ $^ -Wl,-Bstatic -lreadline -Wl,-Bdynamic -lncurses -ltinfo + +install: bootstrap $(PROGRAM) + umask 002; \ + mkdir -p $(INSTALL_ROOT_BIN) + pushd $(INSTALL_ROOT_BIN) >/dev/null; \ + rm -f $(SCRIPTS); \ + popd >/dev/null; \ + $(INSTALL) $(PROGRAM) $(SCRIPTS) $(INSTALL_ROOT_BIN) + pushd $(INSTALL_ROOT_BIN) >/dev/null; \ + chmod -f 755 $(PROGRAM) $(SCRIPTS); \ + popd >/dev/null + + +bootstrap: + +clean: + rm -f $(OBJS) tdriver.o $(PROGRAM) $(LIBRARY) tdriver core *~ *.tag *-gcov.* *.gcov tdriver-gcov *.d *.d.* + rm -rf html + +docs: + +tdriver: + +test: + +coverage: + +leakcheck: + +ifndef BOOTSTRAP +-include $(SRCS:.cpp=.d) tdriver.d +endif diff --git a/oamapps/columnstoreSupport/Makefile.am b/oamapps/columnstoreSupport/Makefile.am new file mode 100644 index 000000000..a8d446f4b --- /dev/null +++ b/oamapps/columnstoreSupport/Makefile.am @@ -0,0 +1,48 @@ +# Copyright (C) 2014 Columnstore, 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: Makefile.am 333 2009-04-03 20:35:04Z rdempsey $ +## Process this file with automake to produce Makefile.in + +AM_CPPFLAGS = $(idb_cppflags) +AM_CFLAGS = $(idb_cflags) +AM_CXXFLAGS = $(idb_cxxflags) +AM_LDFLAGS = $(idb_ldflags) +bin_PROGRAMS = columnstoreSupport +columnstoreSupport_SOURCES = columnstoreSupport.cpp +columnstoreSupport_CPPFLAGS = $(idb_common_includes) $(AM_CPPFLAGS) +columnstoreSupport_LDFLAGS = $(idb_common_ldflags) $(idb_brm_libs) $(idb_oam_libs) $(idb_exec_libs) -lreadline -lncurses $(AM_LDFLAGS) +dist_bin_SCRIPTS=\ + alarmReport.sh \ + bulklogReport.sh \ + configReport.sh \ + hadoopReport.sh \ + hardwareReport.sh \ + logReport.sh \ + resourceReport.sh \ + softwareReport.sh + +test: + +coverage: + +leakcheck: + +docs: + +bootstrap: install-data-am + diff --git a/oamapps/columnstoreSupport/Makefile.in b/oamapps/columnstoreSupport/Makefile.in new file mode 100644 index 000000000..241421587 --- /dev/null +++ b/oamapps/columnstoreSupport/Makefile.in @@ -0,0 +1,564 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Copyright (C) 2014 Columnstore, 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: Makefile.am 333 2009-04-03 20:35:04Z rdempsey $ + + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../.. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = columnstoreSupport$(EXEEXT) +subdir = oamapps/columnstoreSupport +DIST_COMMON = $(dist_bin_SCRIPTS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/compilerflags.m4 \ + $(top_srcdir)/m4/functions.m4 $(top_srcdir)/m4/install.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_columnstoreSupport_OBJECTS = columnstoreSupport-columnstoreSupport.$(OBJEXT) +columnstoreSupport_OBJECTS = $(am_columnstoreSupport_OBJECTS) +columnstoreSupport_LDADD = $(LDADD) +dist_binSCRIPT_INSTALL = $(INSTALL_SCRIPT) +SCRIPTS = $(dist_bin_SCRIPTS) +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(columnstoreSupport_SOURCES) +DIST_SOURCES = $(columnstoreSupport_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POW_LIB = @POW_LIB@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XML2_CONFIG = @XML2_CONFIG@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +YACC = @YACC@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +etcdir = @etcdir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +idb_brm_libs = @idb_brm_libs@ +idb_cflags = @idb_cflags@ +idb_common_includes = @idb_common_includes@ +idb_common_ldflags = @idb_common_ldflags@ +idb_common_libs = @idb_common_libs@ +idb_cppflags = @idb_cppflags@ +idb_cxxflags = @idb_cxxflags@ +idb_exec_libs = @idb_exec_libs@ +idb_ldflags = @idb_ldflags@ +idb_oam_libs = @idb_oam_libs@ +idb_write_libs = @idb_write_libs@ +idbinstall = @idbinstall@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localdir = @localdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +march_flags = @march_flags@ +mibdir = @mibdir@ +mkdir_p = @mkdir_p@ +mysqldir = @mysqldir@ +netsnmp_libs = @netsnmp_libs@ +netsnmpagntdir = @netsnmpagntdir@ +netsnmpdir = @netsnmpdir@ +netsnmplibrdir = @netsnmplibrdir@ +netsnmpmachdir = @netsnmpmachdir@ +netsnmpsysdir = @netsnmpsysdir@ +oldincludedir = @oldincludedir@ +postdir = @postdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedir = @sharedir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +toolsdir = @toolsdir@ +AM_CPPFLAGS = $(idb_cppflags) +AM_CFLAGS = $(idb_cflags) +AM_CXXFLAGS = $(idb_cxxflags) +AM_LDFLAGS = $(idb_ldflags) +columnstoreSupport_SOURCES = columnstoreSupport.cpp +columnstoreSupport_CPPFLAGS = $(idb_common_includes) $(AM_CPPFLAGS) +columnstoreSupport_LDFLAGS = $(idb_common_ldflags) $(idb_brm_libs) $(idb_oam_libs) $(idb_exec_libs) -lreadline -lncurses $(AM_LDFLAGS) +dist_bin_SCRIPTS = \ + alarmReport.sh \ + bulklogReport.sh \ + configReport.sh \ + hadoopReport.sh \ + hardwareReport.sh \ + logReport.sh \ + resourceReport.sh \ + softwareReport.sh + +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu oamapps/columnstoreSupport/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu oamapps/columnstoreSupport/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +columnstoreSupport$(EXEEXT): $(columnstoreSupport_OBJECTS) $(columnstoreSupport_DEPENDENCIES) + @rm -f columnstoreSupport$(EXEEXT) + $(CXXLINK) $(columnstoreSupport_LDFLAGS) $(columnstoreSupport_OBJECTS) $(columnstoreSupport_LDADD) $(LIBS) +install-dist_binSCRIPTS: $(dist_bin_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" + @list='$(dist_bin_SCRIPTS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f $$d$$p; then \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " $(dist_binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(dist_binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ + else :; fi; \ + done + +uninstall-dist_binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(dist_bin_SCRIPTS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/columnstoreSupport-columnstoreSupport.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +columnstoreSupport-columnstoreSupport.o: columnstoreSupport.cpp +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(columnstoreSupport_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT columnstoreSupport-columnstoreSupport.o -MD -MP -MF "$(DEPDIR)/columnstoreSupport-columnstoreSupport.Tpo" -c -o columnstoreSupport-columnstoreSupport.o `test -f 'columnstoreSupport.cpp' || echo '$(srcdir)/'`columnstoreSupport.cpp; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/columnstoreSupport-columnstoreSupport.Tpo" "$(DEPDIR)/columnstoreSupport-columnstoreSupport.Po"; else rm -f "$(DEPDIR)/columnstoreSupport-columnstoreSupport.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='columnstoreSupport.cpp' object='columnstoreSupport-columnstoreSupport.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(columnstoreSupport_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o columnstoreSupport-columnstoreSupport.o `test -f 'columnstoreSupport.cpp' || echo '$(srcdir)/'`columnstoreSupport.cpp + +columnstoreSupport-columnstoreSupport.obj: columnstoreSupport.cpp +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(columnstoreSupport_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT columnstoreSupport-columnstoreSupport.obj -MD -MP -MF "$(DEPDIR)/columnstoreSupport-columnstoreSupport.Tpo" -c -o columnstoreSupport-columnstoreSupport.obj `if test -f 'columnstoreSupport.cpp'; then $(CYGPATH_W) 'columnstoreSupport.cpp'; else $(CYGPATH_W) '$(srcdir)/columnstoreSupport.cpp'; fi`; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/columnstoreSupport-columnstoreSupport.Tpo" "$(DEPDIR)/columnstoreSupport-columnstoreSupport.Po"; else rm -f "$(DEPDIR)/columnstoreSupport-columnstoreSupport.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='columnstoreSupport.cpp' object='columnstoreSupport-columnstoreSupport.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(columnstoreSupport_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o columnstoreSupport-columnstoreSupport.obj `if test -f 'columnstoreSupport.cpp'; then $(CYGPATH_W) 'columnstoreSupport.cpp'; else $(CYGPATH_W) '$(srcdir)/columnstoreSupport.cpp'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) $(SCRIPTS) +installdirs: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: install-binPROGRAMS install-dist_binSCRIPTS + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-dist_binSCRIPTS \ + uninstall-info-am + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am \ + install-dist_binSCRIPTS install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-binPROGRAMS \ + uninstall-dist_binSCRIPTS uninstall-info-am + + +test: + +coverage: + +leakcheck: + +docs: + +bootstrap: install-data-am +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/oamapps/columnstoreSupport/alarmReport.sh b/oamapps/columnstoreSupport/alarmReport.sh new file mode 100755 index 000000000..66763c31b --- /dev/null +++ b/oamapps/columnstoreSupport/alarmReport.sh @@ -0,0 +1,36 @@ +#! /bin/sh +# +# $Id: logReport.sh 421 2007-04-05 15:46:55Z dhill $ +# +if [ $1 ] ; then + SERVER=$1 +else + SERVER="localhost" +fi + +if [ $2 ] ; then + DATE=$2 +else + DATE=" " +fi + +rm -f /tmp/logReport.log + +{ +echo " " +echo "******************** Alarm Report for $SERVER ********************" +echo " " + +echo "-- Today's Alarms --" +echo " " +cat /var/log/MariaDB/Columnstore/alarm.log 2>/dev/null + +if test -f /var/log/MariaDB/Columnstore/archive/alarm.log-$DATE ; then + echo "-- Archived Alarms --" + echo " " + cat /var/log/MariaDB/Columnstore/archive/alarm.log-$DATE 2>/dev/null +fi + +} > /tmp/logReport.log + +exit 0 \ No newline at end of file diff --git a/oamapps/columnstoreSupport/approximateRowCount.sh b/oamapps/columnstoreSupport/approximateRowCount.sh new file mode 100755 index 000000000..7e683c531 --- /dev/null +++ b/oamapps/columnstoreSupport/approximateRowCount.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +# +# Estimates the row count for a given table. Uses number of extents * 8M for the estimate. +# + +# +# Initialize variables. +# + +if [ -z "$MYSQLCMD" ]; then + INSTALLDIR="/usr/local/MariaDB/Columnstore" + MYSQLCNF=$INSTALLDIR/mysql/my.cnf + MYSQLCMD="$INSTALLDIR/mysql/bin/mysql --defaults-file=$MYSQLCNF -u root" +fi + +# +# Validate that there are two parameters - schema and table. +# +if [ $# -ne 2 ]; then + echo "" + echo "Reports the approximate row count for the given table." + echo "" + echo "Parameters:" + echo " Schema" + echo " Table" +fi +db=$1 +table=$2 + +# +# Validate that the table exists. +# +sql="select count(*) from systable where \`schema\`='$db' and tablename='$table';" +count=`$MYSQLCMD columnstoresys --skip-column-names -e "$sql;"` +if [ $count -le 0 ]; then + echo "" + echo "$db.$table does not exist in Columnstore." + echo "" + exit 1 +fi + +# +# Grab the objectid and column width for a column in the table. +# +sql="select objectid from syscolumn where \`schema\`='$db' and tablename='$table' limit 1;" +objectid=`$MYSQLCMD columnstoresys --skip-column-names -e "$sql"` +sql="select columnlength from syscolumn where objectid=$objectid;" +colWidth=`$MYSQLCMD columnstoresys --skip-column-names -e "$sql"` + +# +# Use editem to count the extents. +# +extentCount=`/usr/local/MariaDB/Columnstore/bin/editem -o $objectid | wc -l` +let extentCount-=2 # Take out the 2 extra rows for header and blank line at end. +let approximateRowCount=$extentCount*8192*1024; + +echo "" +echo "Approximate row count for $db.$table is $approximateRowCount." +echo "" + +exit 0 diff --git a/oamapps/columnstoreSupport/bulklogReport.sh b/oamapps/columnstoreSupport/bulklogReport.sh new file mode 100755 index 000000000..631c3a83c --- /dev/null +++ b/oamapps/columnstoreSupport/bulklogReport.sh @@ -0,0 +1,38 @@ +#! /bin/sh +# +# $Id: logReport.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}_bulklogReport.txt + +{ + +if test -d $INSTALLDIR/data/bulk ; then + echo " " + echo "-- Check for Errors in Bulk Logs --" + echo " " + echo "################# egrep '(ERR|CRIT)' $INSTALLDIR/data/bulk/log/*.err #################" + echo " " + egrep '(ERR|CRIT)' $INSTALLDIR/data/bulk/log/*.err 2>/dev/null +fi + +} > /tmp/${MODULE}_bulklogReport.txt + +exit 0 \ No newline at end of file diff --git a/oamapps/columnstoreSupport/calpontSupport.bat b/oamapps/columnstoreSupport/calpontSupport.bat new file mode 100644 index 000000000..bdab6d727 --- /dev/null +++ b/oamapps/columnstoreSupport/calpontSupport.bat @@ -0,0 +1,227 @@ +@echo off +pushd . +set help= +if "%1" == "-h" (set help=true) +if "%1" == "/h" (set help=true) +if "%1" == "--help" (set help=true) +if "%help%"=="true" ( + echo The Columnstore Support Report creates a report that can be sent to Columnstore + echo for help with field support. There are no options to this command. + set help= + exit /B 0 +) + +echo. +echo Running the Columnstore Support Report, outputting to ColumnstoreSupportReport.txt + +call :func > ColumnstoreSupportReport.txt 2>&1 + +echo. +echo Report finished + +popd +exit /B 0 + +:ErrorExit + +echo. +echo Error - Failed to find Columnstore Install Directory in Windows Registry, Exiting +popd +exit /B 1 + +:func + + setlocal + set key="HKLM\SOFTWARE\Columnstore\Columnstore" + set homeValue=ColumnstoreHome + set configValue=ConfigFile + + for /f "tokens=3,*" %%a in ('reg query %key% /ve 2^>NUL ^| findstr REG_SZ') do ( + set ColumnstoreInstall=%%b + ) + + if "%ColumnstoreInstall%" == "" ( + for /f "tokens=2,*" %%a in ('reg query %key% /ve 2^>NUL ^| findstr REG_SZ') do ( + set ColumnstoreInstall=%%b + ) + ) + + ::error out if can't locate Install Directory + if "%ColumnstoreInstall%" == "" GOTO ErrorExit + +echo ####################################################################### +echo # # +echo # Columnstore Support Report - %date% %time% +echo # # +echo ####################################################################### +echo. +echo. +echo ======================================================================= +echo = Software/Version Report = +echo ======================================================================= +echo. +echo. +echo -- Columnstore Software Version -- +type %ColumnstoreInstall%\etc\ColumnstoreVersion.txt +echo. +echo -- mysql Software Version -- +mysql --user=root -e status +echo. +echo -- Windows Version -- +ver +echo. +echo. +echo ======================================================================= +echo = Status Report = +echo ======================================================================= +echo. +echo. +echo -- Columnstore Process Status -- +echo. + +tasklist /FI "Imagename eq mysqld.exe" +tasklist /FI "Imagename eq controllernode.exe" +tasklist /FI "Imagename eq workernode.exe" +tasklist /FI "Imagename eq PrimProc.exe" +tasklist /FI "Imagename eq ExeMgr.exe" +tasklist /FI "Imagename eq DDLProc.exe" +tasklist /FI "Imagename eq DMLProc.exe" +tasklist /FI "Imagename eq WriteEngineServer.exe" + +echo. +echo. +echo ======================================================================= +echo = Configuration Report = +echo ======================================================================= +echo. +echo -- Windows Columnstore Registry Values -- +echo. + + echo ColumnstoreInstall = %ColumnstoreInstall% + + for /f "tokens=2,*" %%a in ('reg query %key% /v %homeValue% 2^>NUL ^| findstr %homeValue%') do ( + set ColumnstoreHome=%%b + ) + echo ColumnstoreHome = %ColumnstoreHome% + + for /f "tokens=2,*" %%a in ('reg query %key% /v %configValue% 2^>NUL ^| findstr %configValue%') do ( + set ConfigFile=%%b + ) + echo ConfigFile = %ConfigFile% +echo. +echo. +echo -- Columnstore System Configuration Information -- +echo. +cd %ColumnstoreInstall%\bin +for /f "delims=" %%a in ('getConfig.exe DBBC NumBlocksPct') do @echo NumBlocksPct = %%a +for /f "delims=" %%a in ('getConfig.exe HashJoin TotalUmMemory') do @echo TotalUmMemory = %%a +for /f "delims=" %%a in ('getConfig.exe VersionBuffer VersionBufferFileSize') do @echo VersionBufferFileSize = %%a +for /f "delims=" %%a in ('getConfig.exe ExtentMap FilesPerColumnPartition') do @echo FilesPerColumnPartition = %%a +for /f "delims=" %%a in ('getConfig.exe ExtentMap ExtentsPerSegmentFile') do @echo ExtentsPerSegmentFile = %%a +echo. +echo. +echo -- Columnstore System Configuration File -- +echo. +type "%ConfigFile%" +echo. +echo. +echo -- System Process Status -- +echo. +tasklist /v +echo. +echo ======================================================================= +echo = Resource Usage Report = +echo ======================================================================= +echo. +echo -- System Information-- +echo. +systeminfo +echo. +echo -- IP Configuration Information -- +echo. +ipconfig +echo. +echo -- Disk BRM Data files -- +echo. +dir "%ColumnstoreInstall%\dbrm\" +echo. +echo -- View Table Locks -- +echo. +cd %ColumnstoreInstall%\bin\ +viewtablelock.exe +echo. +echo. +echo -- BRM Extent Map -- +echo. +cd %ColumnstoreInstall%\bin\ +editem.exe -i +echo. +echo. +echo ======================================================================= +echo = Log Report = +echo ======================================================================= +echo. +echo -- Columnstore Platform Logs -- +echo. +type "%ColumnstoreInstall%\log\ColumnstoreLog.txt" +echo. +echo. +echo -- Columnstore MySQl log -- +echo. +type "%ColumnstoreInstall%\mysqldb\*.err" +echo. +echo. +echo -- Columnstore Bulk Load Logs -- +echo. +dir "%ColumnstoreInstall%\bulk\data" +echo. +dir "%ColumnstoreInstall%\bulk\log" +echo. +dir "%ColumnstoreInstall%\bulk\job" +echo. +echo -- Check for Errors in Bulk Logs -- +echo. +cd "%ColumnstoreInstall%\bulk\log" +findstr /spin /c:"error" * +findstr /spin /c:"failed" * +cd "%ColumnstoreInstall%\bulk\job" +findstr /spin /c:"error" * +findstr /spin /c:"failed" * +echo. +echo ======================================================================= +echo = DBMS Report = +echo ======================================================================= +echo. +echo -- DBMS Columnstore Mysql Version -- +echo. +mysql --user=root -e status +echo. +echo -- DBMS Mysql Columnstore System Column -- +echo. +mysql --user=root -e "desc columnstoresys.syscolumn" +echo. +echo -- DBMS Mysql Columnstore System Table -- +echo. +mysql --user=root -e "desc columnstoresys.systable" +echo. +echo -- DBMS Mysql Columnstore System Table Data -- +echo. +mysql --user=root -e "select * from columnstoresys.systable" +echo. +echo -- DBMS Mysql Columnstore Databases -- +echo. +mysql --user=root -e "show databases" +echo. +echo -- DBMS Mysql Columnstore variables -- +echo. +mysql --user=root -e "show variables" +echo. +echo -- DBMS Mysql Columnstore config file -- +echo. +type "%ColumnstoreInstall%\my.ini" +echo. +echo -- Active Queries -- + +::cd \Columnstore\genii\oamapps\columnstoreSupport + + diff --git a/oamapps/columnstoreSupport/calpontSupport.cpp b/oamapps/columnstoreSupport/calpontSupport.cpp new file mode 100644 index 000000000..4bdb215ff --- /dev/null +++ b/oamapps/columnstoreSupport/calpontSupport.cpp @@ -0,0 +1,1024 @@ +/* Copyright (C) 2013 Columnstore Corp. */ + + +/****************************************************************************************** +* $Id: columnstoreSupport.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 "liboamcpp.h" +#include "configcpp.h" +#include "installdir.h" + +using namespace std; +using namespace oam; +using namespace config; + +typedef struct Child_Module_struct +{ + std::string moduleName; + std::string moduleIP; + std::string hostName; +} ChildModule; + +typedef std::vector ChildModuleList; + +string currentDate; +string systemName; +string localModule; +string localModuleHostName; +ChildModuleList childmodulelist; +ChildModuleList parentmodulelist; +ChildModule childmodule; + +string rootPassword = ""; +string debug_flag = "0"; +string mysqlpw = " "; + +int runningThreads = 0; +pthread_mutex_t mutex1 = PTHREAD_MUTEX_INITIALIZER; + +typedef boost::tuple threadInfo_t; + +bool LOCAL = false; + +void title(string outputFile = "columnstoreSupportReport.txt") +{ + string cmd = "echo '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' System " + systemName + "' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' columnstoreSupportReport script ran from Module " + localModule + " on " + currentDate + "' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%' >> " + outputFile; + system(cmd.c_str()); +} + +void childReportThread(threadInfo_t& st) +{ + ChildModuleList::iterator& list = boost::get<0>(st); + string reportType = boost::get<1>(st); + + string remoteModuleName = (*list).moduleName; + string remoteModuleIP = (*list).moduleIP; + string remoteHostName = (*list).hostName; + + string installDir(startup::StartUp::installDir()); + + pthread_mutex_lock( &mutex1 ); + runningThreads++; +//cout << "++ " << runningThreads << endl; + pthread_mutex_unlock( &mutex1 ); + + string outputFile; + if (reportType == "log") + { + outputFile = remoteModuleName + "_" + reportType + "Report.tar.gz"; + } + else if (reportType == "hadoop") + { + outputFile = "hadoopReport.txt"; + } + else + { + outputFile = remoteModuleName + "_" + reportType + "Report.txt"; + + title(outputFile); + + string cmd = "echo '=======================================================================' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '= " + reportType + " report =' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '=======================================================================' >> " + outputFile; + system(cmd.c_str()); + } + + //run remote report script + if (reportType == "hadoop") + cout << "Get " + reportType + " report data" << endl; + else + cout << "Get " + reportType + " report data for " + remoteModuleName + " " << endl; + cout.flush(); + + string cmd = installDir + "/bin/remote_command.sh " + remoteModuleIP + " " + rootPassword + " '" + + installDir + "/bin/" + reportType + "Report.sh " + remoteModuleName + " " + installDir + + "' " + debug_flag + " - forcetty"; + int rtnCode = system(cmd.c_str()); + if (WEXITSTATUS(rtnCode) != 0) { + cout << "Error with running remote_command.sh, exiting..." << endl; + } + cmd = installDir + "/bin/remote_scp_get.sh " + remoteModuleIP + " " + rootPassword + " /tmp/" + outputFile + " > /dev/null 2>&1"; + rtnCode = system(cmd.c_str()); + if (WEXITSTATUS(rtnCode) != 0) + cout << "ERROR: failed to retrieve /tmp/" << outputFile << " from " + remoteHostName << endl; + pthread_mutex_lock( &mutex1 ); + runningThreads--; +//cout << "-- " << runningThreads << endl; + pthread_mutex_unlock( &mutex1 ); + + // exit thread + pthread_exit(0); +} + +void reportThread(string reporttype) +{ + string reportType = reporttype; + + string installDir(startup::StartUp::installDir()); + Oam oam; + + pthread_mutex_lock( &mutex1 ); + runningThreads++; +//cout << "++ " << runningThreads << endl; + pthread_mutex_unlock( &mutex1 ); + + string outputFile = localModule + "_" + reportType + "Report.txt"; + + // run on child servers and get report + if (!LOCAL) + { + ChildModuleList::iterator list1 = childmodulelist.begin(); + for (; list1 != childmodulelist.end() ; list1++) + { + threadInfo_t *st = new threadInfo_t; + *st = boost::make_tuple(list1, reportType); + + pthread_t childreportthread; + int status = pthread_create (&childreportthread, NULL, (void*(*)(void*)) &childReportThread, st); + + if ( status != 0 ) { + cout << "ERROR: childreportthread: pthread_create failed, return status = " + oam.itoa(status) << endl; + } + + sleep(1); + } + } + + // run report on local server + cout << "Get " + reportType + " report data for " + localModule << endl; + + if (reportType == "log") + { + string cmd = installDir + "/bin/logReport.sh " + localModule + " " + installDir; + system(cmd.c_str()); + + cmd = "mv -f /tmp/" + localModule + "_logReport.tar.gz ."; + system(cmd.c_str()); + + cmd = "tar -zcf " + localModule + "_mysqllogReport.tar.gz " + installDir + "/mysql/db/*.err* 2>/dev/null"; + system(cmd.c_str()); + + // run log config on local server + cout << "Get log config data for " + localModule << endl; + + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '******************** Log Configuration ********************' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '################# mcsadmin getLogConfig ################# ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = installDir + "/bin/mcsadmin getLogConfig >> " + outputFile; + system(cmd.c_str()); + } + else + { + //get local report + title(outputFile); + + string cmd = "echo '=======================================================================' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '= " + reportType + " report =' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '=======================================================================' >> " + outputFile; + system(cmd.c_str()); + + cmd = installDir + "/bin/" + reportType + "Report.sh " + localModule + " " + installDir; + system(cmd.c_str()); + cmd = " mv -f /tmp/" + localModule + "_" + reportType + "Report.txt ."; + system(cmd.c_str()); + + if (reportType == "config" ) + { + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '******************** System Network Configuration ********************' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '################# mcsadmin getSystemNetworkConfig ################# ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = installDir + "/bin/mcsadmin getSystemNetworkConfig >> " + outputFile; + system(cmd.c_str()); + + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '******************** System Module Configure ********************' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '################# mcsadmin getModuleTypeConfig ################# ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = installDir + "/bin/mcsadmin getModuleTypeConfig >> " + outputFile; + system(cmd.c_str()); + + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '******************** System Storage Configuration ********************' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '################# mcsadmin getStorageConfig ################# ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = installDir + "/bin/mcsadmin getStorageConfig >> " + outputFile; + system(cmd.c_str()); + + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '******************** System Storage Status ********************' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '################# mcsadmin getStorageStatus ################# ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = installDir + "/bin/mcsadmin getStorageStatus >> " + outputFile; + system(cmd.c_str()); + + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '******************** System Status ********************' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '################# mcsadmin getSystemInfo ################# ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = installDir + "/bin/mcsadmin getSystemInfo >> " + outputFile; + system(cmd.c_str()); + + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '******************** System Configuration File ********************' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '################# cat /etc/MariaDB/Columnstore.xml ################# ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "cat " + installDir + "/etc/MariaDB/Columnstore.xml >> " + outputFile; + system(cmd.c_str()); + } + + if (reportType == "resource" ) + { + if (LOCAL) { + cmd = "echo '################# mcsadmin getModuleResourceUsage ################# ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + string cmd = installDir + "/bin/mcsadmin getModuleResourceUsage " + localModule + " >> " + outputFile; + system(cmd.c_str()); + } + else + { + cmd = "echo '################# mcsadmin getSystemResourceUsage ################# ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + string cmd = installDir + "/bin/mcsadmin getSystemResourceUsage >> " + outputFile; + system(cmd.c_str()); + } + } + } + + // exit thread + pthread_mutex_lock( &mutex1 ); + runningThreads--; +//cout << "-- " << runningThreads << endl; + pthread_mutex_unlock( &mutex1 ); + + pthread_exit(0); +} + +int main(int argc, char *argv[]) +{ + Oam oam; + string installDir(startup::StartUp::installDir()); + + Config* sysConfig = Config::makeConfig(); + string SystemSection = "SystemConfig"; + string InstallSection = "Installation"; + + bool HARDWARE = false; + bool SOFTWARE = false; + bool CONFIG = false; + bool DBMS = false; + bool RESOURCE = false; + bool LOG = false; + bool BULKLOG = false; + bool HADOOP = false; + + //get current time and date + time_t now; + now = time(NULL); + struct tm tm; + localtime_r(&now, &tm); + char timestamp[200]; + strftime (timestamp, 200, "%m:%d:%y-%H:%M:%S", &tm); + currentDate = timestamp; + + char helpArg[3] = "-h"; + + // Get System Name + try{ + oam.getSystemConfig("SystemName", systemName); + } + catch(...) + { + systemName = "unassigned"; + } + + // get Local Module Name and Server Install Indicator + string singleServerInstall; + + oamModuleInfo_t st; + try { + st = oam.getModuleInfo(); + localModule = boost::get<0>(st); + } + catch (...) { + cout << endl << "**** Failed : Failed to read Local Module Name" << endl; + exit(-1); + } + + try{ + oam.getSystemConfig("SingleServerInstall", singleServerInstall); + } + catch(...) + { + singleServerInstall = "y"; + } + + if (argc == 1) { + argv[1] = &helpArg[0]; + argc = 2; + } + + string DataFilePlugin; + try{ + DataFilePlugin = sysConfig->getConfig(SystemSection, "DataFilePlugin"); + } + catch(...) + { + cout << "ERROR: Problem accessing Columnstore configuration file" << endl; + exit(-1); + } + + for( int i = 1; i < argc; i++ ) + { + if( string("-h") == argv[i] ) { + cout << endl; + cout << "'columnstoreSupport' generates a Set of System Support Report Files in a tar file" << endl; + cout << "called columnstoreSupportReport.'system-name'.tar.gz in the local directory." << endl; + cout << "It should be run on the server with the DBRM front-end." << endl; + cout << "Check the Admin Guide for additional information." << endl; + cout << endl; + cout << "Usage: columnstoreSupport [-h][-a][-hw][-s][-c][-db][-r][-l][-bl][-lc][-p 'root-password'][-mp 'mysql-root-password'][-de]"; + // if hdfs set up print the hadoop option + if (!DataFilePlugin.empty()) + cout << "[-hd]"; + cout << endl; + cout << " -h help" << endl; + cout << " -a Output all Reports (excluding Bulk Logs Reports)" << endl; + cout << " -hw Output Hardware Reports only" << endl; + cout << " -s Output Software Reports only" << endl; + cout << " -c Output Configuration/Status Reports only" << endl; + cout << " -db Output DBMS Reports only" << endl; + cout << " -r Output Resource Reports only" << endl; + cout << " -l Output Columnstore Log/Alarms Reports only" << endl; + cout << " -bl Output Columnstore Bulk Log Reports only" << endl; + cout << " -lc Output Reports for Local Server only" << endl; + cout << " -p password (multi-server systems), root-password or 'ssh' to use 'ssh keys'" << endl; + cout << " -mp mysql root user password" << endl; + cout << " -de Debug Flag" << endl; + // if hdfs set up print the hadoop option + if (!DataFilePlugin.empty()) + cout << " -hd Output hadoop reports only" << endl; + + exit (0); + } + else + { + if( string("-a") == argv[i] ) { + HARDWARE = true; + SOFTWARE = true; + CONFIG = true; + DBMS = true; + RESOURCE = true; + LOG = true; + HADOOP = (DataFilePlugin.empty()? false : true); + } + else if( string("-hw") == argv[i] ) + HARDWARE = true; + else if( string("-s") == argv[i] ) + SOFTWARE = true; + else if( string("-c") == argv[i] ) + CONFIG = true; + else if( string("-db") == argv[i] ) + DBMS = true; + else if( string("-r") == argv[i] ) + RESOURCE = true; + else if( string("-l") == argv[i] ) + LOG = true; + else if( string("-bl") == argv[i] ) + BULKLOG = true; + else if( string("-lc") == argv[i] ) + LOCAL = true; + else if( string("-p") == argv[i] ) { + i++; + if ( argc == i ) { + cout << "ERROR: missing root password argument" << endl; + exit(-1); + } + rootPassword = argv[i]; + //add single quote for special characters + if ( rootPassword != "ssh" ) + { + rootPassword = "'" + rootPassword + "'"; + } + } + else if( string("-mp") == argv[i] ) { + i++; + if ( argc == i ) { + cout << "ERROR: missing mysql root user password argument" << endl; + exit(-1); + } + mysqlpw = argv[i]; + mysqlpw = "'" + mysqlpw + "'"; + } + else if( string("-de") == argv[i] ) + debug_flag = "1"; + else if ( string("-hd") == argv[i] ) + { + HADOOP = (DataFilePlugin.empty()? false : true); + } + else + { + cout << "Invalid Option of '" << argv[i] << "', run with '-h' for help" << endl; + exit (1); + } + } + } + + //default to -a if nothing is set + if ( !HARDWARE && !SOFTWARE && !CONFIG && !DBMS && !RESOURCE && !LOG && !BULKLOG && !HADOOP) + { + HARDWARE = true; + SOFTWARE = true; + CONFIG = true; + DBMS = true; + RESOURCE = true; + LOG = true; + HADOOP = (DataFilePlugin.empty()? false : true); + } + + //get Parent OAM Module Name and setup of it's Custom OS files + string PrimaryUMModuleName; + try{ + PrimaryUMModuleName = sysConfig->getConfig(SystemSection, "PrimaryUMModuleName"); + } + catch(...) + { + cout << "ERROR: Problem getting Parent OAM Module Name" << endl; + exit(-1); + } + + if ( PrimaryUMModuleName == "unassigned" ) + PrimaryUMModuleName = localModule; + + if ( (localModule != PrimaryUMModuleName) && DBMS ) + { + char* pcommand = 0; + char *p; + string argument = "n"; + + while(true) + { + cout << endl << "You selected to get the DBMS data." << endl; + cout << "You need to run the columnstoreSupport command on module '" << PrimaryUMModuleName << "' to get that information." << endl; + cout << "Or you can proceed on to get all data except the DBMS." << endl; + + pcommand = readline(" Do you want to proceed: (y or n) [n]: "); + + if (pcommand && *pcommand) { + p = strtok(pcommand," "); + argument = p; + free(pcommand); + pcommand = 0; + } + + if (pcommand) { + free(pcommand); + pcommand = 0; + } + + if( argument == "y") { + cout << endl; + break; + } + else if( argument == "n") + exit (1); + } + } + + //get number of worker-nodes, will tell us if a single server system + //get Parent OAM Module Name and setup of it's Custom OS files + try{ + string NumWorkers = sysConfig->getConfig("DBRM_Controller", "NumWorkers"); + if ( NumWorkers == "1" ) + singleServerInstall = "y"; + } + catch(...) + {} + + if ( singleServerInstall == "n" && !LOCAL) + if ( HARDWARE || SOFTWARE || CONFIG || RESOURCE || LOG || HADOOP ) + if ( rootPassword.empty() ) { + cout << "ERROR: Multi-Module System, Password Argument required or use '-lc' option, check help for more information" << endl; + exit(-1); + } + + //get Parent OAM Module Name and setup of it's Custom OS files + //string parentOAMModuleName; + ChildModule parentOAMModule; + try{ + parentOAMModule.moduleName = sysConfig->getConfig(SystemSection, "ParentOAMModuleName"); + } + catch(...) + { + cout << "ERROR: Problem getting Parent OAM Module Name" << endl; + exit(-1); + } + + //Get list of configured system modules + SystemModuleTypeConfig sysModuleTypeConfig; + + try{ + oam.getSystemConfig(sysModuleTypeConfig); + } + catch(...) + { + cout << "ERROR: Problem reading the Columnstore System Configuration file" << endl; + exit(-1); + } + + string ModuleSection = "SystemModuleConfig"; + + for ( unsigned int i = 0 ; i < sysModuleTypeConfig.moduletypeconfig.size(); i++) + { + string moduleType = sysModuleTypeConfig.moduletypeconfig[i].ModuleType; + int moduleCount = sysModuleTypeConfig.moduletypeconfig[i].ModuleCount; + + if ( moduleCount == 0 ) + //no modules equipped for this Module Type, skip + continue; + + //get IP addresses and Host Names + DeviceNetworkList::iterator listPT = sysModuleTypeConfig.moduletypeconfig[i].ModuleNetworkList.begin(); + for( ; listPT != sysModuleTypeConfig.moduletypeconfig[i].ModuleNetworkList.end() ; listPT++) + { + string moduleName = (*listPT).DeviceName; + HostConfigList::iterator pt1 = (*listPT).hostConfigList.begin(); + string moduleIPAddr = (*pt1).IPAddr; + string moduleHostName = (*pt1).HostName; + + if ( moduleName == localModule) { + localModuleHostName = moduleHostName; + } + + //save Child modules + if ( moduleName != localModule && moduleType != "xm") { + childmodule.moduleName = moduleName; + childmodule.moduleIP = moduleIPAddr; + childmodule.hostName = moduleHostName; + childmodulelist.push_back(childmodule); + } + + if (moduleName == parentOAMModule.moduleName) + { + parentOAMModule.moduleIP = moduleIPAddr; + parentOAMModule.hostName = moduleHostName; + parentOAMModule.moduleName = moduleName; + } + } + } //end of i for loop + + // create a clean Columnstore Support Report + system("rm -f *_configReport.txt"); + system("rm -f *_dbmsReport.txt"); + system("rm -f *_hardwareReport.txt"); + system("rm -f *_logReport.txt"); + system("rm -f *_bulklogReport.txt"); + system("rm -f *_resourceReport.txt"); + system("rm -f *_softwareReport.txt"); + system("rm -f hadoopReport.txt"); + + // + // Software + // + + if ( SOFTWARE ) { + string reportType = "software"; + pthread_t reportthread; + int status = pthread_create (&reportthread, NULL, (void*(*)(void*)) &reportThread, &reportType); + + if ( status != 0 ) { + cout << "ERROR: reportthread: pthread_create failed, return status = " + oam.itoa(status); + } + + sleep(5); + } + + // + // Configuration + // + + if ( CONFIG ) { + string reportType = "config"; + pthread_t reportthread; + int status = pthread_create (&reportthread, NULL, (void*(*)(void*)) &reportThread, &reportType); + + if ( status != 0 ) { + cout << "ERROR: reportthread: pthread_create failed, return status = " + oam.itoa(status); + } + + sleep(5); + } + + // + // Alarms and Columnstore Logs + // + + if ( LOG ) { + string reportType = "log"; + pthread_t reportthread; + int status = pthread_create (&reportthread, NULL, (void*(*)(void*)) &reportThread, &reportType); + + if ( status != 0 ) { + cout << "ERROR: reportthread: pthread_create failed, return status = " + oam.itoa(status); + } + + sleep(5); + } + + // + // Bulk Logs + // + + if ( BULKLOG ) { + string reportType = "bulklog"; + pthread_t reportthread; + int status = pthread_create (&reportthread, NULL, (void*(*)(void*)) &reportThread, &reportType); + + if ( status != 0 ) { + cout << "ERROR: reportthread: pthread_create failed, return status = " + oam.itoa(status); + } + + sleep(5); + } + + // + // Hardware + // + + if ( HARDWARE ) { + string reportType = "hardware"; + pthread_t reportthread; + int status = pthread_create (&reportthread, NULL, (void*(*)(void*)) &reportThread, &reportType); + + if ( status != 0 ) { + cout << "ERROR: reportthread: pthread_create failed, return status = " + oam.itoa(status); + } + + sleep(5); + } + + // + // Resources + // + + if ( RESOURCE ) { + string reportType = "resource"; + pthread_t reportthread; + int status = pthread_create (&reportthread, NULL, (void*(*)(void*)) &reportThread, &reportType); + + if ( status != 0 ) { + cout << "ERROR: reportthread: pthread_create failed, return status = " + oam.itoa(status); + } + + sleep(5); + } + + // + // DBMS + // + + if ( DBMS ) { + system("rm -f columnstoreSupportReport.txt;touch columnstoreSupportReport.txt"); + title(); + + system("echo '=======================================================================' >> columnstoreSupportReport.txt"); + system("echo '= DBMS Report =' >> columnstoreSupportReport.txt"); + system("echo '=======================================================================' >> columnstoreSupportReport.txt"); + + // run DBMS report on local server + cout << "Get dbms report data for " << localModule << endl; + + bool FAILED = false; + if ( localModule != PrimaryUMModuleName ) + { + cout << " FAILED: run columnstoreSupport on '" << PrimaryUMModuleName << "' to get the dbrm report" << endl; + FAILED = true; + } + else + { + // check if mysql is supported and get info + string columnstoreMysql = installDir + "/mysql/bin/mysql --defaults-file=" + installDir + "/mysql/my.cnf -u root "; + string cmd = columnstoreMysql + " -e 'status' > /tmp/idbmysql.log 2>&1"; + system(cmd.c_str()); + + //check for mysql password set + string pwprompt = " "; + + if (oam.checkLogStatus("/tmp/idbmysql.log", "ERROR 1045") ) { + cout << "NOTE: MySQL root user password is set" << endl; + //needs a password, was password entered on command line + if ( mysqlpw == " " ) + { //go check my.cnf + string file = installDir + "/mysql/my.cnf"; + ifstream oldFile (file.c_str()); + + vector lines; + char line[200]; + string buf; + while (oldFile.getline(line, 200)) + { + buf = line; + string::size_type pos = buf.find("password",0); + if (pos != string::npos) { + string::size_type pos1 = buf.find("=",0); + if (pos1 != string::npos) { + pos = buf.find("#",0); + if (pos == string::npos) { + //password arg in my.cnf, go get password + cout << "NOTE: Using password from my.cnf" << endl; + mysqlpw = buf.substr(pos1+1,80); + cout << mysqlpw << endl; + break; + } + } + } + } + + oldFile.close(); + + if ( mysqlpw == " " ) + { + cout << "NOTE: No password provide on command line or found uncommented in my.cnf" << endl; + cout << endl; + string prompt = " *** Enter MySQL password > "; + mysqlpw = getpass(prompt.c_str()); + } + } + + //check for mysql password set + pwprompt = "--password=" + mysqlpw; + + string cmd = columnstoreMysql + pwprompt + " -e 'status' > /tmp/idbmysql.log 2>&1"; + system(cmd.c_str()); + + if (oam.checkLogStatus("/tmp/idbmysql.log", "ERROR 1045") ) { + cout << "FAILED: Failed login using MySQL root user password '" << mysqlpw << "'" << endl; + FAILED = true; + } + } + + if (!FAILED) + { + // check if mysql is supported and get info + string columnstoreMysql = installDir + "/mysql/bin/mysql --defaults-file=" + installDir + "/mysql/my.cnf -u root " + pwprompt; + string cmd = columnstoreMysql + " -V > /dev/null 2>&1"; + int ret = system(cmd.c_str()); + if ( WEXITSTATUS(ret) == 0) { + // run DBMS report info + system("echo ' ' >> columnstoreSupportReport.txt"); + system("echo '******************** DBMS Columnstore Mysql Version ********************' >> columnstoreSupportReport.txt"); + system("echo ' ' >> columnstoreSupportReport.txt"); + cmd = "echo '################# " + columnstoreMysql + " -e status ################# ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = "echo ' ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = columnstoreMysql + " -e 'status' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + + system("echo ' ' >> columnstoreSupportReport.txt"); + system("echo '******************** DBMS Mysql Columnstore System Column ********************' >> columnstoreSupportReport.txt"); + system("echo ' ' >> columnstoreSupportReport.txt"); + cmd = "echo '################# " + columnstoreMysql + " -e desc columnstoresys.syscolumn ################# ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = "echo ' ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = columnstoreMysql + " -e 'desc columnstoresys.syscolumn;' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + + system("echo ' ' >> columnstoreSupportReport.txt"); + system("echo '******************** DBMS Mysql Columnstore System Table ********************' >> columnstoreSupportReport.txt"); + system("echo ' ' >> columnstoreSupportReport.txt"); + cmd = "echo '################# " + columnstoreMysql + " -e desc columnstoresys.systable ################# ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = "echo ' ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = columnstoreMysql + " -e 'desc columnstoresys.systable;' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + + system("echo ' ' >> columnstoreSupportReport.txt"); + system("echo '******************** DBMS Mysql Columnstore System Catalog Data ********************' >> columnstoreSupportReport.txt"); + system("echo ' ' >> columnstoreSupportReport.txt"); + cmd = "echo '################# " + columnstoreMysql + " columnstoresys < " + installDir + "/mysql/dumpcat_mysql.sql ################# ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = "echo ' ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = columnstoreMysql + " columnstoresys < " + installDir + "/mysql/dumpcat_mysql.sql >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + + system("echo ' ' >> columnstoreSupportReport.txt"); + system("echo '******************** DBMS Mysql Columnstore System Table Data ********************' >> columnstoreSupportReport.txt"); + system("echo ' ' >> columnstoreSupportReport.txt"); + cmd = "echo '################# " + columnstoreMysql + " -e select * from columnstoresys.systable ################# ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = "echo ' ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = columnstoreMysql + " -e 'select * from columnstoresys.systable;' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + + system("echo ' ' >> columnstoreSupportReport.txt"); + system("echo '******************** DBMS Mysql Columnstore Usernames ********************' >> columnstoreSupportReport.txt"); + system("echo ' ' >> columnstoreSupportReport.txt"); + cmd = "echo '################# " + columnstoreMysql + " -e show databases ################# ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = "echo ' ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = columnstoreMysql + " -e 'show databases;' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + + system("echo ' ' >> columnstoreSupportReport.txt"); + system("echo '******************** DBMS Mysql Columnstore variables ********************' >> columnstoreSupportReport.txt"); + system("echo ' ' >> columnstoreSupportReport.txt"); + cmd = "echo '################# " + columnstoreMysql + " show variables ################# ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = "echo ' ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = columnstoreMysql + " -e 'show variables;' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + } + } + } + + system("echo ' ' >> columnstoreSupportReport.txt"); + system("echo '******************** Database Size Report ********************' >> columnstoreSupportReport.txt"); + system("echo ' ' >> columnstoreSupportReport.txt"); + string cmd = "echo '################# /bin/databaseSizeReport ################# ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = "echo ' ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = installDir + "/bin/databaseSizeReport >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + + system("echo ' ' >> columnstoreSupportReport.txt"); + system("echo '******************** DBMS Mysql Columnstore config file ********************' >> columnstoreSupportReport.txt"); + system("echo ' ' >> columnstoreSupportReport.txt"); + cmd = "echo '################# cat /mysql/my.cnf ################# ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = "echo ' ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = "cat " + installDir + "/mysql/my.cnf 2>/dev/null >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + + system("echo ' ' >> columnstoreSupportReport.txt"); + system("echo '******************** Active Queries ********************' >> columnstoreSupportReport.txt"); + system("echo ' ' >> columnstoreSupportReport.txt"); + cmd = "echo '################# mcsadmin getActiveSqlStatement ################# ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = "echo ' ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = installDir + "/bin/mcsadmin getActiveSqlStatement >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + + cmd = "cat columnstoreSupportReport.txt > " + localModule + "_dbmsReport.txt"; + system(cmd.c_str()); + } + + // + // HADOOP + // + + if (HADOOP) + { + if (LOCAL || childmodulelist.empty()) + { + cout << "Get hadoop report data" << endl; + string cmd = installDir + "/bin/hadoopReport.sh " + localModule + " " + installDir + "\n"; + cmd += " mv -f /tmp/hadoopReport.txt ."; + FILE* pipe = popen(cmd.c_str(), "r"); + if (!pipe) + { + cout << "Failed to get a pipe for hadoop health check commands" << endl; + exit(-1); + } + pclose(pipe); + } + else + { + // only get hadoop report from parentOAMModule, because it's consistant view. + parentmodulelist.push_back(parentOAMModule); + threadInfo_t *st = new threadInfo_t; + ChildModuleList::iterator iter = parentmodulelist.begin(); + *st = boost::make_tuple(iter, "hadoop"); + + pthread_t hdthread; + int status = pthread_create (&hdthread, NULL, (void*(*)(void*)) &childReportThread, st); + if ( status != 0 ) + { + cout << "ERROR: childreportthread: pthread_create failed, return status = " + oam.itoa(status) << endl; + } + } + } + + //wait for all threads to complete + sleep(5); + int wait = 0; + while (true) + { +//cout << "check " << runningThreads << endl; + if (runningThreads < 1) + break; + + sleep(2); + wait++; + // give it 60 minutes to complete + if ( wait >= 3600 * 5) + { + cout << "Timed out (60 minutes) waiting for Requests to complete" << endl; + } + } + + system("rm -f columnstoreSupportReport.txt"); + + system("unix2dos *Report.txt > /dev/null 2>&1"); + system("rm -rf columnstoreSupportReport;mkdir columnstoreSupportReport;mv *Report.txt columnstoreSupportReport/. > /dev/null 2>&1;mv *Report.tar.gz columnstoreSupportReport/. > /dev/null 2>&1"); + string cmd = "tar -zcf columnstoreSupportReport." + systemName + ".tar.gz columnstoreSupportReport/*"; + system(cmd.c_str()); + + + cout << endl << "Columnstore Support Script Successfully completed, files located in columnstoreSupportReport." + systemName + ".tar.gz" << endl; +} diff --git a/oamapps/columnstoreSupport/columnstoreSupport.cpp b/oamapps/columnstoreSupport/columnstoreSupport.cpp new file mode 100644 index 000000000..4bdb215ff --- /dev/null +++ b/oamapps/columnstoreSupport/columnstoreSupport.cpp @@ -0,0 +1,1024 @@ +/* Copyright (C) 2013 Columnstore Corp. */ + + +/****************************************************************************************** +* $Id: columnstoreSupport.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 "liboamcpp.h" +#include "configcpp.h" +#include "installdir.h" + +using namespace std; +using namespace oam; +using namespace config; + +typedef struct Child_Module_struct +{ + std::string moduleName; + std::string moduleIP; + std::string hostName; +} ChildModule; + +typedef std::vector ChildModuleList; + +string currentDate; +string systemName; +string localModule; +string localModuleHostName; +ChildModuleList childmodulelist; +ChildModuleList parentmodulelist; +ChildModule childmodule; + +string rootPassword = ""; +string debug_flag = "0"; +string mysqlpw = " "; + +int runningThreads = 0; +pthread_mutex_t mutex1 = PTHREAD_MUTEX_INITIALIZER; + +typedef boost::tuple threadInfo_t; + +bool LOCAL = false; + +void title(string outputFile = "columnstoreSupportReport.txt") +{ + string cmd = "echo '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' System " + systemName + "' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' columnstoreSupportReport script ran from Module " + localModule + " on " + currentDate + "' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%' >> " + outputFile; + system(cmd.c_str()); +} + +void childReportThread(threadInfo_t& st) +{ + ChildModuleList::iterator& list = boost::get<0>(st); + string reportType = boost::get<1>(st); + + string remoteModuleName = (*list).moduleName; + string remoteModuleIP = (*list).moduleIP; + string remoteHostName = (*list).hostName; + + string installDir(startup::StartUp::installDir()); + + pthread_mutex_lock( &mutex1 ); + runningThreads++; +//cout << "++ " << runningThreads << endl; + pthread_mutex_unlock( &mutex1 ); + + string outputFile; + if (reportType == "log") + { + outputFile = remoteModuleName + "_" + reportType + "Report.tar.gz"; + } + else if (reportType == "hadoop") + { + outputFile = "hadoopReport.txt"; + } + else + { + outputFile = remoteModuleName + "_" + reportType + "Report.txt"; + + title(outputFile); + + string cmd = "echo '=======================================================================' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '= " + reportType + " report =' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '=======================================================================' >> " + outputFile; + system(cmd.c_str()); + } + + //run remote report script + if (reportType == "hadoop") + cout << "Get " + reportType + " report data" << endl; + else + cout << "Get " + reportType + " report data for " + remoteModuleName + " " << endl; + cout.flush(); + + string cmd = installDir + "/bin/remote_command.sh " + remoteModuleIP + " " + rootPassword + " '" + + installDir + "/bin/" + reportType + "Report.sh " + remoteModuleName + " " + installDir + + "' " + debug_flag + " - forcetty"; + int rtnCode = system(cmd.c_str()); + if (WEXITSTATUS(rtnCode) != 0) { + cout << "Error with running remote_command.sh, exiting..." << endl; + } + cmd = installDir + "/bin/remote_scp_get.sh " + remoteModuleIP + " " + rootPassword + " /tmp/" + outputFile + " > /dev/null 2>&1"; + rtnCode = system(cmd.c_str()); + if (WEXITSTATUS(rtnCode) != 0) + cout << "ERROR: failed to retrieve /tmp/" << outputFile << " from " + remoteHostName << endl; + pthread_mutex_lock( &mutex1 ); + runningThreads--; +//cout << "-- " << runningThreads << endl; + pthread_mutex_unlock( &mutex1 ); + + // exit thread + pthread_exit(0); +} + +void reportThread(string reporttype) +{ + string reportType = reporttype; + + string installDir(startup::StartUp::installDir()); + Oam oam; + + pthread_mutex_lock( &mutex1 ); + runningThreads++; +//cout << "++ " << runningThreads << endl; + pthread_mutex_unlock( &mutex1 ); + + string outputFile = localModule + "_" + reportType + "Report.txt"; + + // run on child servers and get report + if (!LOCAL) + { + ChildModuleList::iterator list1 = childmodulelist.begin(); + for (; list1 != childmodulelist.end() ; list1++) + { + threadInfo_t *st = new threadInfo_t; + *st = boost::make_tuple(list1, reportType); + + pthread_t childreportthread; + int status = pthread_create (&childreportthread, NULL, (void*(*)(void*)) &childReportThread, st); + + if ( status != 0 ) { + cout << "ERROR: childreportthread: pthread_create failed, return status = " + oam.itoa(status) << endl; + } + + sleep(1); + } + } + + // run report on local server + cout << "Get " + reportType + " report data for " + localModule << endl; + + if (reportType == "log") + { + string cmd = installDir + "/bin/logReport.sh " + localModule + " " + installDir; + system(cmd.c_str()); + + cmd = "mv -f /tmp/" + localModule + "_logReport.tar.gz ."; + system(cmd.c_str()); + + cmd = "tar -zcf " + localModule + "_mysqllogReport.tar.gz " + installDir + "/mysql/db/*.err* 2>/dev/null"; + system(cmd.c_str()); + + // run log config on local server + cout << "Get log config data for " + localModule << endl; + + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '******************** Log Configuration ********************' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '################# mcsadmin getLogConfig ################# ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = installDir + "/bin/mcsadmin getLogConfig >> " + outputFile; + system(cmd.c_str()); + } + else + { + //get local report + title(outputFile); + + string cmd = "echo '=======================================================================' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '= " + reportType + " report =' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '=======================================================================' >> " + outputFile; + system(cmd.c_str()); + + cmd = installDir + "/bin/" + reportType + "Report.sh " + localModule + " " + installDir; + system(cmd.c_str()); + cmd = " mv -f /tmp/" + localModule + "_" + reportType + "Report.txt ."; + system(cmd.c_str()); + + if (reportType == "config" ) + { + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '******************** System Network Configuration ********************' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '################# mcsadmin getSystemNetworkConfig ################# ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = installDir + "/bin/mcsadmin getSystemNetworkConfig >> " + outputFile; + system(cmd.c_str()); + + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '******************** System Module Configure ********************' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '################# mcsadmin getModuleTypeConfig ################# ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = installDir + "/bin/mcsadmin getModuleTypeConfig >> " + outputFile; + system(cmd.c_str()); + + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '******************** System Storage Configuration ********************' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '################# mcsadmin getStorageConfig ################# ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = installDir + "/bin/mcsadmin getStorageConfig >> " + outputFile; + system(cmd.c_str()); + + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '******************** System Storage Status ********************' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '################# mcsadmin getStorageStatus ################# ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = installDir + "/bin/mcsadmin getStorageStatus >> " + outputFile; + system(cmd.c_str()); + + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '******************** System Status ********************' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '################# mcsadmin getSystemInfo ################# ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = installDir + "/bin/mcsadmin getSystemInfo >> " + outputFile; + system(cmd.c_str()); + + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '******************** System Configuration File ********************' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '################# cat /etc/MariaDB/Columnstore.xml ################# ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "cat " + installDir + "/etc/MariaDB/Columnstore.xml >> " + outputFile; + system(cmd.c_str()); + } + + if (reportType == "resource" ) + { + if (LOCAL) { + cmd = "echo '################# mcsadmin getModuleResourceUsage ################# ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + string cmd = installDir + "/bin/mcsadmin getModuleResourceUsage " + localModule + " >> " + outputFile; + system(cmd.c_str()); + } + else + { + cmd = "echo '################# mcsadmin getSystemResourceUsage ################# ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + string cmd = installDir + "/bin/mcsadmin getSystemResourceUsage >> " + outputFile; + system(cmd.c_str()); + } + } + } + + // exit thread + pthread_mutex_lock( &mutex1 ); + runningThreads--; +//cout << "-- " << runningThreads << endl; + pthread_mutex_unlock( &mutex1 ); + + pthread_exit(0); +} + +int main(int argc, char *argv[]) +{ + Oam oam; + string installDir(startup::StartUp::installDir()); + + Config* sysConfig = Config::makeConfig(); + string SystemSection = "SystemConfig"; + string InstallSection = "Installation"; + + bool HARDWARE = false; + bool SOFTWARE = false; + bool CONFIG = false; + bool DBMS = false; + bool RESOURCE = false; + bool LOG = false; + bool BULKLOG = false; + bool HADOOP = false; + + //get current time and date + time_t now; + now = time(NULL); + struct tm tm; + localtime_r(&now, &tm); + char timestamp[200]; + strftime (timestamp, 200, "%m:%d:%y-%H:%M:%S", &tm); + currentDate = timestamp; + + char helpArg[3] = "-h"; + + // Get System Name + try{ + oam.getSystemConfig("SystemName", systemName); + } + catch(...) + { + systemName = "unassigned"; + } + + // get Local Module Name and Server Install Indicator + string singleServerInstall; + + oamModuleInfo_t st; + try { + st = oam.getModuleInfo(); + localModule = boost::get<0>(st); + } + catch (...) { + cout << endl << "**** Failed : Failed to read Local Module Name" << endl; + exit(-1); + } + + try{ + oam.getSystemConfig("SingleServerInstall", singleServerInstall); + } + catch(...) + { + singleServerInstall = "y"; + } + + if (argc == 1) { + argv[1] = &helpArg[0]; + argc = 2; + } + + string DataFilePlugin; + try{ + DataFilePlugin = sysConfig->getConfig(SystemSection, "DataFilePlugin"); + } + catch(...) + { + cout << "ERROR: Problem accessing Columnstore configuration file" << endl; + exit(-1); + } + + for( int i = 1; i < argc; i++ ) + { + if( string("-h") == argv[i] ) { + cout << endl; + cout << "'columnstoreSupport' generates a Set of System Support Report Files in a tar file" << endl; + cout << "called columnstoreSupportReport.'system-name'.tar.gz in the local directory." << endl; + cout << "It should be run on the server with the DBRM front-end." << endl; + cout << "Check the Admin Guide for additional information." << endl; + cout << endl; + cout << "Usage: columnstoreSupport [-h][-a][-hw][-s][-c][-db][-r][-l][-bl][-lc][-p 'root-password'][-mp 'mysql-root-password'][-de]"; + // if hdfs set up print the hadoop option + if (!DataFilePlugin.empty()) + cout << "[-hd]"; + cout << endl; + cout << " -h help" << endl; + cout << " -a Output all Reports (excluding Bulk Logs Reports)" << endl; + cout << " -hw Output Hardware Reports only" << endl; + cout << " -s Output Software Reports only" << endl; + cout << " -c Output Configuration/Status Reports only" << endl; + cout << " -db Output DBMS Reports only" << endl; + cout << " -r Output Resource Reports only" << endl; + cout << " -l Output Columnstore Log/Alarms Reports only" << endl; + cout << " -bl Output Columnstore Bulk Log Reports only" << endl; + cout << " -lc Output Reports for Local Server only" << endl; + cout << " -p password (multi-server systems), root-password or 'ssh' to use 'ssh keys'" << endl; + cout << " -mp mysql root user password" << endl; + cout << " -de Debug Flag" << endl; + // if hdfs set up print the hadoop option + if (!DataFilePlugin.empty()) + cout << " -hd Output hadoop reports only" << endl; + + exit (0); + } + else + { + if( string("-a") == argv[i] ) { + HARDWARE = true; + SOFTWARE = true; + CONFIG = true; + DBMS = true; + RESOURCE = true; + LOG = true; + HADOOP = (DataFilePlugin.empty()? false : true); + } + else if( string("-hw") == argv[i] ) + HARDWARE = true; + else if( string("-s") == argv[i] ) + SOFTWARE = true; + else if( string("-c") == argv[i] ) + CONFIG = true; + else if( string("-db") == argv[i] ) + DBMS = true; + else if( string("-r") == argv[i] ) + RESOURCE = true; + else if( string("-l") == argv[i] ) + LOG = true; + else if( string("-bl") == argv[i] ) + BULKLOG = true; + else if( string("-lc") == argv[i] ) + LOCAL = true; + else if( string("-p") == argv[i] ) { + i++; + if ( argc == i ) { + cout << "ERROR: missing root password argument" << endl; + exit(-1); + } + rootPassword = argv[i]; + //add single quote for special characters + if ( rootPassword != "ssh" ) + { + rootPassword = "'" + rootPassword + "'"; + } + } + else if( string("-mp") == argv[i] ) { + i++; + if ( argc == i ) { + cout << "ERROR: missing mysql root user password argument" << endl; + exit(-1); + } + mysqlpw = argv[i]; + mysqlpw = "'" + mysqlpw + "'"; + } + else if( string("-de") == argv[i] ) + debug_flag = "1"; + else if ( string("-hd") == argv[i] ) + { + HADOOP = (DataFilePlugin.empty()? false : true); + } + else + { + cout << "Invalid Option of '" << argv[i] << "', run with '-h' for help" << endl; + exit (1); + } + } + } + + //default to -a if nothing is set + if ( !HARDWARE && !SOFTWARE && !CONFIG && !DBMS && !RESOURCE && !LOG && !BULKLOG && !HADOOP) + { + HARDWARE = true; + SOFTWARE = true; + CONFIG = true; + DBMS = true; + RESOURCE = true; + LOG = true; + HADOOP = (DataFilePlugin.empty()? false : true); + } + + //get Parent OAM Module Name and setup of it's Custom OS files + string PrimaryUMModuleName; + try{ + PrimaryUMModuleName = sysConfig->getConfig(SystemSection, "PrimaryUMModuleName"); + } + catch(...) + { + cout << "ERROR: Problem getting Parent OAM Module Name" << endl; + exit(-1); + } + + if ( PrimaryUMModuleName == "unassigned" ) + PrimaryUMModuleName = localModule; + + if ( (localModule != PrimaryUMModuleName) && DBMS ) + { + char* pcommand = 0; + char *p; + string argument = "n"; + + while(true) + { + cout << endl << "You selected to get the DBMS data." << endl; + cout << "You need to run the columnstoreSupport command on module '" << PrimaryUMModuleName << "' to get that information." << endl; + cout << "Or you can proceed on to get all data except the DBMS." << endl; + + pcommand = readline(" Do you want to proceed: (y or n) [n]: "); + + if (pcommand && *pcommand) { + p = strtok(pcommand," "); + argument = p; + free(pcommand); + pcommand = 0; + } + + if (pcommand) { + free(pcommand); + pcommand = 0; + } + + if( argument == "y") { + cout << endl; + break; + } + else if( argument == "n") + exit (1); + } + } + + //get number of worker-nodes, will tell us if a single server system + //get Parent OAM Module Name and setup of it's Custom OS files + try{ + string NumWorkers = sysConfig->getConfig("DBRM_Controller", "NumWorkers"); + if ( NumWorkers == "1" ) + singleServerInstall = "y"; + } + catch(...) + {} + + if ( singleServerInstall == "n" && !LOCAL) + if ( HARDWARE || SOFTWARE || CONFIG || RESOURCE || LOG || HADOOP ) + if ( rootPassword.empty() ) { + cout << "ERROR: Multi-Module System, Password Argument required or use '-lc' option, check help for more information" << endl; + exit(-1); + } + + //get Parent OAM Module Name and setup of it's Custom OS files + //string parentOAMModuleName; + ChildModule parentOAMModule; + try{ + parentOAMModule.moduleName = sysConfig->getConfig(SystemSection, "ParentOAMModuleName"); + } + catch(...) + { + cout << "ERROR: Problem getting Parent OAM Module Name" << endl; + exit(-1); + } + + //Get list of configured system modules + SystemModuleTypeConfig sysModuleTypeConfig; + + try{ + oam.getSystemConfig(sysModuleTypeConfig); + } + catch(...) + { + cout << "ERROR: Problem reading the Columnstore System Configuration file" << endl; + exit(-1); + } + + string ModuleSection = "SystemModuleConfig"; + + for ( unsigned int i = 0 ; i < sysModuleTypeConfig.moduletypeconfig.size(); i++) + { + string moduleType = sysModuleTypeConfig.moduletypeconfig[i].ModuleType; + int moduleCount = sysModuleTypeConfig.moduletypeconfig[i].ModuleCount; + + if ( moduleCount == 0 ) + //no modules equipped for this Module Type, skip + continue; + + //get IP addresses and Host Names + DeviceNetworkList::iterator listPT = sysModuleTypeConfig.moduletypeconfig[i].ModuleNetworkList.begin(); + for( ; listPT != sysModuleTypeConfig.moduletypeconfig[i].ModuleNetworkList.end() ; listPT++) + { + string moduleName = (*listPT).DeviceName; + HostConfigList::iterator pt1 = (*listPT).hostConfigList.begin(); + string moduleIPAddr = (*pt1).IPAddr; + string moduleHostName = (*pt1).HostName; + + if ( moduleName == localModule) { + localModuleHostName = moduleHostName; + } + + //save Child modules + if ( moduleName != localModule && moduleType != "xm") { + childmodule.moduleName = moduleName; + childmodule.moduleIP = moduleIPAddr; + childmodule.hostName = moduleHostName; + childmodulelist.push_back(childmodule); + } + + if (moduleName == parentOAMModule.moduleName) + { + parentOAMModule.moduleIP = moduleIPAddr; + parentOAMModule.hostName = moduleHostName; + parentOAMModule.moduleName = moduleName; + } + } + } //end of i for loop + + // create a clean Columnstore Support Report + system("rm -f *_configReport.txt"); + system("rm -f *_dbmsReport.txt"); + system("rm -f *_hardwareReport.txt"); + system("rm -f *_logReport.txt"); + system("rm -f *_bulklogReport.txt"); + system("rm -f *_resourceReport.txt"); + system("rm -f *_softwareReport.txt"); + system("rm -f hadoopReport.txt"); + + // + // Software + // + + if ( SOFTWARE ) { + string reportType = "software"; + pthread_t reportthread; + int status = pthread_create (&reportthread, NULL, (void*(*)(void*)) &reportThread, &reportType); + + if ( status != 0 ) { + cout << "ERROR: reportthread: pthread_create failed, return status = " + oam.itoa(status); + } + + sleep(5); + } + + // + // Configuration + // + + if ( CONFIG ) { + string reportType = "config"; + pthread_t reportthread; + int status = pthread_create (&reportthread, NULL, (void*(*)(void*)) &reportThread, &reportType); + + if ( status != 0 ) { + cout << "ERROR: reportthread: pthread_create failed, return status = " + oam.itoa(status); + } + + sleep(5); + } + + // + // Alarms and Columnstore Logs + // + + if ( LOG ) { + string reportType = "log"; + pthread_t reportthread; + int status = pthread_create (&reportthread, NULL, (void*(*)(void*)) &reportThread, &reportType); + + if ( status != 0 ) { + cout << "ERROR: reportthread: pthread_create failed, return status = " + oam.itoa(status); + } + + sleep(5); + } + + // + // Bulk Logs + // + + if ( BULKLOG ) { + string reportType = "bulklog"; + pthread_t reportthread; + int status = pthread_create (&reportthread, NULL, (void*(*)(void*)) &reportThread, &reportType); + + if ( status != 0 ) { + cout << "ERROR: reportthread: pthread_create failed, return status = " + oam.itoa(status); + } + + sleep(5); + } + + // + // Hardware + // + + if ( HARDWARE ) { + string reportType = "hardware"; + pthread_t reportthread; + int status = pthread_create (&reportthread, NULL, (void*(*)(void*)) &reportThread, &reportType); + + if ( status != 0 ) { + cout << "ERROR: reportthread: pthread_create failed, return status = " + oam.itoa(status); + } + + sleep(5); + } + + // + // Resources + // + + if ( RESOURCE ) { + string reportType = "resource"; + pthread_t reportthread; + int status = pthread_create (&reportthread, NULL, (void*(*)(void*)) &reportThread, &reportType); + + if ( status != 0 ) { + cout << "ERROR: reportthread: pthread_create failed, return status = " + oam.itoa(status); + } + + sleep(5); + } + + // + // DBMS + // + + if ( DBMS ) { + system("rm -f columnstoreSupportReport.txt;touch columnstoreSupportReport.txt"); + title(); + + system("echo '=======================================================================' >> columnstoreSupportReport.txt"); + system("echo '= DBMS Report =' >> columnstoreSupportReport.txt"); + system("echo '=======================================================================' >> columnstoreSupportReport.txt"); + + // run DBMS report on local server + cout << "Get dbms report data for " << localModule << endl; + + bool FAILED = false; + if ( localModule != PrimaryUMModuleName ) + { + cout << " FAILED: run columnstoreSupport on '" << PrimaryUMModuleName << "' to get the dbrm report" << endl; + FAILED = true; + } + else + { + // check if mysql is supported and get info + string columnstoreMysql = installDir + "/mysql/bin/mysql --defaults-file=" + installDir + "/mysql/my.cnf -u root "; + string cmd = columnstoreMysql + " -e 'status' > /tmp/idbmysql.log 2>&1"; + system(cmd.c_str()); + + //check for mysql password set + string pwprompt = " "; + + if (oam.checkLogStatus("/tmp/idbmysql.log", "ERROR 1045") ) { + cout << "NOTE: MySQL root user password is set" << endl; + //needs a password, was password entered on command line + if ( mysqlpw == " " ) + { //go check my.cnf + string file = installDir + "/mysql/my.cnf"; + ifstream oldFile (file.c_str()); + + vector lines; + char line[200]; + string buf; + while (oldFile.getline(line, 200)) + { + buf = line; + string::size_type pos = buf.find("password",0); + if (pos != string::npos) { + string::size_type pos1 = buf.find("=",0); + if (pos1 != string::npos) { + pos = buf.find("#",0); + if (pos == string::npos) { + //password arg in my.cnf, go get password + cout << "NOTE: Using password from my.cnf" << endl; + mysqlpw = buf.substr(pos1+1,80); + cout << mysqlpw << endl; + break; + } + } + } + } + + oldFile.close(); + + if ( mysqlpw == " " ) + { + cout << "NOTE: No password provide on command line or found uncommented in my.cnf" << endl; + cout << endl; + string prompt = " *** Enter MySQL password > "; + mysqlpw = getpass(prompt.c_str()); + } + } + + //check for mysql password set + pwprompt = "--password=" + mysqlpw; + + string cmd = columnstoreMysql + pwprompt + " -e 'status' > /tmp/idbmysql.log 2>&1"; + system(cmd.c_str()); + + if (oam.checkLogStatus("/tmp/idbmysql.log", "ERROR 1045") ) { + cout << "FAILED: Failed login using MySQL root user password '" << mysqlpw << "'" << endl; + FAILED = true; + } + } + + if (!FAILED) + { + // check if mysql is supported and get info + string columnstoreMysql = installDir + "/mysql/bin/mysql --defaults-file=" + installDir + "/mysql/my.cnf -u root " + pwprompt; + string cmd = columnstoreMysql + " -V > /dev/null 2>&1"; + int ret = system(cmd.c_str()); + if ( WEXITSTATUS(ret) == 0) { + // run DBMS report info + system("echo ' ' >> columnstoreSupportReport.txt"); + system("echo '******************** DBMS Columnstore Mysql Version ********************' >> columnstoreSupportReport.txt"); + system("echo ' ' >> columnstoreSupportReport.txt"); + cmd = "echo '################# " + columnstoreMysql + " -e status ################# ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = "echo ' ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = columnstoreMysql + " -e 'status' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + + system("echo ' ' >> columnstoreSupportReport.txt"); + system("echo '******************** DBMS Mysql Columnstore System Column ********************' >> columnstoreSupportReport.txt"); + system("echo ' ' >> columnstoreSupportReport.txt"); + cmd = "echo '################# " + columnstoreMysql + " -e desc columnstoresys.syscolumn ################# ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = "echo ' ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = columnstoreMysql + " -e 'desc columnstoresys.syscolumn;' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + + system("echo ' ' >> columnstoreSupportReport.txt"); + system("echo '******************** DBMS Mysql Columnstore System Table ********************' >> columnstoreSupportReport.txt"); + system("echo ' ' >> columnstoreSupportReport.txt"); + cmd = "echo '################# " + columnstoreMysql + " -e desc columnstoresys.systable ################# ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = "echo ' ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = columnstoreMysql + " -e 'desc columnstoresys.systable;' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + + system("echo ' ' >> columnstoreSupportReport.txt"); + system("echo '******************** DBMS Mysql Columnstore System Catalog Data ********************' >> columnstoreSupportReport.txt"); + system("echo ' ' >> columnstoreSupportReport.txt"); + cmd = "echo '################# " + columnstoreMysql + " columnstoresys < " + installDir + "/mysql/dumpcat_mysql.sql ################# ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = "echo ' ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = columnstoreMysql + " columnstoresys < " + installDir + "/mysql/dumpcat_mysql.sql >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + + system("echo ' ' >> columnstoreSupportReport.txt"); + system("echo '******************** DBMS Mysql Columnstore System Table Data ********************' >> columnstoreSupportReport.txt"); + system("echo ' ' >> columnstoreSupportReport.txt"); + cmd = "echo '################# " + columnstoreMysql + " -e select * from columnstoresys.systable ################# ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = "echo ' ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = columnstoreMysql + " -e 'select * from columnstoresys.systable;' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + + system("echo ' ' >> columnstoreSupportReport.txt"); + system("echo '******************** DBMS Mysql Columnstore Usernames ********************' >> columnstoreSupportReport.txt"); + system("echo ' ' >> columnstoreSupportReport.txt"); + cmd = "echo '################# " + columnstoreMysql + " -e show databases ################# ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = "echo ' ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = columnstoreMysql + " -e 'show databases;' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + + system("echo ' ' >> columnstoreSupportReport.txt"); + system("echo '******************** DBMS Mysql Columnstore variables ********************' >> columnstoreSupportReport.txt"); + system("echo ' ' >> columnstoreSupportReport.txt"); + cmd = "echo '################# " + columnstoreMysql + " show variables ################# ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = "echo ' ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = columnstoreMysql + " -e 'show variables;' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + } + } + } + + system("echo ' ' >> columnstoreSupportReport.txt"); + system("echo '******************** Database Size Report ********************' >> columnstoreSupportReport.txt"); + system("echo ' ' >> columnstoreSupportReport.txt"); + string cmd = "echo '################# /bin/databaseSizeReport ################# ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = "echo ' ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = installDir + "/bin/databaseSizeReport >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + + system("echo ' ' >> columnstoreSupportReport.txt"); + system("echo '******************** DBMS Mysql Columnstore config file ********************' >> columnstoreSupportReport.txt"); + system("echo ' ' >> columnstoreSupportReport.txt"); + cmd = "echo '################# cat /mysql/my.cnf ################# ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = "echo ' ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = "cat " + installDir + "/mysql/my.cnf 2>/dev/null >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + + system("echo ' ' >> columnstoreSupportReport.txt"); + system("echo '******************** Active Queries ********************' >> columnstoreSupportReport.txt"); + system("echo ' ' >> columnstoreSupportReport.txt"); + cmd = "echo '################# mcsadmin getActiveSqlStatement ################# ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = "echo ' ' >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + cmd = installDir + "/bin/mcsadmin getActiveSqlStatement >> columnstoreSupportReport.txt"; + system(cmd.c_str()); + + cmd = "cat columnstoreSupportReport.txt > " + localModule + "_dbmsReport.txt"; + system(cmd.c_str()); + } + + // + // HADOOP + // + + if (HADOOP) + { + if (LOCAL || childmodulelist.empty()) + { + cout << "Get hadoop report data" << endl; + string cmd = installDir + "/bin/hadoopReport.sh " + localModule + " " + installDir + "\n"; + cmd += " mv -f /tmp/hadoopReport.txt ."; + FILE* pipe = popen(cmd.c_str(), "r"); + if (!pipe) + { + cout << "Failed to get a pipe for hadoop health check commands" << endl; + exit(-1); + } + pclose(pipe); + } + else + { + // only get hadoop report from parentOAMModule, because it's consistant view. + parentmodulelist.push_back(parentOAMModule); + threadInfo_t *st = new threadInfo_t; + ChildModuleList::iterator iter = parentmodulelist.begin(); + *st = boost::make_tuple(iter, "hadoop"); + + pthread_t hdthread; + int status = pthread_create (&hdthread, NULL, (void*(*)(void*)) &childReportThread, st); + if ( status != 0 ) + { + cout << "ERROR: childreportthread: pthread_create failed, return status = " + oam.itoa(status) << endl; + } + } + } + + //wait for all threads to complete + sleep(5); + int wait = 0; + while (true) + { +//cout << "check " << runningThreads << endl; + if (runningThreads < 1) + break; + + sleep(2); + wait++; + // give it 60 minutes to complete + if ( wait >= 3600 * 5) + { + cout << "Timed out (60 minutes) waiting for Requests to complete" << endl; + } + } + + system("rm -f columnstoreSupportReport.txt"); + + system("unix2dos *Report.txt > /dev/null 2>&1"); + system("rm -rf columnstoreSupportReport;mkdir columnstoreSupportReport;mv *Report.txt columnstoreSupportReport/. > /dev/null 2>&1;mv *Report.tar.gz columnstoreSupportReport/. > /dev/null 2>&1"); + string cmd = "tar -zcf columnstoreSupportReport." + systemName + ".tar.gz columnstoreSupportReport/*"; + system(cmd.c_str()); + + + cout << endl << "Columnstore Support Script Successfully completed, files located in columnstoreSupportReport." + systemName + ".tar.gz" << endl; +} diff --git a/oamapps/columnstoreSupport/configReport.sh b/oamapps/columnstoreSupport/configReport.sh new file mode 100755 index 000000000..93d5a409a --- /dev/null +++ b/oamapps/columnstoreSupport/configReport.sh @@ -0,0 +1,64 @@ +#!/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}_configReport.txt + +{ +echo " " +echo "******************** Configuration/Status Report for ${MODULE} ********************" +echo " " + +if test -f /sbin/chkconfig ; then + echo "-- chkconfig configuration --" + echo " " + echo "################# /sbin/chkconfig --list | grep columnstore #################" + echo " " + $SUDO /sbin/chkconfig --list | grep columnstore 2>/dev/null + echo "################# /sbin/chkconfig --list | grep mysql-Columnstore #################" + echo " " + $SUDO /sbin/chkconfig --list | grep mysql-Columnstore 2>/dev/null +fi + +echo " " +echo "-- fstab Configuration --" +echo " " +echo "################# cat /etc/fstab #################" +echo " " +$SUDO cat /etc/fstab 2>/dev/null + +echo " " +echo "-- Server Processes --" +echo " " +echo "################# ps axu #################" +echo " " +$SUDO ps axu + +echo " " +echo "-- Server Processes with resource usage --" +echo " " +echo "################# top -b -n 1 #################" +echo " " +$SUDO top -b -n 1 + +} > /tmp/${MODULE}_configReport.txt + +exit 0 \ No newline at end of file diff --git a/oamapps/columnstoreSupport/findStranded.sh b/oamapps/columnstoreSupport/findStranded.sh new file mode 100755 index 000000000..6bb7f1dd5 --- /dev/null +++ b/oamapps/columnstoreSupport/findStranded.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +# +# This script lists Columnstorelpont data files that do not have associated extent map entries. +# +# NOTES: +# 1) Only looks in $COLUMNSTORE_INSTALL_DIR/data* for the data files. +# 2) Only checks for an existing extent with a matching OID, doesn't validate that there is an +# existing extent for the exact segment. +# +# Close enough for hand grenades. + +if [ -z "$COLUMNSTORE_INSTALL_DIR" ]; then + COLUMNSTORE_INSTALL_DIR=/usr/local/MariaDB/Columnstore +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/mysql +fi + +cd $COLUMNSTORE_INSTALL_DIR + +last=-1 +existsInExtentMap=0 +count=0 + +for i in $COLUMNSTORE_INSTALL_DIR/data*/*/*/*/*/*/FILE*cdf; do + let count++ + oid=`$COLUMNSTORE_INSTALL_DIR/bin/file2oid.pl $i` + if [ $last -ne $oid ]; then + last=$oid + existsInExtentMap=`$COLUMNSTORE_INSTALL_DIR/bin/editem -o $oid | wc -l` + fi + if [ $existsInExtentMap -le 0 ]; then + echo "Missing oid $oid path $i" + fi +done diff --git a/oamapps/columnstoreSupport/getMinMax.sh b/oamapps/columnstoreSupport/getMinMax.sh new file mode 100755 index 000000000..3ad844867 --- /dev/null +++ b/oamapps/columnstoreSupport/getMinMax.sh @@ -0,0 +1,132 @@ +#!/bin/bash + +# +# Reports the max value from the extent map for the given column. +# + +# +# Initialize variables. +# + +if [ -z "$MYSQLCMD" ]; then + INSTALLDIR="/usr/local/MariaDB/Columnstore" + MYSQLCNF=$INSTALLDIR/mysql/my.cnf + MYSQLCMD="$INSTALLDIR/mysql/bin/mysql --defaults-file=$MYSQLCNF -u root" +fi + +# +# Validate that there are three parameters - schema and table and columnname. +# +if [ $# -ne 3 ]; then + echo "" + echo "Reports the max value for the given column." + echo "" + echo "Parameters:" + echo " Schema" + echo " Table" + echo " Column" + exit 1 +fi +db=$1 +table=$2 +column=$3 + +# +# Validate that the column exists. +# +sql="select count(*) from syscolumn where \`schema\`='$db' and tablename='$table' and columnname='$column';" +count=`$MYSQLCMD columnstoresys --skip-column-names -e "$sql;"` +if [ $count -le 0 ]; then + echo "" + echo "$db.$table.$column does not exist in Columnstore." + echo "" + exit 1 +fi + +# +# Validate that the column type is one that this script supports. +# Supported Types: +# 6 int +# 8 date +# 9 bigint +# 11 datetime +sql="select datatype from syscolumn where \`schema\`='$db' and tablename='$table' and columnname='$column';" +dataType=`$MYSQLCMD columnstoresys --skip-column-names -e "$sql"` +if [ $dataType -ne 6 ] && [ $dataType -ne 8 ] && [ $dataType -ne 9 ] && [ $dataType -ne 11 ]; then + echo "" + echo "The column data type must be an int, bigint, date, or datetime." + echo "" + exit 1 +fi + +# +# Grab the objectid for the column. +# +sql="select objectid from syscolumn where \`schema\`='$db' and tablename='$table' and columnname='$column';" +objectid=`$MYSQLCMD columnstoresys --skip-column-names -e "$sql"` + +# +# Set the editem specific parameter if the column is a date or datetime. +# +if [ $dataType -eq 8 ]; then + parm="-t" +elif [ $dataType -eq 11 ]; then + parm="-s" +fi + +# +# Use the editem utility to get the min and max value. +# +/usr/local/MariaDB/Columnstore/bin/editem -o $objectid $parm | grep max | awk -v dataType=$dataType ' + BEGIN { + allValid=1; + foundValidExtent=0; + } + { + if(dataType == 11) { + state=substr($14, 1, length($14)-1); # Datetime has date and time as two fields. + thisMin=$6 " " substr($7, 1, length($7)-1); + thisMax=$9 " " substr($10, 1, length($10)-1); + } + else { + state=substr($12, 1, length($12)-1); + thisMin=substr($6, 1, length($6)-1); + thisMax=substr($8, 1, length($8)-1); + } + if(state == "valid") { + if(!foundValidExtent) { + min=thisMin; + max=thisMax; + foundValidExtent=1; + } + else { + if(thisMin < min) { + min=thisMin; + } + if(thisMax > max) { + max=thisMax; + } + } + } + else { + allValid=0; + } + } + END { + if(foundValidExtent == 1) { + print ""; + print "Min=" min; + print "Max=" max; + print ""; + if(allValid == 0) { + print "Not all extents had min and max values set. Answer is incomplete." + } + } + else { + print ""; + print "There were not any extents with valid min/max values. Unable to provide answer."; + print ""; + } + }' + +exit 0 diff --git a/oamapps/columnstoreSupport/hadoopReport.sh b/oamapps/columnstoreSupport/hadoopReport.sh new file mode 100755 index 000000000..983ee19ef --- /dev/null +++ b/oamapps/columnstoreSupport/hadoopReport.sh @@ -0,0 +1,69 @@ +#! /bin/sh +# + +if [ $1 ] ; then + MODULE=$1 +else + MODULE="pm1" +fi + +if [ $2 ] ; then + INSTALLDIR=$2 +else + INSTALLDIR="/usr/local/MariaDB/Columnstore" +fi + +if [ $USER = "hdfs" ]; then + SUDO=" " +else + SUDO="sudo -u hdfs" +fi + +sudo rm -f /tmp/hdfsReport.txt + +{ +echo +echo "****************************** HDFS REPORT ********************************" +echo +echo "-- Hadoop version --" +echo +echo "################# hadoop version #################" +echo +$SUDO hadoop version + +echo +echo "-- Data File Plugin --" +echo +echo "######### $INSTALLDIR/bin/getConfig SystemConfig DataFilePlugin ##########" +echo +sudo $INSTALLDIR/bin/getConfig SystemConfig DataFilePlugin + +echo +echo +echo "-- Hadoop Configuration File --" +echo +echo "################ core-site.xml ################" +echo +cat $HADOOP_CONF_DIR/core-site.xml + +echo +echo "################ hdfs-site.xml ################" +echo +cat $HADOOP_CONF_DIR/hdfs-site.xml + +echo +echo "-- Hadoop Health Check --" +echo +echo "################# hdfs dfsadmin -report #################" +echo +$SUDO hadoop dfsadmin -report 2>/dev/null + +echo +echo "-- HDFS check --" +echo +echo "################# hdfs fsck $INSTALLDIR #################" +echo +$SUDO hadoop fsck $INSTALLDIR 2>/dev/null +} > /tmp/hadoopReport.txt + +exit 0 diff --git a/oamapps/columnstoreSupport/hardwareReport.sh b/oamapps/columnstoreSupport/hardwareReport.sh new file mode 100755 index 000000000..c789b0cdf --- /dev/null +++ b/oamapps/columnstoreSupport/hardwareReport.sh @@ -0,0 +1,101 @@ +#! /bin/sh +# +# $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}_hardwareReport.txt + +{ +echo " " +echo "******************** Hardware Report for ${MODULE} ********************" +echo " " + +echo "-- Server OS Version --" +echo " " +echo "################# cat /proc/version #################" +echo " " +$SUDO cat /proc/version 2>/dev/null +echo " " +echo "################# uname -a #################" +echo " " +uname -a +echo " " +echo "################# cat /etc/issue #################" +echo " " +cat /etc/issue 2>/dev/null +echo " " +echo "run os_check.sh" +echo " " +echo "################# /bin/os_check.sh #################" +echo " " +$INSTALLDIR/bin/os_check.sh 2>/dev/null + +echo " " +echo "-- Server Uptime --" +echo " " +echo "################# uptime #################" +echo " " +uptime + +echo " " +echo "-- Server cpu-info --" +echo " " +echo "################# cat /proc/cpuinfo #################" +echo " " +$SUDO cat /proc/cpuinfo 2>/dev/null + +echo " " +echo "-- Server memory-info --" +echo " " +echo "################# cat /proc/meminfo #################" +echo " " +$SUDO cat /proc/meminfo 2>/dev/null + +echo " " +echo "-- Server mounts --" +echo " " +echo "################# cat /proc/mounts #################" +echo " " +$SUDO cat /proc/mounts 2>/dev/null + +echo " " +echo "-- Server Disk Scheduler for Columnstore Mounts --" +echo " " +for scsi_dev in `mount | awk '/mnt\/tmp/ {print $1}' | awk -F/ '{print $3}' | sed 's/[0-9]*$//'`; do + echo '/dev/'$scsi_dev ' scheduler setup is' + cat /sys/block/$scsi_dev/queue/scheduler 2>/dev/null +done +for scsi_dev in `mount | awk '/MariaDB/Columnstore\/data/ {print $1}' | awk -F/ '{print $3}' | sed 's/[0-9]*$//'`; do + if [ $scsi_dev != "local" ] ; then + echo '/dev/'$scsi_dev ' scheduler setup is' + cat /sys/block/$scsi_dev/queue/scheduler 2>/dev/null + fi +done + +echo " " +echo "-- Server Ethernet Configuration --" +echo " " +echo "################# ifconfig -a #################" +echo " " +ifconfig -a 2>/dev/null + +} > /tmp/${MODULE}_hardwareReport.txt + +exit 0 \ No newline at end of file diff --git a/oamapps/columnstoreSupport/logReport.sh b/oamapps/columnstoreSupport/logReport.sh new file mode 100755 index 000000000..13a44c041 --- /dev/null +++ b/oamapps/columnstoreSupport/logReport.sh @@ -0,0 +1,27 @@ +#! /bin/sh +# +# $Id: logReport.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}_logReport.tar.gz + +tar -zcf /tmp/${MODULE}_logReport.tar.gz /var/log/MariaDB/Columnstore > /dev/null 2>&1 + +exit 0 diff --git a/oamapps/columnstoreSupport/minMaxCheck.sh b/oamapps/columnstoreSupport/minMaxCheck.sh new file mode 100755 index 000000000..c29d7be0b --- /dev/null +++ b/oamapps/columnstoreSupport/minMaxCheck.sh @@ -0,0 +1,170 @@ +#!/bin/bash +# +# $Id: minMaxCheck.sh 1479 2011-07-20 09:53:32Z wweeks $ +# + +# +# This script resets the EM Min/Max values for the coluns defined in the cols array. +# +# Usage: +# ./minMax.sh +# runs against the columns defined in the cols array below. +# ./minMaxCheck.sh all +# run for all CP columns in the database (will take a long time against a large database). +# ./minMaxCheck.sh schemaname +# run for CP columns in tables in the schema. If your schema is named all, you'll get all columns. +# ./minMaxCheck.sh schemaname tablename +# run for CP columns against the given table. +# ./minMaxCheck.sh schemaname tablename columnname +# run against the given column. +# +# The script does the following: +# 1) Runs editem for the column. +# 2) Clears the min/max for the column with editem -c. +# 3) Counts the column so that the min/max get set again. +# 4) Runs editem for the column again. +# 5) Diffs the two editem runs and reports / saves the sdiff log files for the column if any of extents had the min/max changed. +# +# Notes: +# 1) An info.log entry will be logged at the end of the script if none of the columns checked had a bad extent map entry. +# Example: +# Mar 11 14:11:29 srvqaperf8 oamcpp[9872]: 29.091980 |0|0|0| I 08 CAL0000: min-max-monitor: okay +# 2) Two warning.log entries will be logged at the end of the script if one or min/max EM entries were corrected. +# Example: +# Mar 11 14:16:36 srvqaperf8 oamcpp[16364]: 36.231731 |0|0|0| W 08 CAL0000: min-max-monitor: some values were reset for oids 3004 3005 +# Mar 11 14:16:36 srvqaperf8 oamcpp[16365]: 36.263270 |0|0|0| W 08 CAL0000: min-max-monitor: log files are /tmp/idb_mm_mon.sdiff.*.15190 +# 3) The script outputs the results of the selects in #3 above as it's going through the columns and will echo a line when it finds a col that was corrected. +# Example: +# **** Extent map min/max changed on the scan. See results in /tmp/idb_mm_mon.sdiff.3039.15190 + + +# Define the cols array. Here's a sql statement that will list the date and datetime cols in the expected format. +# idbmysql columnstoresys -e "select concat(objectid, ':', \`schema\`, '.', tablename, '.', columnname) from syscolumn where datatype in (8, 11) and tablename not like 'temp%';" > www.txt +# +# NOTE: The objectid will be looked up again when it's going through the columns in case the one in the array becomes stale. +# + +if [ -z "$MYSQLCMD" ]; then + MYSQLCMD="/usr/local/MariaDB/Columnstore/mysql/bin/mysql --defaults-file=/usr/local/MariaDB/Columnstore/mysql/my.cnf -u root" +fi + +if [ -z "$INSTALLDIR" ]; then + INSTALLDIR="/usr/local/MariaDB/Columnstore" +fi + +if [ -z "$PGMPATH" ]; then + PGMPATH=$INSTALLDIR/bin +fi + +cols=( +1339664:tpch1.orders.o_orderdate +1339718:tpch1.lineitem.l_shipdate +1339719:tpch1.lineitem.l_commitdate +1339720:tpch1.lineitem.l_receiptdate +1339759:dml.orders.o_orderdate +1339813:dml.lineitem.l_shipdate +1339814:dml.lineitem.l_commitdate +1339815:dml.lineitem.l_receiptdate +) + +# +# If called with "all", run the script against all of the column types that use CP. +# +if [ $# -eq 1 ] && [ "$1" == "all" ]; then + $MYSQLCMD --execute="select concat(objectid, ':', \`schema\`, '.', tablename, '.', columnname) from syscolumn where datatype not in (4, 10, 13) and not (datatype = 2 and columnlength > 8) and not (datatype = 12 and columnlength > 7);" columnstoresys --skip-column-names > /tmp/idb_mm_mon.cols + cols=( $( cat /tmp/idb_mm_mon.cols ) ) + rm -f /tmp/idb_mm_mon.cols + +# +# Else if one parm passed, run against the columns in the given schema. +# +elif [ $# -eq 1 ]; then + db=$1 + $MYSQLCMD --execute="select concat(objectid, ':', \`schema\`, '.', tablename, '.', columnname) from syscolumn where datatype not in (4, 10, 13) and not (datatype = 2 and columnlength > 8) and not (datatype = 12 and columnlength > 7) and \`schema\` = '$db';" columnstoresys --skip-column-names > /tmp/idb_mm_mon.cols + cols=( $( cat /tmp/idb_mm_mon.cols ) ) + rm -f /tmp/idb_mm_mon.cols + +# +# Else if two parms passed, run the script against all the columns that use CP for that table. +# +elif [ $# -eq 2 ]; then + db=$1 + tbl=$2 + $MYSQLCMD --execute="select concat(objectid, ':', \`schema\`, '.', tablename, '.', columnname) from syscolumn where datatype not in (4, 10, 13) and not (datatype = 2 and columnlength > 8) and not (datatype = 12 and columnlength > 7) and \`schema\` = '$db' and tablename = '$tbl';" columnstoresys --skip-column-names > /tmp/idb_mm_mon.cols + cols=( $( cat /tmp/idb_mm_mon.cols ) ) + rm -f /tmp/idb_mm_mon.cols + +# +# Else if three parms passed, run the script against the column. +# +elif [ $# -eq 3 ]; then + db=$1 + tbl=$2 + col=$3 + $MYSQLCMD --execute="select concat(objectid, ':', \`schema\`, '.', tablename, '.', columnname) from syscolumn where \`schema\` = '$db' and tablename = '$tbl' and columnname='$col';" columnstoresys --skip-column-names > /tmp/idb_mm_mon.cols + cols=( $( cat /tmp/idb_mm_mon.cols ) ) + rm -f /tmp/idb_mm_mon.cols +fi + +i=0 +j=0 + +if [ ${#cols[@]} -le 0 ]; then + $PGMPATH/cplogger -w 0 "min-max-monitor: no qualifying columns" "$badoidlist" + echo "min-max-monitor: no qualifying columns" "$badoidlist" + exit 1 +fi + +badoidlist= +while [ $i -lt ${#cols[@]} ]; do + let row=$i+1 + echo "" + echo "Evaluating $row of ${#cols[@]} at `date`. Col is ${cols[$i]}." + eval $(echo ${cols[$i]} | awk -F: '{printf "oid=%d\ntcn=%s\n", $1, $2}') + eval $(echo $tcn | awk -F. '{printf "schema=%s\ntable=%s\ncolumn=%s\n", $1, $2, $3}') + + # + # Look up the oid if the cols array is being used to keep from having to continually update the array if tables are dropped and recreated. + # + if [ $# -eq 0 ]; then + $MYSQLCMD --execute="select concat(objectid, ':', \`schema\`, '.', tablename, '.', columnname) from syscolumn where \`schema\` = '$schema' and tablename='$table' and columnname='$column';" columnstoresys --skip-column-names > /tmp/idb_mm_mon.cols + results=`wc -l /tmp/idb_mm_mon.cols | awk '{print $1}'` + if [ $results -eq 0 ]; then + oid=0 + else + oid=`cat /tmp/idb_mm_mon.cols` + fi + fi + + $PGMPATH/editem -o$oid | awk '{print $1, $6, $8, $12}' >/tmp/idb_mm_mon.$oid.1.$$ + $PGMPATH/editem -c$oid + $MYSQLCMD --execute="select count($column) from $table" $schema -vvv + $PGMPATH/editem -o$oid | awk '{print $1, $6, $8, $12}' >/tmp/idb_mm_mon.$oid.2.$$ + sdiff /tmp/idb_mm_mon.$oid.1.$$ /tmp/idb_mm_mon.$oid.2.$$ --suppress-common-lines | grep -n -v invalid > /tmp/idb_mm_mon.sdiff.$oid.$$ + count=`wc -l /tmp/idb_mm_mon.sdiff.$oid.$$ | awk '{print $1}'` + if [ $count -ne 0 ]; then + badoidlist="$badoidlist $oid" + ((j++)) + echo "**** Extent map min/max changed on the scan. See results in /tmp/idb_mm_mon.sdiff.$oid.$$" + else + rm -f /tmp/idb_mm_mon.sdiff.$oid.$$ + fi + rm -f /tmp/idb_mm_mon.$oid.*.$$ + ((i++)) +done +echo "" +if [ $j -eq 0 ]; then + $PGMPATH/cplogger -i 0 "min-max-monitor: okay" + echo "min-max-monitor: okay" + echo "" + exit 0 +else + $PGMPATH/cplogger -w 0 "min-max-monitor: some values were reset for oids" "$badoidlist" + $PGMPATH/cplogger -w 0 "min-max-monitor: log files are /tmp/idb_mm_mon.sdiff.*.$$" + echo "min-max-monitor: some values were reset for oids" "$badoidlist" + echo "min-max-monitor: log files are /tmp/idb_mm_mon.sdiff.*.$$" + echo "" + exit 1 +fi + + diff --git a/oamapps/columnstoreSupport/resourceReport.sh b/oamapps/columnstoreSupport/resourceReport.sh new file mode 100755 index 000000000..5bd0e0c06 --- /dev/null +++ b/oamapps/columnstoreSupport/resourceReport.sh @@ -0,0 +1,74 @@ +#! /bin/sh +# +# $Id: resourceReport.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}_resourceReport.txt + +{ +echo " " +echo "******************** Resource Usage Report for ${MODULE} ********************" +echo " " + +echo " " +echo "-- Shared Memory --" +echo " " +echo "################# ipcs -l #################" +echo " " +$SUDO ipcs -l + +echo "################# $INSTALLDIR/bin/clearShm -n #################" +echo " " +$INSTALLDIR/bin/clearShm -n + +echo " " +echo "-- Disk Usage --" +echo " " +echo "################# df -k #################" +echo " " +$SUDO df -k + +echo " " +echo "-- Disk BRM Data files --" +echo " " +ls -l $INSTALLDIR/data1/systemFiles/dbrm 2> /dev/null +ls -l $INSTALLDIR/dbrm 2> /dev/null + +echo "################# cat $INSTALLDIR/data1/systemFiles/dbrm/BRM_saves_current #################" +echo " " +cat $INSTALLDIR/data1/systemFiles/dbrm/BRM_saves_current 2> /dev/null + +echo " " +echo "-- View Table Locks --" +echo " " +echo "################# cat bin/viewtablelock #################" +echo " " +$INSTALLDIR/bin/viewtablelock 2> /dev/null + +echo " " +echo "-- BRM Extent Map --" +echo " " +echo "################# bin/editem -i #################" +echo " " +$INSTALLDIR/bin/editem -i 2>/dev/null + +} > /tmp/${MODULE}_resourceReport.txt + +exit 0 \ No newline at end of file diff --git a/oamapps/columnstoreSupport/softwareReport.sh b/oamapps/columnstoreSupport/softwareReport.sh new file mode 100755 index 000000000..f29e05d2a --- /dev/null +++ b/oamapps/columnstoreSupport/softwareReport.sh @@ -0,0 +1,53 @@ +#!/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 "-- 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 + +echo " " +echo "-- Columnstore 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/sqlLogs.sh b/oamapps/columnstoreSupport/sqlLogs.sh new file mode 100755 index 000000000..5cf607c04 --- /dev/null +++ b/oamapps/columnstoreSupport/sqlLogs.sh @@ -0,0 +1,225 @@ +#!/bin/bash + +# +# Script that does analysis on SQL statements from an Columnstore debug log. +# +DB=idb_idb_sqllogs +TABLE=statements + +if [ -z "$COLUMNSTORE_INSTALL_DIR" ]; then + COLUMNSTORE_INSTALL_DIR=/usr/local/MariaDB/Columnstore +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/mysql +fi + + +if [ -z "$MYSQLCMD" ]; then + MYSQLCMD="$COLUMNSTORE_INSTALL_DIR/mysql/bin/mysql --defaults-file=$COLUMNSTORE_INSTALL_DIR/mysql/my.cnf -u root" + export MYSQLCMD +fi + +main() +{ + if [ "$option" == "usage" ]; then + usage + exit + elif [ "$option" == "create" ]; then + if [ -f $logFile ]; then + create + else + echo "" + usage + echo "" + echo "*** $logFile not found. Pleae specify a valid debug log file.***" + echo "" + exit + fi + elif [ "$option" == "list" ]; then + list + elif [ "$option" == "listAll" ]; then + listAll + elif [ "$option" == "active" ]; then + listActive + elif [ "$option" == "activeAll" ]; then + listActiveAll + else + echo "" + usage + echo "*** $option is not a valid option. ***" + echo "" + exit + fi + +} + +usage () +{ + echo " + This script can be used to analyze select statements from an Columnstore debug log. + + Usage: + + ./sqlLogs.sh create [debug log file name - default:debug.log] + Creates an $DB.$TABLE table with the select statements from the debug log. Must be run before other options can be used. + + ./sqlLogs.sh list + Lists the SQL statements and run times showing the following: + id - statement id in sequential order based on the start time + starttime - start time of the statement + endtime - end time of the statement + runtime - total run time of the statement + sessionid - the MySQL session id for the statement + sessionstatementid - the sequence of the statement within the session + + ./sqlLogs.sh listAll + Same as list with the addition of the SQL statement. + + ./sqlLogs.sh active timestamp + Example: ./sqlLogs.sh active 00:35:50.291408 + Lists the id, starttime, endtime, runtime, timeActive, sessionid, and sessionstatementid for the sql statements + that were active at the given timestamp. + + ./sqlLogs.sh activeAll timestamp + Same as listActive with the addition of the SQL statement. + " + +} + +create () +{ + echo "" + echo "Step 1 of 4. Building import file with Start SQL log entries." + grep "Start SQL" $logFile | grep -v syscolumn | grep -v systable | awk -F '|' '{print NR "|" substr($1,8,6) substr($1,length($1)-9,9) "|" $2 "|" $5}' | + sort -t '|' -n -k 3 -k 1 | + awk -F '|' ' + { + if(NR == 1) + { + prevSession=$3; + val=1; + } + else if(prevSession == $3) + val++; + else + { + val=1; + prevSession=$3; + } + print $0 "|" val "|" + }' | sort -t '|' -n -k 1 > /tmp/idbtmp.tbl + + echo "Step 2 of 4. Populating $DB.start table with Start SQL log entries." + sql=" + create database if not exists $DB; + use $DB; + drop table if exists start; + CREATE TABLE start ( + id int, + time char(20), + sessionid int, + statement varchar(8000), + sessionStatementId int + ) ENGINE=MyISAM ; + create index start_idx on start (sessionid, sessionStatementId); + load data infile '/tmp/idbtmp.tbl' into table start fields terminated by '|'; + " + $MYSQLCMD -e "$sql" + + echo "Step 3 of 4. Building import file with End SQL log entries." + grep "End SQL" $logFile | grep -v "2147483" | awk -F '|' '{print NR "|" substr($1,8,6) substr($1,length($1)-9,9) "|" $2}' | + sort -t '|' -n -k 3 -k 1 | + awk -F '|' ' + { + if(NR == 1) + { + prevSession=$3; + val=1; + } + else if(prevSession == $3) + val++; + else + { + val=1; + prevSession=$3; + } + print $0 "|" val "|" + }' | sort -t '|' -n -k 1 > /tmp/idbtmp.tbl + + echo "Step 4 of 4. Populating $DB.stop table with End SQL log entries." + sql=" + drop table if exists stop; + CREATE TABLE stop ( + id int, + time char(20), + sessionid int, + sessionStatementId int + ) ENGINE=MyISAM ; + create index stop_idx on stop (sessionid, sessionStatementId); + load data infile '/tmp/idbtmp.tbl' into table stop fields terminated by '|'; + " + $MYSQLCMD $DB -e "$sql;" + + echo "Step 5 of 5. Populating $DB.$TABLE table." + sql=" + drop table if exists $TABLE; + create table $TABLE as + (select + a.id id, a.time starttime, b.time endtime, substr(timediff(b.time, a.time), 1, 30) runTime, a.sessionid sessionId, a.sessionstatementid sessionStatementId, a.statement statement + from start a left join stop b + on a.sessionid = b.sessionid and a.sessionstatementid = b.sessionstatementid); + " + $MYSQLCMD $DB -e "$sql" + + echo "All done." + echo "" +} + +list() { + sql="select id, starttime, endtime, runtime, sessionid, sessionstatementid from statements;" + $MYSQLCMD $DB -vvv -e "$sql" +} + +listAll() +{ + sql="select id, starttime, endtime, runtime, sessionid, sessionstatementid, trim(statement) statement from statements;" + $MYSQLCMD $DB -vvv -e "$sql" +} + +listActive() +{ + dtm=$parm2 + sql=" + select id, starttime, endtime, runtime, timediff('$dtm', starttime) timeActive, sessionid, sessionstatementid from statements + where starttime <= '$dtm' and (endtime is null or endtime > '$dtm'); + " + $MYSQLCMD $DB -vvv -e "$sql" +} + +listActiveAll() +{ + dtm=$parm2 + sql=" + select id, starttime, endtime, runtime, timediff('$dtm', starttime) timeActive, sessionid, sessionstatementid, trim(statement) statement from statements + where starttime <= '$dtm' and (endtime is null or endtime > '$dtm'); + " + $MYSQLCMD $DB -vvv -e "$sql" +} + +if [ $# -lt 1 ]; then + usage + exit +else + option=$1 + parm2=$2 + logFile=debug.log + if [ $# -ge 2 ]; then + logFile=$2 + fi +fi + +main diff --git a/oamapps/hardwareMonitor/Makefile b/oamapps/hardwareMonitor/Makefile index 1fb8efd33..dedcd6bb7 100644 --- a/oamapps/hardwareMonitor/Makefile +++ b/oamapps/hardwareMonitor/Makefile @@ -18,7 +18,7 @@ CXXFLAGS+=$(DEBUG_FLAGS) -Wall # anywhere except in ../oamcpp CLIBS=-L$(EXPORT_ROOT)/lib -lloggingcpp -lsnmpmanager -lnetsnmpmibs -lnetsnmpagent -lnetsnmp \ -lnetsnmpmibs -lnetsnmphelpers -loamcpp -lmessageqcpp -lconfigcpp -lboost_filesystem -lssl -lxml2 -ldl -LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib TLIBS=-lcppunit -ldl GLIBS=$(CLIBS) -lcppunit -ldl LD_LIBRARY_PATH= diff --git a/oamapps/mcsadmin/Makefile b/oamapps/mcsadmin/Makefile index 2fc16ca6a..42b40d138 100755 --- a/oamapps/mcsadmin/Makefile +++ b/oamapps/mcsadmin/Makefile @@ -27,7 +27,7 @@ CXXFLAGS+=$(DEBUG_FLAGS) -Wall # we need to add some search paths here because on a boostrap build we won't find liboamcpp # anywhere except in ../oamcpp CLIBS=-L../oamcpp -L$(EXPORT_ROOT)/lib $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib TLIBS=-L/usr/local/lib -lcppunit -ldl GLIBS=$(CLIBS) diff --git a/oamapps/mcsadmin/Makefile~ b/oamapps/mcsadmin/Makefile~ index c7802aa3c..7df230913 100755 --- a/oamapps/mcsadmin/Makefile~ +++ b/oamapps/mcsadmin/Makefile~ @@ -27,7 +27,7 @@ CXXFLAGS+=$(DEBUG_FLAGS) -Wall # we need to add some search paths here because on a boostrap build we won't find liboamcpp # anywhere except in ../oamcpp CLIBS=-L../oamcpp -L$(EXPORT_ROOT)/lib $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib TLIBS=-L/usr/local/lib -lcppunit -ldl GLIBS=$(CLIBS) diff --git a/oamapps/postConfigure/Makefile b/oamapps/postConfigure/Makefile index 61d9ff687..4276d39cf 100755 --- a/oamapps/postConfigure/Makefile +++ b/oamapps/postConfigure/Makefile @@ -19,8 +19,8 @@ VERSION=1.0.0 CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2 CXXFLAGS+=$(DEBUG_FLAGS) -Wall -CLIBS=-L$(EXPORT_ROOT)/lib -L/usr/local/Calpont/lib $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +CLIBS=-L$(EXPORT_ROOT)/lib -L/usr/local/MariaDB/Columnstore/lib $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) +LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib TLIBS=-lcppunit -ldl GLIBS=$(CLIBS) -lcppunit -ldl diff --git a/oamapps/postConfigure/amazonInstaller.cpp b/oamapps/postConfigure/amazonInstaller.cpp index 7292c7ce7..13391b950 100644 --- a/oamapps/postConfigure/amazonInstaller.cpp +++ b/oamapps/postConfigure/amazonInstaller.cpp @@ -113,7 +113,7 @@ string SystemSection = "SystemConfig"; string InstallSection = "Installation"; string ModuleSection = "SystemModuleConfig"; -string installDir = "/usr/local/Calpont"; +string installDir = "/usr/local/MariaDB/Columnstore"; InstanceList uminstancelist; InstanceList pminstancelist; @@ -2750,7 +2750,7 @@ void cleanupSystem(bool terminate) if ( terminate ) { cout << endl << "***** Performing System Cleanup *****" << endl << endl; - system("umount /usr/local/Calpont/data* > /dev/null 2>&1"); + system("umount /usr/local/MariaDB/Columnstore/data* > /dev/null 2>&1"); //run pre-uninstall string cmd = installDir + "/bin/pre-uninstall > /dev/null 2>&1"; diff --git a/oamapps/postConfigure/installer.cpp b/oamapps/postConfigure/installer.cpp index b6f89fdbc..53b28496d 100644 --- a/oamapps/postConfigure/installer.cpp +++ b/oamapps/postConfigure/installer.cpp @@ -123,7 +123,7 @@ int main(int argc, char *argv[]) if (argc >= 13) installDir = argv[12]; else - installDir = "/usr/local/Calpont"; + installDir = "/usr/local/MariaDB/Columnstore"; ofstream file("/dev/null"); diff --git a/oamapps/postConfigure/patchInstaller.cpp b/oamapps/postConfigure/patchInstaller.cpp index 37c1c56bf..27956a05e 100644 --- a/oamapps/postConfigure/patchInstaller.cpp +++ b/oamapps/postConfigure/patchInstaller.cpp @@ -140,7 +140,7 @@ int main(int argc, char *argv[]) if ( moduleName != parentOAMModuleName ) { //run remote patch installer script cout << endl << "----- Performing Patch installation of Module '" + moduleName + "' -----" << endl << endl; - string cmd = "/usr/local/Calpont/bin/patch_installer.sh " + moduleName + " " + moduleIPAddr + " " + password + " " + patchLocation + " " + installLocation + " " + softwareFile + " " + installer_debug; + string cmd = "/usr/local/MariaDB/Columnstore/bin/patch_installer.sh " + moduleName + " " + moduleIPAddr + " " + password + " " + patchLocation + " " + installLocation + " " + softwareFile + " " + installer_debug; int rtnCode = system(cmd.c_str()); if (rtnCode != 0) diff --git a/oamapps/postConfigure/postConfigure.cpp b/oamapps/postConfigure/postConfigure.cpp index 2acca16cb..1c9db1240 100644 --- a/oamapps/postConfigure/postConfigure.cpp +++ b/oamapps/postConfigure/postConfigure.cpp @@ -233,7 +233,7 @@ int main(int argc, char *argv[]) if (rlrc > 0) { thisexepath[rlrc] = 0; - //should look something like '/usr/local/Calpont/bin/postConfigure' + //should look something like '/usr/local/MariaDB/Columnstore/bin/postConfigure' char* ptr; ptr = strrchr(thisexepath, '/'); if (ptr) diff --git a/oamapps/replayTransactionLog/Makefile b/oamapps/replayTransactionLog/Makefile index 1cb9f66d3..4ff47ea12 100644 --- a/oamapps/replayTransactionLog/Makefile +++ b/oamapps/replayTransactionLog/Makefile @@ -17,7 +17,7 @@ CXXFLAGS+=$(DEBUG_FLAGS) -Wall -D_DEBUG # we need to add some search paths here because on a bootstrap build we won't find liboamcpp # anywhere except in ../oamcpp CLIBS=-L$(EXPORT_ROOT)/lib $(IDB_COMMON_LIBS) -lreplaytxnlog $(IDB_SNMP_LIBS) -LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib TLIBS=-lcppunit -ldl GLIBS=$(CLIBS) -lcppunit -ldl diff --git a/oamapps/resourceMonitor/Makefile b/oamapps/resourceMonitor/Makefile index 9f01a8025..31e72c055 100644 --- a/oamapps/resourceMonitor/Makefile +++ b/oamapps/resourceMonitor/Makefile @@ -16,10 +16,10 @@ CXXFLAGS+=$(DEBUG_FLAGS) -Wall # we need to add some search paths here because on a boostrap build we won't find liboamcpp # anywhere except in ../oamcpp -CLIBS=-L../oamcpp -L$(EXPORT_ROOT)/lib -L/usr/local/Calpont/lib -loamcpp -lmessageqcpp -lconfigcpp \ +CLIBS=-L../oamcpp -L$(EXPORT_ROOT)/lib -L/usr/local/MariaDB/Columnstore/lib -loamcpp -lmessageqcpp -lconfigcpp \ -lxml2 -lsnmpmanager -lnetsnmpmibs -lnetsnmpagent -lnetsnmp -lnetsnmpmibs -lnetsnmphelpers \ -lboost_filesystem -lloggingcpp -LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib TLIBS=-lcppunit -ldl GLIBS=$(CLIBS) -lcppunit -ldl LD_LIBRARY_PATH= diff --git a/oamapps/sendtrap/Makefile b/oamapps/sendtrap/Makefile index 9d3658941..a3a3c4877 100755 --- a/oamapps/sendtrap/Makefile +++ b/oamapps/sendtrap/Makefile @@ -16,8 +16,8 @@ CXXFLAGS+=$(DEBUG_FLAGS) -Wall # we need to add some search paths here because on a boostrap build we won't find liboamcpp # anywhere except in ../oamcpp -CLIBS=-L../oamcpp -L$(EXPORT_ROOT)/lib -L/usr/local/Calpont/lib $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +CLIBS=-L../oamcpp -L$(EXPORT_ROOT)/lib -L/usr/local/MariaDB/Columnstore/lib $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) +LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib TLIBS=-lcppunit -ldl GLIBS=$(CLIBS) -lcppunit -ldl diff --git a/oamapps/serverMonitor/Makefile b/oamapps/serverMonitor/Makefile index edc4dd133..181161f68 100755 --- a/oamapps/serverMonitor/Makefile +++ b/oamapps/serverMonitor/Makefile @@ -17,7 +17,7 @@ CXXFLAGS+=$(DEBUG_FLAGS) -Wall # we need to add some search paths here because on a boostrap build we won't find liboamcpp # anywhere except in ../oamcpp CLIBS=-L$(EXPORT_ROOT)/lib $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib TLIBS=-lcppunit -ldl GLIBS=$(CLIBS) -lcppunit -ldl diff --git a/oamapps/serverMonitor/diskMonitor.cpp b/oamapps/serverMonitor/diskMonitor.cpp index 33bbafd30..2a751aa87 100644 --- a/oamapps/serverMonitor/diskMonitor.cpp +++ b/oamapps/serverMonitor/diskMonitor.cpp @@ -222,7 +222,7 @@ void diskMonitor() string fileName; // check local if ( deviceName == "/") { - fileName = deviceName + "usr/local/Calpont/releasenum"; + fileName = deviceName + "usr/local/MariaDB/Columnstore/releasenum"; } else { diff --git a/oamapps/sessionWalker/Makefile b/oamapps/sessionWalker/Makefile index 0735ec9b3..a58f819ed 100755 --- a/oamapps/sessionWalker/Makefile +++ b/oamapps/sessionWalker/Makefile @@ -16,12 +16,12 @@ CXXFLAGS+=$(DEBUG_FLAGS) -Wall # we need to add some search paths here because on a boostrap build we won't find liboamcpp # anywhere except in ../oamcpp -CLIBS=-L$(EXPORT_ROOT)/lib -L/usr/local/Calpont/lib $(IDB_COMMON_LIBS) $(IDB_WRITE_LIBS) +CLIBS=-L$(EXPORT_ROOT)/lib -L/usr/local/MariaDB/Columnstore/lib $(IDB_COMMON_LIBS) $(IDB_WRITE_LIBS) TLIBS=-lcppunit -ldl GLIBS=$(CLIBS) -lcppunit -ldl OAMLIBS=-loamcpp -lsnmpmanager -lnetsnmp \ -lnetsnmpagent -lnetsnmphelpers -lnetsnmpmibs -LDFLAGS+=$(CLIBS) $(OAMLIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +LDFLAGS+=$(CLIBS) $(OAMLIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib SRCS=sessionwalker.cpp LINCLUDES= diff --git a/oamapps/traphandler/Makefile b/oamapps/traphandler/Makefile index fe4f161c8..248676bf7 100755 --- a/oamapps/traphandler/Makefile +++ b/oamapps/traphandler/Makefile @@ -16,8 +16,8 @@ CXXFLAGS+=$(DEBUG_FLAGS) -Wall # we need to add some search paths here because on a boostrap build we won't find liboamcpp # anywhere except in ../oamcpp -CLIBS=-L../oamcpp -L$(EXPORT_ROOT)/lib -L/usr/local/Calpont/lib $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +CLIBS=-L../oamcpp -L$(EXPORT_ROOT)/lib -L/usr/local/MariaDB/Columnstore/lib $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) +LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib TLIBS=-lcppunit -ldl GLIBS=$(CLIBS) -lcppunit -ldl diff --git a/primitives/primproc/Makefile b/primitives/primproc/Makefile index afc52793b..e7077e8be 100755 --- a/primitives/primproc/Makefile +++ b/primitives/primproc/Makefile @@ -41,7 +41,7 @@ OAMLIBS=-loamcpp -lsnmpmanager -lnetsnmp -lnetsnmpagent -lnetsnmphelpers -lnetsn # Linker flags LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_COMMON_LIBS) -lthreadpool -lwriteengine \ - -lidbdatafile -lcacheutils $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib + -lidbdatafile -lcacheutils $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib # install dir (set CALPONT_INSTALL_ROOT in env to override) CALPONT_INSTALL_ROOT?=$(EXPORT_ROOT) diff --git a/procmgr/Makefile b/procmgr/Makefile index d507cba19..18a3477a4 100755 --- a/procmgr/Makefile +++ b/procmgr/Makefile @@ -24,7 +24,7 @@ CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2 CXXFLAGS+=$(DEBUG_FLAGS) -Wall # Linker flags -LDFLAGS+=-L../oamcpp -L$(CALPONT_LIBRARY_PATH) $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -lcacheutils -Wl,--rpath -Wl,/usr/local/Calpont/lib +LDFLAGS+=-L../oamcpp -L$(CALPONT_LIBRARY_PATH) $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -lcacheutils -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib .PHONY: install clean test docs FORCE coverage leakcheck diff --git a/procmon/Makefile b/procmon/Makefile index 686b1de94..1b9702a7d 100755 --- a/procmon/Makefile +++ b/procmon/Makefile @@ -22,7 +22,7 @@ CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2 CXXFLAGS+=$(DEBUG_FLAGS) -Wall # Linker flags -LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib .PHONY: install clean test docs FORCE coverage leakcheck diff --git a/procmon/processmonitor.cpp b/procmon/processmonitor.cpp index 38d09e44b..053e06b7d 100644 --- a/procmon/processmonitor.cpp +++ b/procmon/processmonitor.cpp @@ -5472,7 +5472,7 @@ bool ProcessMonitor::amazonIPCheck() log.writeLog(__LINE__, "Module is Running: '" + moduleName + "' / Instance '" + instanceID + "' current IP being reconfigured in Calpont.xml. old = " + IPAddr + ", new = " + currentIPAddr, LOG_TYPE_DEBUG); // update the Calpont.xml with the new IP Address - string cmd = "sed -i s/" + IPAddr + "/" + currentIPAddr + "/g /usr/local/Calpont/etc/Calpont.xml"; + string cmd = "sed -i s/" + IPAddr + "/" + currentIPAddr + "/g /usr/local/MariaDB/Columnstore/etc/Calpont.xml"; system(cmd.c_str()); } else diff --git a/tools/bincvt/Makefile b/tools/bincvt/Makefile index d0c74dd96..aabed4263 100644 --- a/tools/bincvt/Makefile +++ b/tools/bincvt/Makefile @@ -22,7 +22,7 @@ CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2 CXXFLAGS+=$(DEBUG_FLAGS) -Wall # Linker flags -LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) -Wl,--rpath -Wl,/usr/local/Calpont/lib +LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib # install dir (set CALPONT_INSTALL_ROOT in env to override) CALPONT_INSTALL_ROOT?=$(EXPORT_ROOT) diff --git a/tools/clearShm/Makefile b/tools/clearShm/Makefile index ae9063978..b1fbdbe7d 100755 --- a/tools/clearShm/Makefile +++ b/tools/clearShm/Makefile @@ -23,7 +23,7 @@ CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2 CXXFLAGS+=$(DEBUG_FLAGS) -Wall # Linker flags -LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib # install dir (set CALPONT_INSTALL_ROOT in env to override) CALPONT_INSTALL_ROOT?=$(EXPORT_ROOT) diff --git a/tools/cleartablelock/Makefile b/tools/cleartablelock/Makefile index 9e261ec52..42ccf5257 100755 --- a/tools/cleartablelock/Makefile +++ b/tools/cleartablelock/Makefile @@ -23,7 +23,7 @@ CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2 CXXFLAGS+=$(DEBUG_FLAGS) -Wall # Linker flags -LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_WRITE_LIBS) $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_WRITE_LIBS) $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib # install dir (set CALPONT_INSTALL_ROOT in env to override) CALPONT_INSTALL_ROOT?=$(EXPORT_ROOT) diff --git a/tools/configMgt/Makefile b/tools/configMgt/Makefile index bac4242ab..0d7c6ebc4 100755 --- a/tools/configMgt/Makefile +++ b/tools/configMgt/Makefile @@ -17,8 +17,8 @@ VERSION=1.0.0 CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2 CXXFLAGS+=$(DEBUG_FLAGS) -Wall -CLIBS=-L$(EXPORT_ROOT)/lib -L/usr/local/Calpont/lib $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +CLIBS=-L$(EXPORT_ROOT)/lib -L/usr/local/MariaDB/Columnstore/lib $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) +LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib SRCS=autoInstaller.cpp autoConfigure.cpp svnQuery.cpp OBJS=$(SRCS:.cpp=.o) diff --git a/tools/configMgt/autoConfigure.cpp b/tools/configMgt/autoConfigure.cpp index 164587dc3..db79a79ef 100644 --- a/tools/configMgt/autoConfigure.cpp +++ b/tools/configMgt/autoConfigure.cpp @@ -1456,7 +1456,7 @@ int main(int argc, char *argv[]) { int id = *pt; string DBrootID = "DBRoot" + oam.itoa(id);; - string pathID = "/usr/local/Calpont/data" + oam.itoa(id); + string pathID = "/usr/local/MariaDB/Columnstore/data" + oam.itoa(id); try { sysConfigNew->setConfig(SystemSection, DBrootID, pathID); @@ -1528,7 +1528,7 @@ int main(int argc, char *argv[]) { int id = *pt; string DBrootID = "DBRoot" + oam.itoa(id);; - string pathID = "/usr/local/Calpont/data" + oam.itoa(id); + string pathID = "/usr/local/MariaDB/Columnstore/data" + oam.itoa(id); try { sysConfigNew->setConfig(SystemSection, DBrootID, pathID); @@ -1596,7 +1596,7 @@ int main(int argc, char *argv[]) } string DBrootID = "DBRoot" + oam.itoa(i); - string pathID = "/usr/local/Calpont/data" + oam.itoa(i); + string pathID = "/usr/local/MariaDB/Columnstore/data" + oam.itoa(i); try { sysConfigNew->setConfig(SystemSection, DBrootID, pathID); diff --git a/tools/configMgt/buildCalpontPackages.sh b/tools/configMgt/buildCalpontPackages.sh index 921576fab..73b3ffcf4 100755 --- a/tools/configMgt/buildCalpontPackages.sh +++ b/tools/configMgt/buildCalpontPackages.sh @@ -25,13 +25,13 @@ 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 /usr/local/MariaDB/Columnstore rm -rf calpont* rm -f *gz # smbclient //calweb/shared -Wcalpont -Uoamuser%Calpont1 -c "cd Iterations/$DIR;prompt OFF;mget *.rpm" rpm -ivh calpont*.x86_64.rpm --nodeps -rpm -iq calpont >> /usr/local/Calpont/releasenum +rpm -iq calpont >> /usr/local/MariaDB/Columnstore/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/ diff --git a/tools/configMgt/buildDatdupPackages.sh b/tools/configMgt/buildDatdupPackages.sh index 3831232ae..0517bcb14 100755 --- a/tools/configMgt/buildDatdupPackages.sh +++ b/tools/configMgt/buildDatdupPackages.sh @@ -25,7 +25,7 @@ rpm -e infinidb-libs infinidb-platform infinidb-enterprise --nodeps --allmatches rpm -e infinidb-storage-engine infinidb-mysql --nodeps --allmatches rpm -e infinidb-mysql --nodeps --allmatches rpm -e infinidb-datdup --nodeps --allmatches -rm -rf /usr/local/Calpont +rm -rf /usr/local/MariaDB/Columnstore rm -rf infinidb* rm -f *gz # diff --git a/tools/configMgt/configure.cpp b/tools/configMgt/configure.cpp index e857cfe8b..e3c31cf21 100644 --- a/tools/configMgt/configure.cpp +++ b/tools/configMgt/configure.cpp @@ -213,7 +213,7 @@ int main(int argc, char *argv[]) exit (-1); } - cmd = "./remote_scp_get.sh " + parentOAMModuleIPAddr + " " + password + " /usr/local/Calpont/etc/Calpont.xml 0 "; + cmd = "./remote_scp_get.sh " + parentOAMModuleIPAddr + " " + password + " /usr/local/MariaDB/Columnstore/etc/Calpont.xml 0 "; rtnCode = system(cmd.c_str()); if (rtnCode == 0) { cmd = "mv Calpont.xml systems/" + systemName + "/."; @@ -507,7 +507,7 @@ int main(int argc, char *argv[]) } string DBrootID = "DBRoot" + oam.itoa(i); - string pathID = "/usr/local/Calpont/data" + oam.itoa(i); + string pathID = "/usr/local/MariaDB/Columnstore/data" + oam.itoa(i); try { sysConfig->setConfig(SystemSection, DBrootID, pathID); diff --git a/tools/configMgt/dm_parent_installer.sh b/tools/configMgt/dm_parent_installer.sh index 10f20ae0e..818cb0429 100755 --- a/tools/configMgt/dm_parent_installer.sh +++ b/tools/configMgt/dm_parent_installer.sh @@ -147,7 +147,7 @@ if { $CONFIGFILE != "NULL"} { # # copy over Calpont.xml file # - send "scp $CONFIGFILE $USERNAME@$SERVER:/usr/local/Calpont/etc/Calpont.xml\n" + send "scp $CONFIGFILE $USERNAME@$SERVER:/usr/local/MariaDB/Columnstore/etc/Calpont.xml\n" expect -re "word: " # send the password send "$PASSWORD\n" @@ -158,7 +158,7 @@ if { $CONFIGFILE != "NULL"} { -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/Calpont/etc/Calpont.xml.rpmsave\n" + send "scp $CONFIGFILE $USERNAME@$SERVER:/usr/local/MariaDB/Columnstore/etc/Calpont.xml.rpmsave\n" expect -re "word: " # send the password send "$PASSWORD\n" @@ -181,7 +181,7 @@ if { $CONFIGFILE != "NULL"} { # rename previous installed config file # send_user "Copy RPM-saved InfiniDB Configuration File " - send "ssh $USERNAME@$SERVER 'cd /usr/local/Calpont/etc/;mv -f Calpont.xml Calpont.xml.install;cp -v Calpont.xml.rpmsave Calpont.xml'\n" + send "ssh $USERNAME@$SERVER 'cd /usr/local/MariaDB/Columnstore/etc/;mv -f Calpont.xml Calpont.xml.install;cp -v Calpont.xml.rpmsave Calpont.xml'\n" expect -re "word: " # password for ssh send "$PASSWORD\n" diff --git a/tools/configMgt/dm_parent_installer_v3.sh b/tools/configMgt/dm_parent_installer_v3.sh index f76d3fd44..f5d908959 100755 --- a/tools/configMgt/dm_parent_installer_v3.sh +++ b/tools/configMgt/dm_parent_installer_v3.sh @@ -143,7 +143,7 @@ if { $CONFIGFILE != "NULL"} { # copy over Calpont.xml file # send_user "Copy Calpont Configuration File " - send "scp $CONFIGFILE $USERNAME@$SERVER:/usr/local/Calpont/etc/Calpont.xml.rpmsave\n" + send "scp $CONFIGFILE $USERNAME@$SERVER:/usr/local/MariaDB/Columnstore/etc/Calpont.xml.rpmsave\n" expect -re "word: " # send the password send "$PASSWORD\n" @@ -153,7 +153,7 @@ if { $CONFIGFILE != "NULL"} { -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/Calpont/etc/Calpont.xml\n" + send "scp $CONFIGFILE $USERNAME@$SERVER:/usr/local/MariaDB/Columnstore/etc/Calpont.xml\n" expect -re "word: " # send the password send "$PASSWORD\n" @@ -175,7 +175,7 @@ if { $CONFIGFILE != "NULL"} { # rename previous installed config file # send_user "Copy RPM-saved Calpont Configuration File " - send "ssh $USERNAME@$SERVER 'cd /usr/local/Calpont/etc/;mv -f Calpont.xml Calpont.xml.install;cp -v Calpont.xml.rpmsave Calpont.xml'\n" + send "ssh $USERNAME@$SERVER 'cd /usr/local/MariaDB/Columnstore/etc/;mv -f Calpont.xml Calpont.xml.install;cp -v Calpont.xml.rpmsave Calpont.xml'\n" expect -re "word: " # password for ssh send "$PASSWORD\n" diff --git a/tools/configMgt/parent_installer.sh b/tools/configMgt/parent_installer.sh index 469a5c2ac..3cf5365ba 100755 --- a/tools/configMgt/parent_installer.sh +++ b/tools/configMgt/parent_installer.sh @@ -189,7 +189,7 @@ if { $CONFIGFILE != "NULL"} { # copy over Calpont.xml file # send_user "Copy Calpont Configuration File " - send "scp $CONFIGFILE $USERNAME@$SERVER:/usr/local/Calpont/etc/Calpont.xml\n" + send "scp $CONFIGFILE $USERNAME@$SERVER:/usr/local/MariaDB/Columnstore/etc/Calpont.xml\n" expect -re "word: " # send the password send "$PASSWORD\n" @@ -206,7 +206,7 @@ if { $CONFIGFILE != "NULL"} { # rename previous installed config file # send_user "Copy RPM-saved Calpont Configuration File " - send "ssh $USERNAME@$SERVER 'cd /usr/local/Calpont/etc/;mv -f Calpont.xml Calpont.xml.install;cp -v Calpont.xml.rpmsave Calpont.xml'\n" + send "ssh $USERNAME@$SERVER 'cd /usr/local/MariaDB/Columnstore/etc/;mv -f Calpont.xml Calpont.xml.install;cp -v Calpont.xml.rpmsave Calpont.xml'\n" expect -re "word: " # password for ssh send "$PASSWORD\n" diff --git a/tools/configMgt/pm_parent_installer.sh b/tools/configMgt/pm_parent_installer.sh index b62b5598d..88d32a5e2 100755 --- a/tools/configMgt/pm_parent_installer.sh +++ b/tools/configMgt/pm_parent_installer.sh @@ -130,7 +130,7 @@ expect -re {[$#] } send "rm -f $PACKAGE\n" # if { $CONFIGFILE != "NULL"} { - send "scp $CONFIGFILE $USERNAME@$SERVER:/usr/local/Calpont/etc/Calpont.xml\n" + send "scp $CONFIGFILE $USERNAME@$SERVER:/usr/local/MariaDB/Columnstore/etc/Calpont.xml\n" expect -re "word: " # send the password send "$PASSWORD\n" @@ -144,7 +144,7 @@ if { $CONFIGFILE != "NULL"} { # copy over Calpont.xml file # send_user "Copy InfiniDB Configuration File " - send "scp $CONFIGFILE $USERNAME@$SERVER:/usr/local/Calpont/etc/Calpont.xml.rpmsave\n" + send "scp $CONFIGFILE $USERNAME@$SERVER:/usr/local/MariaDB/Columnstore/etc/Calpont.xml.rpmsave\n" expect -re "word: " # send the password send "$PASSWORD\n" @@ -167,7 +167,7 @@ if { $CONFIGFILE != "NULL"} { # rename previous installed config file # send_user "Copy RPM-saved InfiniDB Configuration File " - send "ssh $USERNAME@$SERVER 'cd /usr/local/Calpont/etc/;mv -f Calpont.xml Calpont.xml.install;cp -v Calpont.xml.rpmsave Calpont.xml'\n" + send "ssh $USERNAME@$SERVER 'cd /usr/local/MariaDB/Columnstore/etc/;mv -f Calpont.xml Calpont.xml.install;cp -v Calpont.xml.rpmsave Calpont.xml'\n" expect -re "word: " # password for ssh send "$PASSWORD\n" diff --git a/tools/configMgt/pm_parent_installer_v3.sh b/tools/configMgt/pm_parent_installer_v3.sh index f11a70aad..5b2506a5b 100755 --- a/tools/configMgt/pm_parent_installer_v3.sh +++ b/tools/configMgt/pm_parent_installer_v3.sh @@ -130,7 +130,7 @@ if { $CONFIGFILE != "NULL"} { # copy over Calpont.xml file # send_user "Copy Calpont Configuration File " - send "scp $CONFIGFILE $USERNAME@$SERVER:/usr/local/Calpont/etc/Calpont.xml.rpmsave\n" + send "scp $CONFIGFILE $USERNAME@$SERVER:/usr/local/MariaDB/Columnstore/etc/Calpont.xml.rpmsave\n" expect -re "word: " # send the password send "$PASSWORD\n" @@ -140,7 +140,7 @@ if { $CONFIGFILE != "NULL"} { -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/Calpont/etc/Calpont.xml\n" + send "scp $CONFIGFILE $USERNAME@$SERVER:/usr/local/MariaDB/Columnstore/etc/Calpont.xml\n" expect -re "word: " # send the password send "$PASSWORD\n" @@ -162,7 +162,7 @@ if { $CONFIGFILE != "NULL"} { # rename previous installed config file # send_user "Copy RPM-saved Calpont Configuration File " - send "ssh $USERNAME@$SERVER 'cd /usr/local/Calpont/etc/;mv -f Calpont.xml Calpont.xml.install;cp -v Calpont.xml.rpmsave Calpont.xml'\n" + send "ssh $USERNAME@$SERVER 'cd /usr/local/MariaDB/Columnstore/etc/;mv -f Calpont.xml Calpont.xml.install;cp -v Calpont.xml.rpmsave Calpont.xml'\n" expect -re "word: " # password for ssh send "$PASSWORD\n" diff --git a/tools/cplogger/Makefile b/tools/cplogger/Makefile index 9bda1006a..7ecf1c147 100755 --- a/tools/cplogger/Makefile +++ b/tools/cplogger/Makefile @@ -23,7 +23,7 @@ CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2 CXXFLAGS+=$(DEBUG_FLAGS) -Wall # Linker flags -LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib # install dir (set CALPONT_INSTALL_ROOT in env to override) CALPONT_INSTALL_ROOT?=$(EXPORT_ROOT) diff --git a/tools/dbbuilder/Makefile b/tools/dbbuilder/Makefile index 6a06c9985..b7ef9dfb4 100755 --- a/tools/dbbuilder/Makefile +++ b/tools/dbbuilder/Makefile @@ -23,7 +23,7 @@ CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2 CXXFLAGS+=$(DEBUG_FLAGS) -Wall # Linker flags -LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_WRITE_LIBS) $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_WRITE_LIBS) $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib # install dir (set CALPONT_INSTALL_ROOT in env to override) CALPONT_INSTALL_ROOT?=$(EXPORT_ROOT) diff --git a/tools/dbloadxml/Makefile b/tools/dbloadxml/Makefile index 0e926ea3f..e4187762f 100755 --- a/tools/dbloadxml/Makefile +++ b/tools/dbloadxml/Makefile @@ -25,7 +25,7 @@ CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2 CXXFLAGS+=$(DEBUG_FLAGS) -Wall # Linker flags -LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_WRITE_LIBS) $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_WRITE_LIBS) $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib # install dir (set CALPONT_INSTALL_ROOT in env to override) CALPONT_INSTALL_ROOT?=$(EXPORT_ROOT) diff --git a/tools/ddlcleanup/Makefile b/tools/ddlcleanup/Makefile index e84ccc9e7..7120f366f 100755 --- a/tools/ddlcleanup/Makefile +++ b/tools/ddlcleanup/Makefile @@ -23,7 +23,7 @@ CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2 CXXFLAGS+=$(DEBUG_FLAGS) -Wall # Linker flags -LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_WRITE_LIBS) $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib -lddlcleanuputil +LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_WRITE_LIBS) $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib -lddlcleanuputil # install dir (set CALPONT_INSTALL_ROOT in env to override) CALPONT_INSTALL_ROOT?=$(EXPORT_ROOT) diff --git a/tools/ddldriver/Makefile b/tools/ddldriver/Makefile index 364ba3afd..4823ddf60 100644 --- a/tools/ddldriver/Makefile +++ b/tools/ddldriver/Makefile @@ -23,7 +23,7 @@ CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2 CXXFLAGS+=$(DEBUG_FLAGS) -Wall # Linker flags -LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_WRITE_LIBS) $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_WRITE_LIBS) $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib # install dir (set CALPONT_INSTALL_ROOT in env to override) CALPONT_INSTALL_ROOT?=$(EXPORT_ROOT) diff --git a/tools/dmldriver/Makefile b/tools/dmldriver/Makefile index 4176df6dc..439943dcf 100644 --- a/tools/dmldriver/Makefile +++ b/tools/dmldriver/Makefile @@ -23,7 +23,7 @@ CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2 CXXFLAGS+=$(DEBUG_FLAGS) -Wall # Linker flags -LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_WRITE_LIBS) $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_WRITE_LIBS) $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib # install dir (set CALPONT_INSTALL_ROOT in env to override) CALPONT_INSTALL_ROOT?=$(EXPORT_ROOT) diff --git a/tools/editem/Makefile b/tools/editem/Makefile index dbe89bfda..cc763aca1 100755 --- a/tools/editem/Makefile +++ b/tools/editem/Makefile @@ -23,7 +23,7 @@ CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2 CXXFLAGS+=$(DEBUG_FLAGS) -Wall # Linker flags -LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib # install dir (set CALPONT_INSTALL_ROOT in env to override) CALPONT_INSTALL_ROOT?=$(EXPORT_ROOT) diff --git a/tools/getConfig/Makefile b/tools/getConfig/Makefile index 8d2b01e9a..3242d4ea0 100755 --- a/tools/getConfig/Makefile +++ b/tools/getConfig/Makefile @@ -23,7 +23,7 @@ CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2 CXXFLAGS+=$(DEBUG_FLAGS) -Wall # Linker flags -LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib # install dir (set CALPONT_INSTALL_ROOT in env to override) CALPONT_INSTALL_ROOT?=$(EXPORT_ROOT) diff --git a/tools/hdfsCheck/Makefile b/tools/hdfsCheck/Makefile index 4218610cf..dcd438268 100644 --- a/tools/hdfsCheck/Makefile +++ b/tools/hdfsCheck/Makefile @@ -25,7 +25,7 @@ CXXFLAGS+=$(DEBUG_FLAGS) -Wall # Linker flags LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -lloggingcpp -lidbdatafile -lboost_idb \ - -Wl,--rpath -Wl,/usr/local/Calpont/lib + -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib # install dir (set CALPONT_INSTALL_ROOT in env to override) CALPONT_INSTALL_ROOT?=$(EXPORT_ROOT) diff --git a/tools/hdfsCheck/hdfsCheck.cpp b/tools/hdfsCheck/hdfsCheck.cpp index c3af93e71..9a03c2dff 100644 --- a/tools/hdfsCheck/hdfsCheck.cpp +++ b/tools/hdfsCheck/hdfsCheck.cpp @@ -241,7 +241,7 @@ bool TestRunner::runTest( IDBDataFile::Types filetype, unsigned open_opts ) for( int i = 0; i < m_opts.numDbRoots; ++i ) { ostringstream dbroot; - dbroot << "/usr/local/Calpont/data" << i+1; + dbroot << "/usr/local/MariaDB/Columnstore/data" << i+1; if( !fs.exists(dbroot.str().c_str()) ) { ostringstream msg; diff --git a/tools/idbmeminfo/Makefile b/tools/idbmeminfo/Makefile index 3bb25906d..1e9375755 100755 --- a/tools/idbmeminfo/Makefile +++ b/tools/idbmeminfo/Makefile @@ -23,7 +23,7 @@ CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2 CXXFLAGS+=$(DEBUG_FLAGS) -Wall # Linker flags -LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) -Wl,--rpath -Wl,/usr/local/Calpont/lib +LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib # install dir (set CALPONT_INSTALL_ROOT in env to override) CALPONT_INSTALL_ROOT?=$(EXPORT_ROOT) diff --git a/tools/notificationTester/Makefile b/tools/notificationTester/Makefile index daed855f7..2207fb805 100644 --- a/tools/notificationTester/Makefile +++ b/tools/notificationTester/Makefile @@ -17,7 +17,7 @@ CXXFLAGS+=$(DEBUG_FLAGS) -Wall # we need to add some search paths here because on a boostrap build we won't find liboamcpp # anywhere except in ../oamcpp CLIBS=-L$(EXPORT_ROOT)/lib $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib TLIBS=-lcppunit -ldl GLIBS=$(CLIBS) -lcppunit -ldl diff --git a/tools/qfe/Makefile b/tools/qfe/Makefile index d88d6daa3..470bba88c 100644 --- a/tools/qfe/Makefile +++ b/tools/qfe/Makefile @@ -24,7 +24,7 @@ CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2 CXXFLAGS+=$(DEBUG_FLAGS) -Wall -Wno-unused-label # Linker flags -LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) -Wl,--rpath -Wl,/usr/local/Calpont/lib +LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib QFE_LDLIBS=$(IDB_WRITE_LIBS) $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) CLI_LDLIBS=$(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) diff --git a/tools/setConfig/Makefile b/tools/setConfig/Makefile index 909345d24..e98fb2dd0 100755 --- a/tools/setConfig/Makefile +++ b/tools/setConfig/Makefile @@ -26,7 +26,7 @@ CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2 CXXFLAGS+=$(DEBUG_FLAGS) -Wall # Linker flags -LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib # install dir (set CALPONT_INSTALL_ROOT in env to override) CALPONT_INSTALL_ROOT?=$(EXPORT_ROOT) diff --git a/tools/setConfig/configxml.sh b/tools/setConfig/configxml.sh index 7b56b5f3a..8ff2ec222 100755 --- a/tools/setConfig/configxml.sh +++ b/tools/setConfig/configxml.sh @@ -9,14 +9,14 @@ if [ -z "$INFINIDB_INSTALL_DIR" ]; then fi if [ -z "$INFINIDB_INSTALL_DIR" ]; then - INFINIDB_INSTALL_DIR=/usr/local/Calpont + INFINIDB_INSTALL_DIR=/usr/local/MariaDB/Columnstore fi export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR InstallDir=$INFINIDB_INSTALL_DIR -if [ $InstallDir != "/usr/local/Calpont" ]; then +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/mysql fi diff --git a/tools/viewtablelock/Makefile b/tools/viewtablelock/Makefile index 2895b14c9..5c29d52bc 100755 --- a/tools/viewtablelock/Makefile +++ b/tools/viewtablelock/Makefile @@ -23,7 +23,7 @@ CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2 CXXFLAGS+=$(DEBUG_FLAGS) -Wall # Linker flags -LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib # install dir (set CALPONT_INSTALL_ROOT in env to override) CALPONT_INSTALL_ROOT?=$(EXPORT_ROOT) diff --git a/utils/dataconvert/Makefile b/utils/dataconvert/Makefile index 47c67d39e..9b35c44be 100755 --- a/utils/dataconvert/Makefile +++ b/utils/dataconvert/Makefile @@ -13,7 +13,7 @@ CPPFLAGS=-I. -I$(EXPORT_ROOT)/include -I/usr/include/libxml2 CXXFLAGS+=$(DEBUG_FLAGS) -Wall -fpic #-fno-strict-aliasing CLIBS=-L$(CALPONT_LIBRARY_PATH) $(IDB_WRITE_LIBS) $(IDB_COMMON_LIBS) -lcppunit -lthreadpool -lwriteengine \ - -lcacheutils $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib + -lcacheutils $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib TLIBS = -L. -ldataconvert $(CLIBS) GLIBS=$(CLIBS) diff --git a/utils/funcexp/Makefile b/utils/funcexp/Makefile index b546e212e..fabc25344 100755 --- a/utils/funcexp/Makefile +++ b/utils/funcexp/Makefile @@ -15,7 +15,7 @@ CPPFLAGS= -I. -I$(EXPORT_ROOT)/include -I/usr/include/libxml2 CXXFLAGS+=$(DEBUG_FLAGS) -Wall -fpic CLIBS=-L$(CALPONT_LIBRARY_PATH) $(IDB_WRITE_LIBS) $(IDB_COMMON_LIBS) -lcppunit -lthreadpool -lwriteengine \ - -lcacheutils $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib + -lcacheutils $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib TLIBS = -L. -ldataconvert $(CLIBS) GLIBS=$(CLIBS) diff --git a/utils/idbdatafile/Makefile b/utils/idbdatafile/Makefile index 37adebb2f..9ecb73ab2 100755 --- a/utils/idbdatafile/Makefile +++ b/utils/idbdatafile/Makefile @@ -77,10 +77,10 @@ docs: doxygen $(EXPORT_ROOT)/etc/Doxyfile tdriver: tdriver.o - $(LINK.cpp) -o $@ $^ $(TLIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib + $(LINK.cpp) -o $@ $^ $(TLIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib tdriver1: tdriver1.o - $(LINK.cpp) -o $@ $^ $(TLIBS) -Wl,-rpath -Wl,/usr/local/Calpont/lib + $(LINK.cpp) -o $@ $^ $(TLIBS) -Wl,-rpath -Wl,/usr/local/MariaDB/Columnstore/lib test: $(LIBRARY) tdriver LD_LIBRARY_PATH=.:$(EXPORT_ROOT)/lib ./tdriver diff --git a/utils/infinidb_hadoop/infinidb_hadoop_bulkload.sh b/utils/infinidb_hadoop/infinidb_hadoop_bulkload.sh index eefe7fe72..7fab449a1 100755 --- a/utils/infinidb_hadoop/infinidb_hadoop_bulkload.sh +++ b/utils/infinidb_hadoop/infinidb_hadoop_bulkload.sh @@ -1,7 +1,7 @@ #!/bin/sh -export LD_LIBRARY_PATH=/usr/local/Calpont/lib:$LD_LIBRARY_PATH -export CALPONT_CONFIG_FILE=/usr/local/Calpont/etc/Calpont.xml -export PATH=$PATH:/usr/local/hadoop-0.20.2/bin:/usr/local/Calpont/bin -export CALPONT_HOME=/usr/local/Calpont/etc +export LD_LIBRARY_PATH=/usr/local/MariaDB/Columnstore/lib:$LD_LIBRARY_PATH +export CALPONT_CONFIG_FILE=/usr/local/MariaDB/Columnstore/etc/Calpont.xml +export PATH=$PATH:/usr/local/hadoop-0.20.2/bin:/usr/local/MariaDB/Columnstore/bin +export CALPONT_HOME=/usr/local/MariaDB/Columnstore/etc hadoop dfs -cat $1 | cpimport $2 $3 diff --git a/utils/net-snmp/net-snmp-config.h b/utils/net-snmp/net-snmp-config.h index 3e94757a1..8d9e724ba 100644 --- a/utils/net-snmp/net-snmp-config.h +++ b/utils/net-snmp/net-snmp-config.h @@ -30,7 +30,7 @@ /* default location to look for mibs to load using the above tokens and/or those in the MIBS envrionment variable*/ -#define DEFAULT_MIBDIRS "$HOME/.snmp/mibs:/usr/local/Calpont/share/snmp/mibs" +#define DEFAULT_MIBDIRS "$HOME/.snmp/mibs:/usr/local/MariaDB/Columnstore/share/snmp/mibs" /* default mib files to load, specified by path. */ /* #undef DEFAULT_MIBFILES */ @@ -107,10 +107,10 @@ /* #undef DEFAULT_CLIENT_RECV_BUF */ /* SNMPLIBDIR contains important files */ -#define SNMPLIBPATH "/usr/local/Calpont/lib/snmp" -#define SNMPSHAREPATH "/usr/local/Calpont/share/snmp" -#define SNMPCONFPATH "/usr/local/Calpont/etc/snmp" -#define SNMPDLMODPATH "/usr/local/Calpont/lib/snmp/dlmod" +#define SNMPLIBPATH "/usr/local/MariaDB/Columnstore/lib/snmp" +#define SNMPSHAREPATH "/usr/local/MariaDB/Columnstore/share/snmp" +#define SNMPCONFPATH "/usr/local/MariaDB/Columnstore/etc/snmp" +#define SNMPDLMODPATH "/usr/local/MariaDB/Columnstore/lib/snmp/dlmod" /* LOGFILE: If defined it closes stdout/err/in and opens this in out/err's place. (stdin is closed so that sh scripts won't wait for it) */ @@ -1339,7 +1339,7 @@ #define LASTFIELD -1 /* internal define */ /* configure options specified */ -#define CONFIGURE_OPTIONS "\"'--prefix=/usr/local/Calpont' '--with-mib-modules=disman/event-mib' '--with-cc=gcc'\"" +#define CONFIGURE_OPTIONS "\"'--prefix=/usr/local/MariaDB/Columnstore' '--with-mib-modules=disman/event-mib' '--with-cc=gcc'\"" /* got socklen_t? */ #define HAVE_SOCKLEN_T 1 diff --git a/utils/prat/copy2here.sh b/utils/prat/copy2here.sh index 72e2014b0..9a301ef53 100644 --- a/utils/prat/copy2here.sh +++ b/utils/prat/copy2here.sh @@ -10,7 +10,7 @@ #* #******************************************************************************/ -CTOOLS=/usr/local/Calpont/tools +CTOOLS=/usr/local/MariaDB/Columnstore/tools localhost=$(hostname -s) # @@ -38,9 +38,9 @@ while read moduletype hostname hostdir; do echo Collecting files on remote host $servername echo " and copying them to this server" tarfile=$hostdir.tar - /usr/local/Calpont/bin/remote_command.sh $servername $srvpwd "$CTOOLS/tarfiles.sh $hostdir $tarfile" + /usr/local/MariaDB/Columnstore/bin/remote_command.sh $servername $srvpwd "$CTOOLS/tarfiles.sh $hostdir $tarfile" cd $CTOOLS/data - /usr/local/Calpont/bin/remote_scp_get.sh $servername $srvpwd $CTOOLS/data/$tarfile + /usr/local/MariaDB/Columnstore/bin/remote_scp_get.sh $servername $srvpwd $CTOOLS/data/$tarfile fi done fi diff --git a/utils/prat/getlogs.sh b/utils/prat/getlogs.sh index f0ed0fe11..1b8ad21f8 100644 --- a/utils/prat/getlogs.sh +++ b/utils/prat/getlogs.sh @@ -10,12 +10,12 @@ #* hostdir - directory name for this run #******************************************************************************/ -CTOOLS=/usr/local/Calpont/tools +CTOOLS=/usr/local/MariaDB/Columnstore/tools date=$1 hostdir=$2 localhost=$(hostname -s) -modulename=`cat /usr/local/Calpont/local/module` +modulename=`cat /usr/local/MariaDB/Columnstore/local/module` currentdate=`date +%d` if [ -f /tmp/.prat/.hostlist2.txt ]; then sc=`wc -l < /tmp/.prat/.hostlist2.txt` @@ -45,13 +45,13 @@ readserverlist () # getlogsremote () { # Send the command to the remote module(s) to copy the Calpont logs - /usr/local/Calpont/bin/remote_command.sh $servername $srvpwd "$CTOOLS/getlogs.sh $date $hostdir" + /usr/local/MariaDB/Columnstore/bin/remote_command.sh $servername $srvpwd "$CTOOLS/getlogs.sh $date $hostdir" } # getlogslocal () { mkdir -p $CTOOLS/data/$hostdir/logs if [ $date = $currentdate ]; then - cp -r /var/log/Calpont/* /usr/local/Calpont/tools/data/$hostdir/logs + cp -r /var/log/Calpont/* /usr/local/MariaDB/Columnstore/tools/data/$hostdir/logs else find /var/log/Calpont -type f -name "*$date" -exec sh -c 'exec cp -f "$@" '$CTOOLS/data/$hostdir/logs'' find-copy {} + fi diff --git a/utils/prat/getmodules.sh b/utils/prat/getmodules.sh index 55fc2fb57..0a5648610 100644 --- a/utils/prat/getmodules.sh +++ b/utils/prat/getmodules.sh @@ -10,7 +10,7 @@ #* #***************************************************************************/ # -moduletype=`cat /usr/local/Calpont/local/module` +moduletype=`cat /usr/local/MariaDB/Columnstore/local/module` hostdir=`date +%Y%m%d%H%M%S` # # Module check @@ -35,7 +35,7 @@ then fi # issue Calpont console command and send the output to a file -/usr/local/Calpont/bin/mcsadmin getsystemnetworkconfig ACK_YES | +/usr/local/MariaDB/Columnstore/bin/mcsadmin getsystemnetworkconfig ACK_YES | egrep -w 'Director|User|Performance' | awk -F" " '{print $1"\t" $2"\t" $3"\t" $4"\t" $6}' > /tmp/modulelist.txt # diff --git a/utils/prat/getps.sh b/utils/prat/getps.sh index d8343f96f..fd97304c0 100644 --- a/utils/prat/getps.sh +++ b/utils/prat/getps.sh @@ -12,14 +12,14 @@ #* #******************************************************************************/ -CTOOLS=/usr/local/Calpont/tools +CTOOLS=/usr/local/MariaDB/Columnstore/tools date=$1 starttime=$2 endtime=$3 hostdir=$4 localhost=$(hostname -s) -modulename=`cat /usr/local/Calpont/local/module` +modulename=`cat /usr/local/MariaDB/Columnstore/local/module` if [ -f /tmp/.prat/.hostlist2.txt ]; then sc=`wc -l < /tmp/.prat/.hostlist2.txt` else @@ -48,7 +48,7 @@ readserverlist () # getpsremote () { # Send the command to the remote module(s) to extract ps data - /usr/local/Calpont/bin/remote_command.sh $servername $srvpwd "$CTOOLS/getps.sh $date $starttime $endtime $hostdir" + /usr/local/MariaDB/Columnstore/bin/remote_command.sh $servername $srvpwd "$CTOOLS/getps.sh $date $starttime $endtime $hostdir" } # getpslocal () diff --git a/utils/prat/getsar.sh b/utils/prat/getsar.sh index 1879e9e5f..065cadc1b 100644 --- a/utils/prat/getsar.sh +++ b/utils/prat/getsar.sh @@ -11,14 +11,14 @@ #* hostdir - directory name for this run #******************************************************************************/ -CTOOLS=/usr/local/Calpont/tools +CTOOLS=/usr/local/MariaDB/Columnstore/tools date=$1 starttime=$2 endtime=$3 hostdir=$4 localhost=$(hostname -s) -modulename=`cat /usr/local/Calpont/local/module` +modulename=`cat /usr/local/MariaDB/Columnstore/local/module` if [ -f /tmp/.prat/.hostlist2.txt ]; then sc=`wc -l < /tmp/.prat/.hostlist2.txt` else @@ -47,7 +47,7 @@ readserverlist () # getsarremote () { # Send the sar extraction statments to the remote module - /usr/local/Calpont/bin/remote_command.sh $servername $srvpwd "$CTOOLS/getsar.sh $date $starttime $endtime $hostdir" + /usr/local/MariaDB/Columnstore/bin/remote_command.sh $servername $srvpwd "$CTOOLS/getsar.sh $date $starttime $endtime $hostdir" } # getsarlocal () diff --git a/utils/prat/getuserinput.sh b/utils/prat/getuserinput.sh index d3260fa30..01d016760 100644 --- a/utils/prat/getuserinput.sh +++ b/utils/prat/getuserinput.sh @@ -8,7 +8,7 @@ #* Parameter: None #******************************************************************************/ -CTOOLS=/usr/local/Calpont/tools +CTOOLS=/usr/local/MariaDB/Columnstore/tools getuserinput () { echo -n "Enter the two digit day of the month for the desired timeframe > " diff --git a/utils/prat/prat.sh b/utils/prat/prat.sh index 3af6a229c..8b067ffbc 100644 --- a/utils/prat/prat.sh +++ b/utils/prat/prat.sh @@ -8,7 +8,7 @@ #* Parameter: None #******************************************************************************/ -CTOOLS=/usr/local/Calpont/tools +CTOOLS=/usr/local/MariaDB/Columnstore/tools # Retrieve the names of servers in this Calpont stack $CTOOLS/getmodules.sh diff --git a/utils/prat/tarfiles.sh b/utils/prat/tarfiles.sh index abbe0deee..0728846d3 100644 --- a/utils/prat/tarfiles.sh +++ b/utils/prat/tarfiles.sh @@ -15,7 +15,7 @@ hostdir=$1 tarfile=$2 # # tar the files -cd /usr/local/Calpont/tools/data +cd /usr/local/MariaDB/Columnstore/tools/data tar -cf $tarfile $hostdir # # End of Script diff --git a/utils/scenarios/common/sh/bulkExecResult.sh b/utils/scenarios/common/sh/bulkExecResult.sh index 179b1a88c..93dc4b329 100755 --- a/utils/scenarios/common/sh/bulkExecResult.sh +++ b/utils/scenarios/common/sh/bulkExecResult.sh @@ -12,25 +12,25 @@ function getTestInfo { function copySQLResultFiles { # - rm -f /usr/local/Calpont/data/bulk/data/import/TestSummary.* - rm -f /usr/local/Calpont/data/bulk/data/import/TestTime.* - rm -f /usr/local/Calpont/data/bulk/data/import/TestStats.* + rm -f /usr/local/MariaDB/Columnstore/data/bulk/data/import/TestSummary.* + rm -f /usr/local/MariaDB/Columnstore/data/bulk/data/import/TestTime.* + rm -f /usr/local/MariaDB/Columnstore/data/bulk/data/import/TestStats.* # - cp -f testResultSummary.txt /usr/local/Calpont/data/bulk/data/import/TestSummary.tbl - cp -f testResultTime.txt /usr/local/Calpont/data/bulk/data/import/TestTime.tbl - cp -f testResultStats.txt /usr/local/Calpont/data/bulk/data/import/TestStats.tbl + cp -f testResultSummary.txt /usr/local/MariaDB/Columnstore/data/bulk/data/import/TestSummary.tbl + cp -f testResultTime.txt /usr/local/MariaDB/Columnstore/data/bulk/data/import/TestTime.tbl + cp -f testResultStats.txt /usr/local/MariaDB/Columnstore/data/bulk/data/import/TestStats.tbl } function CalLoadSQLTestResult { # - /usr/local/Calpont/bin/colxml perfstats -t TestSummary -j 1001 - /usr/local/Calpont/bin/colxml perfstats -t TestTime -j 1002 - /usr/local/Calpont/bin/colxml perfstats -t TestStats -j 1003 + /usr/local/MariaDB/Columnstore/bin/colxml perfstats -t TestSummary -j 1001 + /usr/local/MariaDB/Columnstore/bin/colxml perfstats -t TestTime -j 1002 + /usr/local/MariaDB/Columnstore/bin/colxml perfstats -t TestStats -j 1003 # - /usr/local/Calpont/bin/cpimport -j 1001 - /usr/local/Calpont/bin/cpimport -j 1002 - /usr/local/Calpont/bin/cpimport -j 1003 + /usr/local/MariaDB/Columnstore/bin/cpimport -j 1001 + /usr/local/MariaDB/Columnstore/bin/cpimport -j 1002 + /usr/local/MariaDB/Columnstore/bin/cpimport -j 1003 } # function MySQLLoadSQLTestResult { @@ -47,38 +47,38 @@ function MySQLLoadSQLTestResult { #========================================================================================= function CalLoadSQLTestResult { # - rm -f /usr/local/Calpont/data/bulk/data/import/TestSummary.* - rm -f /usr/local/Calpont/data/bulk/data/import/TestTime.* - rm -f /usr/local/Calpont/data/bulk/data/import/TestStats.* + rm -f /usr/local/MariaDB/Columnstore/data/bulk/data/import/TestSummary.* + rm -f /usr/local/MariaDB/Columnstore/data/bulk/data/import/TestTime.* + rm -f /usr/local/MariaDB/Columnstore/data/bulk/data/import/TestStats.* # - /usr/local/Calpont/bin/colxml perfstats -t TestSummary -j 1001 - /usr/local/Calpont/bin/colxml perfstats -t TestTime -j 1002 - /usr/local/Calpont/bin/colxml perfstats -t TestStats -j 1003 + /usr/local/MariaDB/Columnstore/bin/colxml perfstats -t TestSummary -j 1001 + /usr/local/MariaDB/Columnstore/bin/colxml perfstats -t TestTime -j 1002 + /usr/local/MariaDB/Columnstore/bin/colxml perfstats -t TestStats -j 1003 # - cp -f testResultSummary.txt /usr/local/Calpont/data/bulk/data/import/TestSummary.tbl - cp -f testResultTime.txt /usr/local/Calpont/data/bulk/data/import/TestTime.tbl - cp -f testResultStats.txt /usr/local/Calpont/data/bulk/data/import/TestStats.tbl + cp -f testResultSummary.txt /usr/local/MariaDB/Columnstore/data/bulk/data/import/TestSummary.tbl + cp -f testResultTime.txt /usr/local/MariaDB/Columnstore/data/bulk/data/import/TestTime.tbl + cp -f testResultStats.txt /usr/local/MariaDB/Columnstore/data/bulk/data/import/TestStats.tbl # - /usr/local/Calpont/bin/cpimport -j 1001 - /usr/local/Calpont/bin/cpimport -j 1002 - /usr/local/Calpont/bin/cpimport -j 1003 + /usr/local/MariaDB/Columnstore/bin/cpimport -j 1001 + /usr/local/MariaDB/Columnstore/bin/cpimport -j 1002 + /usr/local/MariaDB/Columnstore/bin/cpimport -j 1003 } #========================================================================================= # cpimport bulk test results #========================================================================================= function CalLoadBulkTestResult { # - rm -f /usr/local/Calpont/data/bulk/data/import/BulkSummary.* - rm -f /usr/local/Calpont/data/bulk/data/import/BulkTime.* + rm -f /usr/local/MariaDB/Columnstore/data/bulk/data/import/BulkSummary.* + rm -f /usr/local/MariaDB/Columnstore/data/bulk/data/import/BulkTime.* # - /usr/local/Calpont/bin/colxml perfstats -t BulkSummary -j 1001 - /usr/local/Calpont/bin/colxml perfstats -t BulkStats -j 1002 + /usr/local/MariaDB/Columnstore/bin/colxml perfstats -t BulkSummary -j 1001 + /usr/local/MariaDB/Columnstore/bin/colxml perfstats -t BulkStats -j 1002 # - cp -f testResultSummary.txt /usr/local/Calpont/data/bulk/data/import/BulkSummary.tbl - cp -f testResultTime.txt /usr/local/Calpont/data/bulk/data/import/BulkStats.tbl + cp -f testResultSummary.txt /usr/local/MariaDB/Columnstore/data/bulk/data/import/BulkSummary.tbl + cp -f testResultTime.txt /usr/local/MariaDB/Columnstore/data/bulk/data/import/BulkStats.tbl # - /usr/local/Calpont/bin/cpimport -j 1001 - /usr/local/Calpont/bin/cpimport -j 1002 + /usr/local/MariaDB/Columnstore/bin/cpimport -j 1001 + /usr/local/MariaDB/Columnstore/bin/cpimport -j 1002 } #========================================================================================= diff --git a/utils/scenarios/common/sh/execSQLScript_m.sh b/utils/scenarios/common/sh/execSQLScript_m.sh index 4ecb23d3e..54e669350 100755 --- a/utils/scenarios/common/sh/execSQLScript_m.sh +++ b/utils/scenarios/common/sh/execSQLScript_m.sh @@ -22,5 +22,5 @@ # # Execute script on test database # - /usr/local/Calpont/mysql/bin/mysql --defaults-file=/usr/local/Calpont/mysql/my.cnf -f -u root $1 <$6 > $logFileName.test.log 2>&1 + /usr/local/MariaDB/Columnstore/mysql/bin/mysql --defaults-file=/usr/local/MariaDB/Columnstore/mysql/my.cnf -f -u root $1 <$6 > $logFileName.test.log 2>&1 diff $logFileName.ref.log $logFileName.test.log > $logFileName.diff.log diff --git a/utils/scenarios/common/sh/restore100gb.sh b/utils/scenarios/common/sh/restore100gb.sh index 8e54ee1fa..871a0101e 100755 --- a/utils/scenarios/common/sh/restore100gb.sh +++ b/utils/scenarios/common/sh/restore100gb.sh @@ -3,17 +3,17 @@ #========================================================================================= mount /dev/sdj1 /mnt/qadbs # -rm -rf /usr/local/Calpont/data1/000.dir -rm -rf /usr/local/Calpont/data2/000.dir -rm -rf /usr/local/Calpont/data3/000.dir -rm -rf /usr/local/Calpont/data4/000.dir -rm -f /usr/local/Calpont/data1/systemFiles/dbrm/* +rm -rf /usr/local/MariaDB/Columnstore/data1/000.dir +rm -rf /usr/local/MariaDB/Columnstore/data2/000.dir +rm -rf /usr/local/MariaDB/Columnstore/data3/000.dir +rm -rf /usr/local/MariaDB/Columnstore/data4/000.dir +rm -f /usr/local/MariaDB/Columnstore/data1/systemFiles/dbrm/* # -cp /mnt/qadbs/tpch/1m-1-10-100/dbrm/* /usr/local/Calpont/data1/systemFiles/dbrm +cp /mnt/qadbs/tpch/1m-1-10-100/dbrm/* /usr/local/MariaDB/Columnstore/data1/systemFiles/dbrm # -cp -r /mnt/qadbs/tpch/1m-1-10-100/data1/000.dir /usr/local/Calpont/data1 & -cp -r /mnt/qadbs/tpch/1m-1-10-100/data2/000.dir /usr/local/Calpont/data2 & -cp -r /mnt/qadbs/tpch/1m-1-10-100/data3/000.dir /usr/local/Calpont/data3 & -cp -r /mnt/qadbs/tpch/1m-1-10-100/data4/000.dir /usr/local/Calpont/data4 & +cp -r /mnt/qadbs/tpch/1m-1-10-100/data1/000.dir /usr/local/MariaDB/Columnstore/data1 & +cp -r /mnt/qadbs/tpch/1m-1-10-100/data2/000.dir /usr/local/MariaDB/Columnstore/data2 & +cp -r /mnt/qadbs/tpch/1m-1-10-100/data3/000.dir /usr/local/MariaDB/Columnstore/data3 & +cp -r /mnt/qadbs/tpch/1m-1-10-100/data4/000.dir /usr/local/MariaDB/Columnstore/data4 & # diff --git a/utils/scenarios/common/sh/testExecEngine.sh b/utils/scenarios/common/sh/testExecEngine.sh index 5d8d78d97..c682bae79 100755 --- a/utils/scenarios/common/sh/testExecEngine.sh +++ b/utils/scenarios/common/sh/testExecEngine.sh @@ -59,11 +59,11 @@ function logEnvInfo { # $1 = test run # $2 = a or b, b=before test run, a=after test run # - cp /usr/local/Calpont/etc/Calpont.xml $1/. - /usr/local/Calpont/bin/mcsadmin getcalpontsoftwareinfo > $1/getcalpontsoftwareinfo.log - /usr/local/Calpont/bin/mcsadmin getsystemstatus > $1/getSystemStatus.$2.log - /usr/local/Calpont/bin/mcsadmin getsystemnetwork > $1/getSystemNetwork.$2.log - /usr/local/Calpont/bin/mcsadmin getprocessstatus > $1/getProcessStatus.$2.log + cp /usr/local/MariaDB/Columnstore/etc/Calpont.xml $1/. + /usr/local/MariaDB/Columnstore/bin/mcsadmin getcalpontsoftwareinfo > $1/getcalpontsoftwareinfo.log + /usr/local/MariaDB/Columnstore/bin/mcsadmin getsystemstatus > $1/getSystemStatus.$2.log + /usr/local/MariaDB/Columnstore/bin/mcsadmin getsystemnetwork > $1/getSystemNetwork.$2.log + /usr/local/MariaDB/Columnstore/bin/mcsadmin getprocessstatus > $1/getProcessStatus.$2.log } #========================================================================================= # log environment info @@ -186,7 +186,7 @@ function execOneTestRun { fi if [ $dbmsType = "M" ]; then pathSfn=$1\/$sess - /usr/local/Calpont/mysql/bin/mysql --defaults-file=/usr/local/Calpont/mysql/my.cnf -u root $testDB <$sfn 2> $pathSfn\/$sfn.err.log |grep "^Calpont" > $pathSfn\/$sfn.log & + /usr/local/MariaDB/Columnstore/mysql/bin/mysql --defaults-file=/usr/local/MariaDB/Columnstore/mysql/my.cnf -u root $testDB <$sfn 2> $pathSfn\/$sfn.err.log |grep "^Calpont" > $pathSfn\/$sfn.log & else su - oracle -c "sqlplus /nolog @/home/qa/srv/common/script/callogin.sql $testDB $testDB xe srvqaperf2 <$sfn" |grep "^Calpont" > $1\/$sess\/$sfn.log & fi diff --git a/utils/scenarios/dwweek/test/dwSubmitCpimport.sh b/utils/scenarios/dwweek/test/dwSubmitCpimport.sh index 7cb40fd00..6fe959bb4 100644 --- a/utils/scenarios/dwweek/test/dwSubmitCpimport.sh +++ b/utils/scenarios/dwweek/test/dwSubmitCpimport.sh @@ -22,13 +22,13 @@ echo \#!/bin/bash > $bulkScriptName echo \# >> $bulkScriptName # - echo rm -f /usr/local/Calpont/data/bulk/log/Jobxml_9999.log >> $bulkScriptName - echo rm -f /usr/local/Calpont/data/bulk/log/Job_9999.log >> $bulkScriptName - echo /usr/local/Calpont/bin/colxml $testDB -t lineitem -l $sourceFileName -j 9999 >> $bulkScriptName - echo /usr/local/Calpont/bin/cpimport -j 9999 >> $bulkScriptName - echo cp /usr/local/Calpont/data/bulk/job/Job_9999.xml . >> $bulkScriptName - echo cp /usr/local/Calpont/data/bulk/log/Jobxml_9999.log . >> $bulkScriptName - echo cp /usr/local/Calpont/data/bulk/log/Job_9999.log . >> $bulkScriptName + echo rm -f /usr/local/MariaDB/Columnstore/data/bulk/log/Jobxml_9999.log >> $bulkScriptName + echo rm -f /usr/local/MariaDB/Columnstore/data/bulk/log/Job_9999.log >> $bulkScriptName + echo /usr/local/MariaDB/Columnstore/bin/colxml $testDB -t lineitem -l $sourceFileName -j 9999 >> $bulkScriptName + echo /usr/local/MariaDB/Columnstore/bin/cpimport -j 9999 >> $bulkScriptName + echo cp /usr/local/MariaDB/Columnstore/data/bulk/job/Job_9999.xml . >> $bulkScriptName + echo cp /usr/local/MariaDB/Columnstore/data/bulk/log/Jobxml_9999.log . >> $bulkScriptName + echo cp /usr/local/MariaDB/Columnstore/data/bulk/log/Job_9999.log . >> $bulkScriptName chmod 777 $bulkScriptName # #append current directory path to to script file name diff --git a/utils/scenarios/dwweek/test/dwbackup.sh b/utils/scenarios/dwweek/test/dwbackup.sh index 6677f33b8..9180d5ce3 100644 --- a/utils/scenarios/dwweek/test/dwbackup.sh +++ b/utils/scenarios/dwweek/test/dwbackup.sh @@ -3,7 +3,7 @@ numRoots=4 # for ((idx=1; $idx<=$numRoots; idx++)); do - rm -rf /usr/local/Calpont/data$idx/dwbackup/2 & + rm -rf /usr/local/MariaDB/Columnstore/data$idx/dwbackup/2 & pids[$idx]=$! done # @@ -26,9 +26,9 @@ done # for ((idx=1; $idx<=$numRoots; idx++)); do - mv /usr/local/Calpont/data$idx/dwbackup/1 /usr/local/Calpont/data$idx/dwbackup/2 - mkdir -p /usr/local/Calpont/data$idx/dwbackup/1 - cp -r /usr/local/Calpont/data$idx/000.dir /usr/local/Calpont/data$idx/dwbackup/1 & + mv /usr/local/MariaDB/Columnstore/data$idx/dwbackup/1 /usr/local/MariaDB/Columnstore/data$idx/dwbackup/2 + mkdir -p /usr/local/MariaDB/Columnstore/data$idx/dwbackup/1 + cp -r /usr/local/MariaDB/Columnstore/data$idx/000.dir /usr/local/MariaDB/Columnstore/data$idx/dwbackup/1 & pids[$idx]=$! done # @@ -49,4 +49,4 @@ done sleep 5 done - cp -r /mnt/OAM/dbrm /usr/local/Calpont/data1/dwbackup/1/. + cp -r /mnt/OAM/dbrm /usr/local/MariaDB/Columnstore/data1/dwbackup/1/. diff --git a/utils/scenarios/perf/sh/pfExeSQLscript.sh b/utils/scenarios/perf/sh/pfExeSQLscript.sh index 12f36ac0e..ca40e7ceb 100755 --- a/utils/scenarios/perf/sh/pfExeSQLscript.sh +++ b/utils/scenarios/perf/sh/pfExeSQLscript.sh @@ -19,5 +19,5 @@ # # Execute script on test database # - /usr/local/Calpont/mysql/bin/mysql --defaults-file=/usr/local/Calpont/mysql/my.cnf -u root $1 <$2 > $logFileName.test.log + /usr/local/MariaDB/Columnstore/mysql/bin/mysql --defaults-file=/usr/local/MariaDB/Columnstore/mysql/my.cnf -u root $1 <$2 > $logFileName.test.log exit 0 diff --git a/utils/scenarios/perf/source/pf/common/exeStreamTest.sh b/utils/scenarios/perf/source/pf/common/exeStreamTest.sh index 24ca0efca..e2fcdca67 100755 --- a/utils/scenarios/perf/source/pf/common/exeStreamTest.sh +++ b/utils/scenarios/perf/source/pf/common/exeStreamTest.sh @@ -50,15 +50,15 @@ while [ $k -le $repeatNum ] do if [ $restart == Y ] || [ $restart == y ] then - /usr/local/Calpont/bin/mcsadmin restartsystem y + /usr/local/MariaDB/Columnstore/bin/mcsadmin restartsystem y sleep 90 fi mkdir $k cd $k - cp /usr/local/Calpont/etc/Calpont.xml . - /usr/local/Calpont/bin/mcsadmin getCalpontSoftware >CalpontSoftware.txt - ls -al /mnt/pm*/usr/local/Calpont/data* > dbRoots.txt - /usr/local/Calpont/bin/mcsadmin getProcessStatus >stackConfigBefore.txt + cp /usr/local/MariaDB/Columnstore/etc/Calpont.xml . + /usr/local/MariaDB/Columnstore/bin/mcsadmin getCalpontSoftware >CalpontSoftware.txt + ls -al /mnt/pm*/usr/local/MariaDB/Columnstore/data* > dbRoots.txt + /usr/local/MariaDB/Columnstore/bin/mcsadmin getProcessStatus >stackConfigBefore.txt $exeCommand > $logFileName 2>&1 # if [ $streamNum == 1_7 ] @@ -71,7 +71,7 @@ do done fi # - /usr/local/Calpont/bin/mcsadmin getProcessStatus >stackConfigAfter.txt + /usr/local/MariaDB/Columnstore/bin/mcsadmin getProcessStatus >stackConfigAfter.txt /home/pf/auto/common/extractstartstoptimes.sh cd .. ((k++)) diff --git a/utils/scenarios/perf/source/pf/common/sendPlanExec.sh b/utils/scenarios/perf/source/pf/common/sendPlanExec.sh index 157360b34..75df1028d 100755 --- a/utils/scenarios/perf/source/pf/common/sendPlanExec.sh +++ b/utils/scenarios/perf/source/pf/common/sendPlanExec.sh @@ -14,7 +14,7 @@ echo --------------------------------------------------------------------------- echo sendPlan start: $3 date echo -/usr/local/Calpont/bin/sendPlan -v -s$1 -t$2 $3 +/usr/local/MariaDB/Columnstore/bin/sendPlan -v -s$1 -t$2 $3 echo date echo sendPlan end: $3 diff --git a/utils/scenarios/perf/source/pf/common/setDBRoots.sh b/utils/scenarios/perf/source/pf/common/setDBRoots.sh index a064485f8..b901aa9f0 100755 --- a/utils/scenarios/perf/source/pf/common/setDBRoots.sh +++ b/utils/scenarios/perf/source/pf/common/setDBRoots.sh @@ -22,48 +22,48 @@ echo *****-----*****-----*****-----*****-----***** # unmount dbroots from all PMs #----------------------------------------------------------------------------- echo unmounting PM1 -/usr/local/Calpont/bin/remote_command.sh srvqaperf3 qalpont! "umount -a" +/usr/local/MariaDB/Columnstore/bin/remote_command.sh srvqaperf3 qalpont! "umount -a" echo unmounting PM2 -/usr/local/Calpont/bin/remote_command.sh srvqaperf4 qalpont! "umount -a" +/usr/local/MariaDB/Columnstore/bin/remote_command.sh srvqaperf4 qalpont! "umount -a" echo unmounting PM3 -/usr/local/Calpont/bin/remote_command.sh srvqaperf5 qalpont! "umount -a" +/usr/local/MariaDB/Columnstore/bin/remote_command.sh srvqaperf5 qalpont! "umount -a" echo unmounting PM4 -/usr/local/Calpont/bin/remote_command.sh srvqaperf8 qalpont! "umount -a" +/usr/local/MariaDB/Columnstore/bin/remote_command.sh srvqaperf8 qalpont! "umount -a" #----------------------------------------------------------------------------- # save current fstab to fstab.auto then move 'set number' fstab to 'real' fstab #----------------------------------------------------------------------------- echo *-* echo doing the hokey pokey with fstabs on PM1 -/usr/local/Calpont/bin/remote_command.sh srvqaperf3 qalpont! "rm -f /etc/fstab.auto" -/usr/local/Calpont/bin/remote_command.sh srvqaperf3 qalpont! "mv /etc/fstab /etc/fstab.auto" -/usr/local/Calpont/bin/remote_command.sh srvqaperf3 qalpont! "cp /etc/fstab.[$setNum] /etc/fstab" +/usr/local/MariaDB/Columnstore/bin/remote_command.sh srvqaperf3 qalpont! "rm -f /etc/fstab.auto" +/usr/local/MariaDB/Columnstore/bin/remote_command.sh srvqaperf3 qalpont! "mv /etc/fstab /etc/fstab.auto" +/usr/local/MariaDB/Columnstore/bin/remote_command.sh srvqaperf3 qalpont! "cp /etc/fstab.[$setNum] /etc/fstab" echo *-* echo doing the funky chicken with fstabs on PM2 -/usr/local/Calpont/bin/remote_command.sh srvqaperf4 qalpont! "rm -f /etc/fstab.auto" -/usr/local/Calpont/bin/remote_command.sh srvqaperf4 qalpont! "mv /etc/fstab /etc/fstab.auto" -/usr/local/Calpont/bin/remote_command.sh srvqaperf4 qalpont! "cp /etc/fstab.[$setNum] /etc/fstab" +/usr/local/MariaDB/Columnstore/bin/remote_command.sh srvqaperf4 qalpont! "rm -f /etc/fstab.auto" +/usr/local/MariaDB/Columnstore/bin/remote_command.sh srvqaperf4 qalpont! "mv /etc/fstab /etc/fstab.auto" +/usr/local/MariaDB/Columnstore/bin/remote_command.sh srvqaperf4 qalpont! "cp /etc/fstab.[$setNum] /etc/fstab" echo *-* echo doing the swim with fstabs on PM3 -/usr/local/Calpont/bin/remote_command.sh srvqaperf5 qalpont! "rm -f /etc/fstab.auto" -/usr/local/Calpont/bin/remote_command.sh srvqaperf5 qalpont! "mv /etc/fstab /etc/fstab.auto" -/usr/local/Calpont/bin/remote_command.sh srvqaperf5 qalpont! "cp /etc/fstab.[$setNum] /etc/fstab" +/usr/local/MariaDB/Columnstore/bin/remote_command.sh srvqaperf5 qalpont! "rm -f /etc/fstab.auto" +/usr/local/MariaDB/Columnstore/bin/remote_command.sh srvqaperf5 qalpont! "mv /etc/fstab /etc/fstab.auto" +/usr/local/MariaDB/Columnstore/bin/remote_command.sh srvqaperf5 qalpont! "cp /etc/fstab.[$setNum] /etc/fstab" echo *-* echo doing the stroll with fstabs on PM4 -/usr/local/Calpont/bin/remote_command.sh srvqaperf8 qalpont! "rm -f /etc/fstab.auto" -/usr/local/Calpont/bin/remote_command.sh srvqaperf8 qalpont! "mv /etc/fstab /etc/fstab.auto" -/usr/local/Calpont/bin/remote_command.sh srvqaperf8 qalpont! "cp /etc/fstab.[$setNum] /etc/fstab" +/usr/local/MariaDB/Columnstore/bin/remote_command.sh srvqaperf8 qalpont! "rm -f /etc/fstab.auto" +/usr/local/MariaDB/Columnstore/bin/remote_command.sh srvqaperf8 qalpont! "mv /etc/fstab /etc/fstab.auto" +/usr/local/MariaDB/Columnstore/bin/remote_command.sh srvqaperf8 qalpont! "cp /etc/fstab.[$setNum] /etc/fstab" #----------------------------------------------------------------------------- # re-mount dbroots on all PMs #----------------------------------------------------------------------------- echo *-* echo mounting PM1 -/usr/local/Calpont/bin/remote_command.sh srvqaperf3 qalpont! "mount -a" +/usr/local/MariaDB/Columnstore/bin/remote_command.sh srvqaperf3 qalpont! "mount -a" echo mounting PM2 -/usr/local/Calpont/bin/remote_command.sh srvqaperf4 qalpont! "mount -a" +/usr/local/MariaDB/Columnstore/bin/remote_command.sh srvqaperf4 qalpont! "mount -a" echo mounting PM3 -/usr/local/Calpont/bin/remote_command.sh srvqaperf5 qalpont! "mount -a" +/usr/local/MariaDB/Columnstore/bin/remote_command.sh srvqaperf5 qalpont! "mount -a" echo mounting PM4 -/usr/local/Calpont/bin/remote_command.sh srvqaperf8 qalpont! "mount -a" +/usr/local/MariaDB/Columnstore/bin/remote_command.sh srvqaperf8 qalpont! "mount -a" #----------------------------------------------------------------------------- echo #----------------------------------------------------------------------------- @@ -71,13 +71,13 @@ echo set disk scheduler to deadline for newly mounted LUNs #----------------------------------------------------------------------------- echo echo setting disk scheduler to deadline on PM1 -/usr/local/Calpont/bin/remote_command.sh srvqaperf3 qalpont! "/etc/rc.d/rc.local" +/usr/local/MariaDB/Columnstore/bin/remote_command.sh srvqaperf3 qalpont! "/etc/rc.d/rc.local" echo setting disk scheduler to deadline on PM2 -/usr/local/Calpont/bin/remote_command.sh srvqaperf4 qalpont! "/etc/rc.d/rc.local" +/usr/local/MariaDB/Columnstore/bin/remote_command.sh srvqaperf4 qalpont! "/etc/rc.d/rc.local" echo setting disk scheduler to deadline on PM3 -/usr/local/Calpont/bin/remote_command.sh srvqaperf5 qalpont! "/etc/rc.d/rc.local" +/usr/local/MariaDB/Columnstore/bin/remote_command.sh srvqaperf5 qalpont! "/etc/rc.d/rc.local" echo setting disk scheduler to deadline on PM4 -/usr/local/Calpont/bin/remote_command.sh srvqaperf8 qalpont! "/etc/rc.d/rc.local" +/usr/local/MariaDB/Columnstore/bin/remote_command.sh srvqaperf8 qalpont! "/etc/rc.d/rc.local" # echo -----*****-----*****-----*****-----*****-----** echo End - set dbroots to RAID Configuration $setNum diff --git a/utils/scenarios/perf/source/pf/common/setPMConfig.sh b/utils/scenarios/perf/source/pf/common/setPMConfig.sh index f967486e4..20ded54ca 100755 --- a/utils/scenarios/perf/source/pf/common/setPMConfig.sh +++ b/utils/scenarios/perf/source/pf/common/setPMConfig.sh @@ -13,7 +13,7 @@ echo Start - Set PM configuration # # Stopping the Calpont software -/usr/local/Calpont/bin/mcsadmin stopsystem y ACK_YES +/usr/local/MariaDB/Columnstore/bin/mcsadmin stopsystem y ACK_YES # # set maximum number of PMs possible for the stack maxPMs=4 @@ -26,7 +26,7 @@ numPMs=$1 #----------------------------------------------------------------------------- k=1 while [ $k -le $maxPMs ]; do - /usr/local/Calpont/bin/mcsadmin enableModule pm$k ACK_YES + /usr/local/MariaDB/Columnstore/bin/mcsadmin enableModule pm$k ACK_YES ((k++)) done #----------------------------------------------------------------------------- @@ -34,12 +34,12 @@ done #----------------------------------------------------------------------------- k=$maxPMs while [ $k -gt $numPMs ]; do - /usr/local/Calpont/bin/mcsadmin disableModule pm$k ACK_YES + /usr/local/MariaDB/Columnstore/bin/mcsadmin disableModule pm$k ACK_YES ((k--)) done #----------------------------------------------------------------------------- # Starting the Calpont software -/usr/local/Calpont/bin/mcsadmin startsystem y ACK_YES +/usr/local/MariaDB/Columnstore/bin/mcsadmin startsystem y ACK_YES sleep 60 echo *-*-*-*-*-*-*-*-*-*-*-*-*-*-* echo End - Set PM configuration diff --git a/utils/scenarios/perf/source/pf/common/setStackConfig.sh b/utils/scenarios/perf/source/pf/common/setStackConfig.sh index 2d55eadd8..e5dcae0d9 100755 --- a/utils/scenarios/perf/source/pf/common/setStackConfig.sh +++ b/utils/scenarios/perf/source/pf/common/setStackConfig.sh @@ -14,7 +14,7 @@ echo Start - Set stack configuration # # Stopping the Calpont software -/usr/local/Calpont/bin/mcsadmin stopsystem y ACK_YES +/usr/local/MariaDB/Columnstore/bin/mcsadmin stopsystem y ACK_YES # # set maximum number of UMs and PMs possible the stack maxUMs=2 @@ -29,7 +29,7 @@ numPMs=$2 #----------------------------------------------------------------------------- k=1 while [ $k -le $maxUMs ]; do - /usr/local/Calpont/bin/mcsadmin enableModule um$k ACK_YES + /usr/local/MariaDB/Columnstore/bin/mcsadmin enableModule um$k ACK_YES ((k++)) done #----------------------------------------------------------------------------- @@ -37,7 +37,7 @@ done #----------------------------------------------------------------------------- k=$maxUMs while [ $k -gt $numUMs ]; do - /usr/local/Calpont/bin/mcsadmin disableModule um$k ACK_YES + /usr/local/MariaDB/Columnstore/bin/mcsadmin disableModule um$k ACK_YES ((k--)) done #----------------------------------------------------------------------------- @@ -45,7 +45,7 @@ done #----------------------------------------------------------------------------- k=1 while [ $k -le $maxPMs ]; do - /usr/local/Calpont/bin/mcsadmin enableModule pm$k ACK_YES + /usr/local/MariaDB/Columnstore/bin/mcsadmin enableModule pm$k ACK_YES ((k++)) done #----------------------------------------------------------------------------- @@ -53,7 +53,7 @@ done #----------------------------------------------------------------------------- k=$maxPMs while [ $k -gt $numPMs ]; do - /usr/local/Calpont/bin/mcsadmin disableModule pm$k ACK_YES + /usr/local/MariaDB/Columnstore/bin/mcsadmin disableModule pm$k ACK_YES ((k--)) done #----------------------------------------------------------------------------- diff --git a/utils/scenarios/perf/source/pf/common/setTestEnv.sh b/utils/scenarios/perf/source/pf/common/setTestEnv.sh index fd99f4f30..70bb0c0d7 100755 --- a/utils/scenarios/perf/source/pf/common/setTestEnv.sh +++ b/utils/scenarios/perf/source/pf/common/setTestEnv.sh @@ -21,7 +21,7 @@ setNum=$3 # /home/pf/auto/common/setStackConfig.sh $numUMs $numPMs /home/pf/auto/common/setDBRoots.sh $setNum -/usr/local/Calpont/bin/mcsadmin startsystem +/usr/local/MariaDB/Columnstore/bin/mcsadmin startsystem sleep 90 # # End of script diff --git a/utils/scenarios/perf/source/pf/common/step1.sh b/utils/scenarios/perf/source/pf/common/step1.sh index fd99f4f30..70bb0c0d7 100755 --- a/utils/scenarios/perf/source/pf/common/step1.sh +++ b/utils/scenarios/perf/source/pf/common/step1.sh @@ -21,7 +21,7 @@ setNum=$3 # /home/pf/auto/common/setStackConfig.sh $numUMs $numPMs /home/pf/auto/common/setDBRoots.sh $setNum -/usr/local/Calpont/bin/mcsadmin startsystem +/usr/local/MariaDB/Columnstore/bin/mcsadmin startsystem sleep 90 # # End of script diff --git a/utils/scenarios/perf/source/pf/common/step2.sh b/utils/scenarios/perf/source/pf/common/step2.sh index 1cc54e4e4..c4f9689cf 100755 --- a/utils/scenarios/perf/source/pf/common/step2.sh +++ b/utils/scenarios/perf/source/pf/common/step2.sh @@ -46,15 +46,15 @@ while [ $k -le $repeatNum ] do if [ $restart == Y ] || [ $restart == y ] then - /usr/local/Calpont/bin/mcsadmin restartsystem y + /usr/local/MariaDB/Columnstore/bin/mcsadmin restartsystem y sleep 90 fi mkdir $k cd $k - cp /usr/local/Calpont/etc/Calpont.xml . - /usr/local/Calpont/bin/mcsadmin getCalpontSoftware >CalpontSoftware.txt - ls -al /usr/local/Calpont/data* > dbRoots.txt - /usr/local/Calpont/bin/mcsadmin getProcessStatus >stackConfigBefore.txt + cp /usr/local/MariaDB/Columnstore/etc/Calpont.xml . + /usr/local/MariaDB/Columnstore/bin/mcsadmin getCalpontSoftware >CalpontSoftware.txt + ls -al /usr/local/MariaDB/Columnstore/data* > dbRoots.txt + /usr/local/MariaDB/Columnstore/bin/mcsadmin getProcessStatus >stackConfigBefore.txt $exeCommand > $logFileName 2>&1 # if [ $streamNum == 1_7 ] @@ -67,7 +67,7 @@ do done fi # - /usr/local/Calpont/bin/mcsadmin getProcessStatus >stackConfigAfter.txt + /usr/local/MariaDB/Columnstore/bin/mcsadmin getProcessStatus >stackConfigAfter.txt cd .. ((k++)) done diff --git a/utils/scenarios/perf/source/pf/fm/getsar.sh b/utils/scenarios/perf/source/pf/fm/getsar.sh index bcb71e3c0..a12977c26 100755 --- a/utils/scenarios/perf/source/pf/fm/getsar.sh +++ b/utils/scenarios/perf/source/pf/fm/getsar.sh @@ -57,9 +57,9 @@ smbclient //calweb/perf -Wcalpont -Uoamuser%Calpont1 -c "cd ${host1};prompt OFF; #------------------------------------------------------------------------------ # Execute the script on the other servers in the stack # -/usr/local/Calpont/bin/remote_command.sh $host2 qalpont! "/home/pf/auto/fm/sar.sh $1 $2 $3" 1 -/usr/local/Calpont/bin/remote_command.sh $host3 qalpont! "/home/pf/auto/fm/sar.sh $1 $2 $3" 1 -/usr/local/Calpont/bin/remote_command.sh $host4 qalpont! "/home/pf/auto/fm/sar.sh $1 $2 $3" 1 -/usr/local/Calpont/bin/remote_command.sh $host5 qalpont! "/home/pf/auto/fm/sar.sh $1 $2 $3" 1 +/usr/local/MariaDB/Columnstore/bin/remote_command.sh $host2 qalpont! "/home/pf/auto/fm/sar.sh $1 $2 $3" 1 +/usr/local/MariaDB/Columnstore/bin/remote_command.sh $host3 qalpont! "/home/pf/auto/fm/sar.sh $1 $2 $3" 1 +/usr/local/MariaDB/Columnstore/bin/remote_command.sh $host4 qalpont! "/home/pf/auto/fm/sar.sh $1 $2 $3" 1 +/usr/local/MariaDB/Columnstore/bin/remote_command.sh $host5 qalpont! "/home/pf/auto/fm/sar.sh $1 $2 $3" 1 # # End of Script diff --git a/utils/scenarios/perf/source/pf/fm/getsql.sh b/utils/scenarios/perf/source/pf/fm/getsql.sh index 08aed174c..bc0e38e87 100755 --- a/utils/scenarios/perf/source/pf/fm/getsql.sh +++ b/utils/scenarios/perf/source/pf/fm/getsql.sh @@ -52,7 +52,7 @@ while [ $k -ge $st ] && [ $k -le $et ] && [ $foundstart == "no" ]; do k=`expr $k + 39` sm=`expr $sm - 61` elif [ $k -ge $st ] && [ $k -le $et ]; then - grep -q "$newdate $sh:$sm" /usr/local/Calpont/mysql/db/$host.log + grep -q "$newdate $sh:$sm" /usr/local/MariaDB/Columnstore/mysql/db/$host.log if [ "$?" -eq "0" ] && [ $foundstart == "no" ]; then start="$newdate $sh:$sm" foundstart="yes" @@ -69,7 +69,7 @@ while [ $k -ge $st ] && [ $k -le $et ] && [ $foundend == "no" ]; do k=`expr $k + 39` em=`expr $em - 61` elif [ $k -ge $st ] && [ $k -le $et ]; then - grep -q "$newdate $eh:$em" /usr/local/Calpont/mysql/db/$host.log + grep -q "$newdate $eh:$em" /usr/local/MariaDB/Columnstore/mysql/db/$host.log if [ "$?" -eq "0" ] && [ $foundend == "no" ]; then end="$newdate $eh:$em" foundend="yes" @@ -87,7 +87,7 @@ cmd="/$start/,/$end/ {print \$0} " echo $cmd >> /tmp/$host/sql/cmd.$$ # # execute the command -awk -f /tmp/$host/sql/cmd.$$ /usr/local/Calpont/mysql/db/$host.log > /tmp/$host/sql/temp.log +awk -f /tmp/$host/sql/cmd.$$ /usr/local/MariaDB/Columnstore/mysql/db/$host.log > /tmp/$host/sql/temp.log # exit # diff --git a/utils/scenarios/perf/source/pf/scripts/1server_all.sh b/utils/scenarios/perf/source/pf/scripts/1server_all.sh index 7402ef904..6dd57520f 100755 --- a/utils/scenarios/perf/source/pf/scripts/1server_all.sh +++ b/utils/scenarios/perf/source/pf/scripts/1server_all.sh @@ -57,7 +57,7 @@ echo ------------------------------------------------------------------ echo executing setLowMem100 script to prep for following stream1_7 tests echo ------------------------------------------------------------------ echo -/usr/local/Calpont/bin/setLowMem100.sh +/usr/local/MariaDB/Columnstore/bin/setLowMem100.sh # echo echo ------------------------------------------------------------------ diff --git a/utils/scenarios/perf/source/pf/scripts/1um_1a_100_s17.sh b/utils/scenarios/perf/source/pf/scripts/1um_1a_100_s17.sh index 6ea149d06..edf7fdcd0 100755 --- a/utils/scenarios/perf/source/pf/scripts/1um_1a_100_s17.sh +++ b/utils/scenarios/perf/source/pf/scripts/1um_1a_100_s17.sh @@ -8,7 +8,7 @@ echo executing setLowMem100 script to prep for following stream1_7 tests echo ------------------------------------------------------------------ echo # -/usr/local/Calpont/bin/setLowMem100.sh +/usr/local/MariaDB/Columnstore/bin/setLowMem100.sh # echo echo ------------------------------------------------------------------ diff --git a/utils/scenarios/perf/source/pf/scripts/1um_2a_100_s17.sh b/utils/scenarios/perf/source/pf/scripts/1um_2a_100_s17.sh index 3a7dd9772..c327a015e 100755 --- a/utils/scenarios/perf/source/pf/scripts/1um_2a_100_s17.sh +++ b/utils/scenarios/perf/source/pf/scripts/1um_2a_100_s17.sh @@ -8,7 +8,7 @@ echo executing setLowMem100 script to prep for following stream1_7 tests echo ------------------------------------------------------------------ echo # -/usr/local/Calpont/bin/setLowMem100.sh +/usr/local/MariaDB/Columnstore/bin/setLowMem100.sh # echo echo ------------------------------------------------------------------ diff --git a/utils/scenarios/perf/source/pf/scripts/1um_allarrays_allPMs_s0_s17.sh b/utils/scenarios/perf/source/pf/scripts/1um_allarrays_allPMs_s0_s17.sh index e242e0f96..71d3deb94 100755 --- a/utils/scenarios/perf/source/pf/scripts/1um_allarrays_allPMs_s0_s17.sh +++ b/utils/scenarios/perf/source/pf/scripts/1um_allarrays_allPMs_s0_s17.sh @@ -53,7 +53,7 @@ echo ------------------------------------------------------------------ echo executing setLowMem100 script to prep for following stream1_7 tests echo ------------------------------------------------------------------ echo -/usr/local/Calpont/bin/setLowMem100.sh +/usr/local/MariaDB/Columnstore/bin/setLowMem100.sh # echo echo ------------------------------------------------------------------ diff --git a/utils/scenarios/perf/source/pf/scripts/2a_100g_1t_s0_s17.sh b/utils/scenarios/perf/source/pf/scripts/2a_100g_1t_s0_s17.sh index 1f959132f..6c27111b5 100755 --- a/utils/scenarios/perf/source/pf/scripts/2a_100g_1t_s0_s17.sh +++ b/utils/scenarios/perf/source/pf/scripts/2a_100g_1t_s0_s17.sh @@ -82,7 +82,7 @@ echo executing setLowMem100 script to prep for following stream1_7 tests echo ------------------------------------------------------------------ echo # -/usr/local/Calpont/bin/setLowMem100.sh +/usr/local/MariaDB/Columnstore/bin/setLowMem100.sh # echo echo ------------------------------------------------------------------ diff --git a/utils/scenarios/perf/source/pf/scripts/2um_allconfigs_s17.sh b/utils/scenarios/perf/source/pf/scripts/2um_allconfigs_s17.sh index ffe560971..186abf34b 100755 --- a/utils/scenarios/perf/source/pf/scripts/2um_allconfigs_s17.sh +++ b/utils/scenarios/perf/source/pf/scripts/2um_allconfigs_s17.sh @@ -12,7 +12,7 @@ echo ------------------------------------------------------------------ echo executing setLowMem100 script to prep for following stream1_7 tests echo ------------------------------------------------------------------ echo -/usr/local/Calpont/bin/setLowMem100.sh +/usr/local/MariaDB/Columnstore/bin/setLowMem100.sh # echo echo ------------------------------------------------------------------ diff --git a/utils/scenarios/perf/source/pf/scripts/allconfigs_s17.sh b/utils/scenarios/perf/source/pf/scripts/allconfigs_s17.sh index 660be17c6..b85d99eaf 100755 --- a/utils/scenarios/perf/source/pf/scripts/allconfigs_s17.sh +++ b/utils/scenarios/perf/source/pf/scripts/allconfigs_s17.sh @@ -12,7 +12,7 @@ echo ------------------------------------------------------------------ echo executing setLowMem100 script to prep for following stream1_7 tests echo ------------------------------------------------------------------ echo -/usr/local/Calpont/bin/setLowMem100.sh +/usr/local/MariaDB/Columnstore/bin/setLowMem100.sh # echo echo ------------------------------------------------------------------ diff --git a/utils/scenarios/perf/test/pfSubmitBulkTest.sh b/utils/scenarios/perf/test/pfSubmitBulkTest.sh index efd1706b9..e2436b22e 100755 --- a/utils/scenarios/perf/test/pfSubmitBulkTest.sh +++ b/utils/scenarios/perf/test/pfSubmitBulkTest.sh @@ -19,19 +19,19 @@ # echo \#\!/bin/bash > $cpimportScriptName echo \# >> $cpimportScriptName - echo cd /usr/local/Calpont/data/bulk/log >> $cpimportScriptName + echo cd /usr/local/MariaDB/Columnstore/data/bulk/log >> $cpimportScriptName echo rm -f Jobxml_9999.log >> $cpimportScriptName echo rm -f Job_9999.log >> $cpimportScriptName echo rm -f fileStats.txt >> $cpimportScriptName echo rm -f finished.txt >> $cpimportScriptName - echo "ls -alh /usr/local/Calpont/data/bulk/data/import/*.tbl > fileStats.txt" >> $cpimportScriptName -# echo "wc -l /usr/local/Calpont/data/bulk/data/import/*.tbl >> fileStats.txt" >> $cpimportScriptName + echo "ls -alh /usr/local/MariaDB/Columnstore/data/bulk/data/import/*.tbl > fileStats.txt" >> $cpimportScriptName +# echo "wc -l /usr/local/MariaDB/Columnstore/data/bulk/data/import/*.tbl >> fileStats.txt" >> $cpimportScriptName # - echo /usr/local/Calpont/bin/colxml $testDB -r 2 -j 9999 >> $cpimportScriptName + echo /usr/local/MariaDB/Columnstore/bin/colxml $testDB -r 2 -j 9999 >> $cpimportScriptName echo sleep 5 >> $cpimportScriptName echo sync >> $cpimportScriptName # - echo \# /usr/local/Calpont/bin/cpimport -j 9999 -i >> $cpimportScriptName + echo \# /usr/local/MariaDB/Columnstore/bin/cpimport -j 9999 -i >> $cpimportScriptName echo sleep 5 >> $cpimportScriptName echo touch finished.txt >> $cpimportScriptName echo sync >> $cpimportScriptName @@ -47,15 +47,15 @@ echo "/root/genii/utils/scenarios/common/sh/remote_command.sh $PM1 qalpont! \"/mnt/parentOAM$curDir/$cpimportScriptName\"" >> $bulkScriptName # echo sleep 5 >> $bulkScriptName - echo "while [ ! -f /mnt/pm1/usr/local/Calpont/data/bulk/log/finished.txt ]; do" >> $bulkScriptName + echo "while [ ! -f /mnt/pm1/usr/local/MariaDB/Columnstore/data/bulk/log/finished.txt ]; do" >> $bulkScriptName echo sleep 5 >> $bulkScriptName echo echo waiting...... >> $bulkScriptName echo done >> $bulkScriptName # - echo cp /mnt/pm1/usr/local/Calpont/data/bulk/job/Job_9999.xml . >> $bulkScriptName - echo cp /mnt/pm1/usr/local/Calpont/data/bulk/log/Jobxml_9999.log . >> $bulkScriptName - echo cp /mnt/pm1/usr/local/Calpont/data/bulk/log/Job_9999.log . >> $bulkScriptName - echo cp /mnt/pm1/usr/local/Calpont/data/bulk/log/fileStats.txt . >> $bulkScriptName + echo cp /mnt/pm1/usr/local/MariaDB/Columnstore/data/bulk/job/Job_9999.xml . >> $bulkScriptName + echo cp /mnt/pm1/usr/local/MariaDB/Columnstore/data/bulk/log/Jobxml_9999.log . >> $bulkScriptName + echo cp /mnt/pm1/usr/local/MariaDB/Columnstore/data/bulk/log/Job_9999.log . >> $bulkScriptName + echo cp /mnt/pm1/usr/local/MariaDB/Columnstore/data/bulk/log/fileStats.txt . >> $bulkScriptName # chmod 777 $bulkScriptName # diff --git a/utils/startup/installdir.cpp b/utils/startup/installdir.cpp index 1e34caedc..ec842e8f1 100644 --- a/utils/startup/installdir.cpp +++ b/utils/startup/installdir.cpp @@ -52,7 +52,7 @@ const string StartUp::installDir() if (!cfStr.empty()) *fInstallDirp = cfStr; #else - fInstallDirp = new string("/usr/local/Calpont"); + fInstallDirp = new string("/usr/local/MariaDB/Columnstore"); //See if we can figure out the install dir in Linux... //1. env var INFINIDB_INSTALL_DIR const char* p=0; @@ -60,7 +60,7 @@ const string StartUp::installDir() if (p && *p) *fInstallDirp = p; //2. up one level from current binary location? - //3. fall back to /usr/local/Calpont + //3. fall back to /usr/local/MariaDB/Columnstore #endif return *fInstallDirp; diff --git a/utils/udfsdk/README.txt b/utils/udfsdk/README.txt index a812b4582..591db3154 100644 --- a/utils/udfsdk/README.txt +++ b/utils/udfsdk/README.txt @@ -15,11 +15,11 @@ At this point you can use the idb_add() function template in udfinfinidb.cpp and files to create your own function or just try that function as is. Make the library Stop InfiniDB -Copy the libudf_mysql.so.1.0.0 and libudfsdk.so.1.0.0 file to /usr/local/Calpont/lib on +Copy the libudf_mysql.so.1.0.0 and libudfsdk.so.1.0.0 file to /usr/local/MariaDB/Columnstore/lib on every InfiniDB node Start InfiniDB -In the directory /usr/local/Calpont/mysql/lib64/mysql/plugin create a symbolic link called -libudf_msql.so to the file /usr/local/Calpont/lib/libudf_msql.so.1.0.0 +In the directory /usr/local/MariaDB/Columnstore/mysql/lib64/mysql/plugin create a symbolic link called +libudf_msql.so to the file /usr/local/MariaDB/Columnstore/lib/libudf_msql.so.1.0.0 In the mysql client add the function (e.g. "create function idb_add returns integer soname 'libudf_msql.so';") You should now be able to use the idb_add() function in the select and/or where clauses diff --git a/utils/udfsdk/udfsdk.h b/utils/udfsdk/udfsdk.h index 5d0529d02..09f6dc4b9 100644 --- a/utils/udfsdk/udfsdk.h +++ b/utils/udfsdk/udfsdk.h @@ -30,7 +30,7 @@ * 2. add the UDF function implementation in udfsdk.cpp * 3. add the connector stub for this UDF function in udfsdk.cpp * 4. build the dynamic library libudfsdk - * 5. put the library in /usr/local/Calpont/lib of all modules + * 5. put the library in /usr/local/MariaDB/Columnstore/lib of all modules * 6. restart all the InfiniDB servers and MySQL server * 7. notify mysqld about the new functions with the commands like: * diff --git a/versioning/BRM/Makefile b/versioning/BRM/Makefile index 73185044b..deca53e6d 100755 --- a/versioning/BRM/Makefile +++ b/versioning/BRM/Makefile @@ -23,7 +23,7 @@ TLIBS=-L. -lbrm -L$(EXPORT_ROOT)/lib -lrwlock -lmessageqcpp -ldl -lpthread -lcpp -lconfigcpp -lxml2 -lexecplan -ljoblist -lfuncexp -ljoiner -lcommon \ -ldataconvert -lloggingcpp -lrowgroup -GLIBS=-L. -lbrm -L$(EXPORT_ROOT)/lib $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +GLIBS=-L. -lbrm -L$(EXPORT_ROOT)/lib $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib OAMLIBS=-loamcpp -lsnmpmanager -lnetsnmp \ -lnetsnmpagent -lnetsnmphelpers -lnetsnmpmibs diff --git a/versioning/BRM/slavecomm.cpp b/versioning/BRM/slavecomm.cpp index c84057e58..30a215c73 100644 --- a/versioning/BRM/slavecomm.cpp +++ b/versioning/BRM/slavecomm.cpp @@ -1903,8 +1903,8 @@ int SlaveComm::replayJournal(string prefix) // argument. // If A or B files are being loaded, strip off the A or B for the journal file name as there is only one journal file. - // For example, if prefix is "/usr/local/Calpont/data1/systemFiles/dbrm/BRM_savesA" the journal file name will be - // "/usr/local/Calpont/data1/systemFiles/dbrm/BRM_saves_journal". + // For example, if prefix is "/usr/local/MariaDB/Columnstore/data1/systemFiles/dbrm/BRM_savesA" the journal file name will be + // "/usr/local/MariaDB/Columnstore/data1/systemFiles/dbrm/BRM_saves_journal". string tmp = prefix.substr(prefix.length()-1); string fName; diff --git a/writeengine/bulk/Makefile b/writeengine/bulk/Makefile index 7e5efd1c9..62110e455 100755 --- a/writeengine/bulk/Makefile +++ b/writeengine/bulk/Makefile @@ -10,7 +10,7 @@ VERSION=1.0.0 .PHONY: install clean docs test coverage leakcheck install_bulk TLIBS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_COMMON_LIBS) $(IDB_WRITE_LIBS) -GLIBS=-L$(CALPONT_LIBRARY_PATH) $(IDB_COMMON_LIBS) $(IDB_WRITE_LIBS) $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib +GLIBS=-L$(CALPONT_LIBRARY_PATH) $(IDB_COMMON_LIBS) $(IDB_WRITE_LIBS) $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib SRCS=we_bulkload.cpp we_workers.cpp we_colopbulk.cpp we_tableinfo.cpp we_bulkloadbuffer.cpp we_colbuf.cpp we_colbufcompressed.cpp we_colbufmgr.cpp we_colbufmgrdctnry.cpp we_colbufsec.cpp we_columninfo.cpp we_columninfocompressed.cpp we_bulkstatus.cpp we_colextinf.cpp we_tempxmlgendata.cpp we_columnautoinc.cpp we_brmreporter.cpp we_extentstripealloc.cpp BULK_SRCS=cpimport.cpp diff --git a/writeengine/bulk/bulkload.sh b/writeengine/bulk/bulkload.sh index ae64279b1..f759efec1 100755 --- a/writeengine/bulk/bulkload.sh +++ b/writeengine/bulk/bulkload.sh @@ -12,7 +12,7 @@ #Job ID will determine the names of the two xml files. For example, job id 100 will generate Job_100.xml for columns and Job_101 for index xml file. Job id for index xml file is the entered job id +1 #if the job id is skipped, the default job ids are 299 and 300 for column and index files #There are two xml files will be generated which reside in bulkroot directory under subdirectory job -#For example, the job directory may look like /usr/local/Calpont/test/bulk/job +#For example, the job directory may look like /usr/local/MariaDB/Columnstore/test/bulk/job # Set up a default search path. PATH="$HOME/genii/export/bin:.:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin" diff --git a/writeengine/bulk/bulkloadp.sh b/writeengine/bulk/bulkloadp.sh index 7ee94d88c..d457f1623 100755 --- a/writeengine/bulk/bulkloadp.sh +++ b/writeengine/bulk/bulkloadp.sh @@ -12,7 +12,7 @@ #Job ID will determine the names of the two xml files. For example, job id 100 will generate Job_100.xml for columns and Job_101 for index xml file. Job id for index xml file is the entered job id +1 #if the job id is skipped, the default job ids are 299 and 300 for column and index files #There are two xml files will be generated which reside in bulkroot directory under subdirectory job -#For example, the job directory may look like /usr/local/Calpont/test/bulk/job +#For example, the job directory may look like /usr/local/MariaDB/Columnstore/test/bulk/job # Set up a default search path. PROG_NAME=$(basename $0) @@ -92,10 +92,10 @@ fi if [ -n "$CALPONT_CONFIG_FILE" ]; then echo "CALPONT_CONFIG_FILE=" $CALPONT_CONFIG_FILE elif [ -z "$CALPONT_CONFIG_FILE"]; then - CALPONT_CONFIG_FILE="/usr/local/Calpont/etc/Calpont.xml" + CALPONT_CONFIG_FILE="/usr/local/MariaDB/Columnstore/etc/Calpont.xml" echo "CALPONT_CONFIG_FILE=" $CALPONT_CONFIG_FILE else - CALPONT_CONFIG_FILE="/usr/local/Calpont/etc/Calpont.xml" + CALPONT_CONFIG_FILE="/usr/local/MariaDB/Columnstore/etc/Calpont.xml" echo "CALPONT_CONFIG_FILE=" $CALPONT_CONFIG_FILE fi diff --git a/writeengine/bulk/cleanup.sh b/writeengine/bulk/cleanup.sh index b63c826f7..26ec1607a 100755 --- a/writeengine/bulk/cleanup.sh +++ b/writeengine/bulk/cleanup.sh @@ -12,7 +12,7 @@ #Job ID will determine the names of the two xml files. For example, job id 100 will generate Job_100.xml for columns and Job_101 for index xml file. Job id for index xml file is the entered job id +1 #if the job id is skipped, the default job ids are 299 and 300 for column and index files #There are two xml files will be generated which reside in bulkroot directory under subdirectory job -#For example, the job directory may look like /usr/local/Calpont/test/bulk/job +#For example, the job directory may look like /usr/local/MariaDB/Columnstore/test/bulk/job # Set up a default search path. PATH="$HOME/genii/export/bin:.:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin" diff --git a/writeengine/bulk/cpimport.sh b/writeengine/bulk/cpimport.sh index 6e158c1bf..7d97bfdb6 100755 --- a/writeengine/bulk/cpimport.sh +++ b/writeengine/bulk/cpimport.sh @@ -12,7 +12,7 @@ #Job ID will determine the names of the two xml files. For example, job id 100 will generate Job_100.xml for columns and Job_101 for index xml file. Job id for index xml file is the entered job id +1 #if the job id is skipped, the default job ids are 299 and 300 for column and index files #There are two xml files will be generated which reside in bulkroot directory under subdirectory job -#For example, the job directory may look like /usr/local/Calpont/test/bulk/job +#For example, the job directory may look like /usr/local/MariaDB/Columnstore/test/bulk/job # Set up a default search path. diff --git a/writeengine/bulk/dbbuilder.sh b/writeengine/bulk/dbbuilder.sh index 5bc9acdfb..724eee106 100755 --- a/writeengine/bulk/dbbuilder.sh +++ b/writeengine/bulk/dbbuilder.sh @@ -12,7 +12,7 @@ #Job ID will determine the names of the two xml files. For example, job id 100 will generate Job_100.xml for columns and Job_101 for index xml file. Job id for index xml file is the entered job id +1 #if the job id is skipped, the default job ids are 299 and 300 for column and index files #There are two xml files will be generated which reside in bulkroot directory under subdirectory job -#For example, the job directory may look like /usr/local/Calpont/test/bulk/job +#For example, the job directory may look like /usr/local/MariaDB/Columnstore/test/bulk/job # Set up a default search path. PATH="$HOME/genii/export/bin:.:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin" diff --git a/writeengine/bulk/dbload_tmplate.sh b/writeengine/bulk/dbload_tmplate.sh index 75df669cd..2f24c445a 100755 --- a/writeengine/bulk/dbload_tmplate.sh +++ b/writeengine/bulk/dbload_tmplate.sh @@ -12,7 +12,7 @@ #Job ID will determine the names of the two xml files. For example, job id 100 will generate Job_100.xml for columns and Job_101 for index xml file. Job id for index xml file is the entered job id +1 #if the job id is skipped, the default job ids are 299 and 300 for column and index files #There are two xml files will be generated which reside in bulkroot directory under subdirectory job -#For example, the job directory may look like /usr/local/Calpont/test/bulk/job +#For example, the job directory may look like /usr/local/MariaDB/Columnstore/test/bulk/job # Set up a default search path. PATH="$HOME/genii/export/bin:.:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin" diff --git a/writeengine/bulk/dbreset.sh b/writeengine/bulk/dbreset.sh index c0c45bcfb..ac7808e56 100755 --- a/writeengine/bulk/dbreset.sh +++ b/writeengine/bulk/dbreset.sh @@ -12,7 +12,7 @@ #Job ID will determine the names of the two xml files. For example, job id 100 will generate Job_100.xml for columns and Job_101 for index xml file. Job id for index xml file is the entered job id +1 #if the job id is skipped, the default job ids are 299 and 300 for column and index files #There are two xml files will be generated which reside in bulkroot directory under subdirectory job -#For example, the job directory may look like /usr/local/Calpont/test/bulk/job +#For example, the job directory may look like /usr/local/MariaDB/Columnstore/test/bulk/job # Set up a default search path. PATH="$HOME/genii/export/bin:.:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin" diff --git a/writeengine/bulk/dbstart.sh b/writeengine/bulk/dbstart.sh index 5a0495140..258c6e17d 100755 --- a/writeengine/bulk/dbstart.sh +++ b/writeengine/bulk/dbstart.sh @@ -12,7 +12,7 @@ #Job ID will determine the names of the two xml files. For example, job id 100 will generate Job_100.xml for columns and Job_101 for index xml file. Job id for index xml file is the entered job id +1 #if the job id is skipped, the default job ids are 299 and 300 for column and index files #There are two xml files will be generated which reside in bulkroot directory under subdirectory job -#For example, the job directory may look like /usr/local/Calpont/test/bulk/job +#For example, the job directory may look like /usr/local/MariaDB/Columnstore/test/bulk/job # Set up a default search path. PATH="$HOME/genii/export/bin:.:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin" diff --git a/writeengine/bulk/dbstop.sh b/writeengine/bulk/dbstop.sh index 5f67b90c0..434d2a9a9 100755 --- a/writeengine/bulk/dbstop.sh +++ b/writeengine/bulk/dbstop.sh @@ -12,7 +12,7 @@ #Job ID will determine the names of the two xml files. For example, job id 100 will generate Job_100.xml for columns and Job_101 for index xml file. Job id for index xml file is the entered job id +1 #if the job id is skipped, the default job ids are 299 and 300 for column and index files #There are two xml files will be generated which reside in bulkroot directory under subdirectory job -#For example, the job directory may look like /usr/local/Calpont/test/bulk/job +#For example, the job directory may look like /usr/local/MariaDB/Columnstore/test/bulk/job # Set up a default search path. PATH="$HOME/genii/export/bin:.:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin" diff --git a/writeengine/redistribute/we_redistributecontrol.cpp b/writeengine/redistribute/we_redistributecontrol.cpp index 501d2306f..7c195c99b 100644 --- a/writeengine/redistribute/we_redistributecontrol.cpp +++ b/writeengine/redistribute/we_redistributecontrol.cpp @@ -86,7 +86,7 @@ RedistributeControl* RedistributeControl::instance() RedistributeControl::RedistributeControl() : fInfoFilePtr(NULL), fPlanFilePtr(NULL) { - // default path /usr/local/Calpont/data1/systemFiles/redistribute + // default path /usr/local/MariaDB/Columnstore/data1/systemFiles/redistribute string installDir = startup::StartUp::installDir(); fRedistributeDir = installDir + RedistributeDir; fInfoFilePath = fRedistributeDir + InfoFileName; diff --git a/writeengine/server/Makefile b/writeengine/server/Makefile index d8d424983..577e6f068 100755 --- a/writeengine/server/Makefile +++ b/writeengine/server/Makefile @@ -13,7 +13,7 @@ VERSION=1.0.0 .PHONY: install clean docs test coverage leakcheck install_server TLIBS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_COMMON_LIBS) $(IDB_WRITE_LIBS) -LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_COMMON_LIBS) $(IDB_WRITE_LIBS) $(IDB_SNMP_LIBS) -lthreadpool -lwriteengineredistribute -Wl,--rpath -Wl,/usr/local/Calpont/lib +LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_COMMON_LIBS) $(IDB_WRITE_LIBS) $(IDB_SNMP_LIBS) -lthreadpool -lwriteengineredistribute -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib GLIBS=$(LDFLAGS) SRCS= \ diff --git a/writeengine/splitter/Makefile b/writeengine/splitter/Makefile index 97c176a2c..0a46b5df6 100755 --- a/writeengine/splitter/Makefile +++ b/writeengine/splitter/Makefile @@ -29,7 +29,7 @@ CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2 CXXFLAGS+=$(DEBUG_FLAGS) -Wall # Linker flags -LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_COMMON_LIBS) $(IDB_WRITE_LIBS) -lthreadpool $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib -lbatchloader +LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_COMMON_LIBS) $(IDB_WRITE_LIBS) -lthreadpool $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib -lbatchloader .PHONY: install clean docs test coverage leakcheck TLIBS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_COMMON_LIBS) $(IDB_WRITE_LIBS) diff --git a/writeengine/splitter/we_cmdargs.cpp b/writeengine/splitter/we_cmdargs.cpp index d79eb6cae..38be680bd 100644 --- a/writeengine/splitter/we_cmdargs.cpp +++ b/writeengine/splitter/we_cmdargs.cpp @@ -95,7 +95,7 @@ void WECmdArgs::appTestFunction() // testing begins //std::string aJobFile("/home/bpaul/Calpont/data/bulk/job/Job_1234.xml"); - //std::string aJobFile("/usr/local/Calpont/data/bulk/job/Job_1234.xml"); + //std::string aJobFile("/usr/local/MariaDB/Columnstore/data/bulk/job/Job_1234.xml"); //setSchemaAndTableFromJobFile(aJobFile); //setEnclByAndEscCharFromJobFile(aJobFile); //exit(1); diff --git a/writeengine/wrapper/tdriver.cpp b/writeengine/wrapper/tdriver.cpp index ccb651de5..fa8a1bce0 100644 --- a/writeengine/wrapper/tdriver.cpp +++ b/writeengine/wrapper/tdriver.cpp @@ -2792,8 +2792,8 @@ void testBoostFloat() void testSoloman() { - char fileName[80]="/usr/local/Calpont/data1/test.dat"; - char outfile[80] = "/usr/local/Calpont/data1/out.dat"; + char fileName[80]="/usr/local/MariaDB/Columnstore/data1/test.dat"; + char outfile[80] = "/usr/local/MariaDB/Columnstore/data1/out.dat"; int numOfBlock=8192,blockSize=8192; FILE* testFile; FILE* outFile;