You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-3606 Make ColumnStore use generic paths
ColumnStore now uses standard bin/lib paths for pretty much everything. Data path is now hard-coded to /var/lib/columnstore. This patch also: * Removes v1 decompression * Removes a bunch of unneeded files * Removes COLUMNSTORE_INSTALL_DIR / $INSTALLDIR * Makes my.cnf.d work for all platforms (MCOL-3558) * Changes configcpp to use recursive mutex (fixes possible config write deadlock) * Fixes MCOL-3599 Fix regr functions, The library was installed in the wrong location * Fixes a bunch of Ubuntu packaging issues * Changes the binary names of several of the executables so as not to clash with potential executables from other packages
This commit is contained in:
@ -74,12 +74,38 @@ SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/obj)
|
||||
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
|
||||
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
|
||||
|
||||
SET (ENGINE_SYSCONFDIR "/etc")
|
||||
SET (ENGINE_DATADIR "/var/lib/columnstore")
|
||||
|
||||
# TODO: This will all be replaced by variables from server install_layout.cmake once we are a submodule
|
||||
IF (RPM)
|
||||
SET(MARIADB_PLUGINDIR "/usr/lib64/mysql/plugin")
|
||||
SET(MARIADB_MYCNFDIR "/etc/my.cnf.d")
|
||||
SET (ENGINE_LIBDIR "/usr/lib64")
|
||||
SET (ENGINE_BINDIR "/usr/bin")
|
||||
SET (ENGINE_INCDIR "/usr/include")
|
||||
SET (ENGINE_MANDIR "/usr/share/man")
|
||||
SET (ENGINE_SBINDIR "/usr/sbin")
|
||||
SET (ENGINE_SUPPORTDIR "/usr/share/columnstore")
|
||||
ELSEIF (DEB)
|
||||
SET(MARIADB_PLUGINDIR "/usr/lib/mysql/plugin")
|
||||
SET(MARIADB_MYCNFDIR "/etc/mysql/conf.d")
|
||||
SET (ENGINE_LIBDIR "/usr/lib")
|
||||
SET (ENGINE_BINDIR "/usr/bin")
|
||||
SET (ENGINE_INCDIR "/usr/include")
|
||||
SET (ENGINE_MANDIR "/usr/share/man")
|
||||
SET (ENGINE_SBINDIR "/usr/sbin")
|
||||
SET (ENGINE_SUPPORTDIR "/usr/share/columnstore")
|
||||
ELSE()
|
||||
SET(MARIADB_PLUGINDIR "/usr/local/lib/mysql/plugin")
|
||||
# TODO: prefix should probably apply here
|
||||
SET(MARIADB_PLUGINDIR "/usr/local/lib/mysql/plugin")
|
||||
SET(MARIADB_MYCNFDIR "/etc/mysql")
|
||||
SET (ENGINE_LIBDIR "/usr/local/lib")
|
||||
SET (ENGINE_BINDIR "/usr/local/bin")
|
||||
SET (ENGINE_INCDIR "/usr/local/include")
|
||||
SET (ENGINE_MANDIR "/usr/local/man")
|
||||
SET (ENGINE_SBINDIR "/usr/local/sbin")
|
||||
SET (ENGINE_SUPPORTDIR "/usr/local/share/columnstore")
|
||||
ENDIF()
|
||||
|
||||
SET_PROPERTY(DIRECTORY PROPERTY EP_BASE ${CMAKE_CURRENT_BINARY_DIR}/external)
|
||||
@ -103,26 +129,6 @@ SET (PACKAGE_STRING columnstore-${PACKAGE_VERSION})
|
||||
|
||||
|
||||
SET (ENGINE_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
SET (INSTALL_ENGINE "/usr/local/mariadb/columnstore")
|
||||
|
||||
# use, i.e. don't skip the full RPATH for the build tree
|
||||
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
|
||||
|
||||
# when building, don't use the install RPATH already
|
||||
# (but later on when installing)
|
||||
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
||||
|
||||
SET(CMAKE_INSTALL_RPATH "${INSTALL_ENGINE}/lib")
|
||||
|
||||
# add the automatically determined parts of the RPATH
|
||||
# which point to directories outside the build tree to the install RPATH
|
||||
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
|
||||
# the RPATH to be used when installing, but only if it's not a system directory
|
||||
LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${INSTALL_ENGINE}/lib" isSystemDir)
|
||||
IF("${isSystemDir}" STREQUAL "-1")
|
||||
SET(CMAKE_INSTALL_RPATH "${INSTALL_ENGINE}/lib")
|
||||
ENDIF("${isSystemDir}" STREQUAL "-1")
|
||||
|
||||
INCLUDE (configureEngine)
|
||||
|
||||
@ -192,17 +198,6 @@ IF(SECURITY_HARDENED)
|
||||
ENDIF()
|
||||
|
||||
SET (ENGINE_LDFLAGS "-Wl,--no-as-needed -Wl,--add-needed")
|
||||
SET (ENGINE_LIBDIR "${INSTALL_ENGINE}/lib")
|
||||
SET (ENGINE_BINDIR "${INSTALL_ENGINE}/bin")
|
||||
SET (ENGINE_INCDIR "${INSTALL_ENGINE}/include")
|
||||
SET (ENGINE_SYSCONFDIR "/etc")
|
||||
SET (ENGINE_MANDIR "${INSTALL_ENGINE}/man")
|
||||
SET (ENGINE_SBINDIR "${INSTALL_ENGINE}/sbin")
|
||||
SET (ENGINE_SHAREDIR "${INSTALL_ENGINE}/share")
|
||||
SET (ENGINE_POSTDIR "${INSTALL_ENGINE}/post")
|
||||
SET (ENGINE_LOCALDIR "${INSTALL_ENGINE}/local")
|
||||
SET (ENGINE_MYSQLDIR "${INSTALL_ENGINE}/mysql")
|
||||
SET (ENGINE_TOOLSDIR "${INSTALL_ENGINE}/tools")
|
||||
|
||||
SET (ENGINE_COMMON_LIBS messageqcpp loggingcpp configcpp idbboot ${Boost_LIBRARIES} xml2 pthread rt libmysql_client ${JEMALLOC_LIBRARIES})
|
||||
SET (ENGINE_OAM_LIBS oamcpp alarmmanager)
|
||||
@ -228,6 +223,10 @@ ELSE()
|
||||
SET (SERVER_SOURCE_ROOT_DIR ${CMAKE_BINARY_DIR}/..)
|
||||
ENDIF()
|
||||
|
||||
IF (NOT SERVER_BUILD_DIR)
|
||||
SET (SERVER_BUILD_DIR ${SERVER_SOURCE_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
MESSAGE("SERVER_BUILD_INCLUDE_DIR = ${SERVER_BUILD_INCLUDE_DIR}")
|
||||
MESSAGE("SERVER_SOURCE_ROOT_DIR = ${SERVER_SOURCE_ROOT_DIR}")
|
||||
|
||||
@ -332,12 +331,12 @@ exec_program("git"
|
||||
|
||||
# releasenum is used by external scripts for various tasks. Leave it alone.
|
||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/build/releasenum.in ${CMAKE_CURRENT_BINARY_DIR}/build/releasenum IMMEDIATE)
|
||||
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/build/releasenum DESTINATION ${INSTALL_ENGINE} COMPONENT platform)
|
||||
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/build/releasenum DESTINATION ${ENGINE_SUPPORTDIR} COMPONENT platform)
|
||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/columnstoreversion.h.in ${CMAKE_CURRENT_SOURCE_DIR}/columnstoreversion.h)
|
||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
|
||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/gitversionEngine.in ${CMAKE_CURRENT_BINARY_DIR}/gitversionEngine IMMEDIATE)
|
||||
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/gitversionEngine DESTINATION ${INSTALL_ENGINE} COMPONENT platform)
|
||||
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/gitversionEngine DESTINATION ${ENGINE_SUPPORTDIR} COMPONENT platform)
|
||||
|
||||
INCLUDE(cpackEngineRPM)
|
||||
INCLUDE(cpackEngineDEB)
|
||||
|
445
ChangeLog
445
ChangeLog
@ -1,445 +0,0 @@
|
||||
/***********************************************************************
|
||||
*
|
||||
* Copyright (C) 2013 InfiniDB Corp
|
||||
* All Rights Reserved
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
July 7, 2014
|
||||
Version 4.6
|
||||
|
||||
|
||||
ENHANCEMENTS INCLUDED IN THIS RELEASE
|
||||
-------------------------------------
|
||||
Enh # Short Description
|
||||
1505 Implement temp file based LargeHashJoin for tuple joins
|
||||
3683 Allow function(column) = function(column) join
|
||||
5308 Improve performance of load data infile and insert into select from
|
||||
|
||||
|
||||
ISSUES RESOLVED IN THIS RELEASE
|
||||
-------------------------------
|
||||
Bug # Short Description
|
||||
|
||||
3858 While "load data infile" is in progress, PrimProc fails to read compressed chunk and retries for more than a minute
|
||||
4295 CPimport Mode 2: Should check for input files on all PMs before starting loading
|
||||
4737 Distributed cpimport does not support a list of import files to a single table
|
||||
4789 InfiniDB came up normally after encountering an critical sessionManager::rollback() error
|
||||
5134 Source package: After compilation and installation, InfiniDB reported lib not found error during startup
|
||||
5140 second and subsequent load data infiles have 30 second delay with auto increment
|
||||
5523 Mysql is resetting when running a query on a information_schema.table and an InfiniDB table.
|
||||
5727 Improve logging around controllernode start up
|
||||
5756 After a failed addModule command movePmDbrootConfig did not fail
|
||||
5758 when amazon UM modules are removed, their associated EBS storages are not removed
|
||||
5761 Support additional versions of Java for Hadoop installations
|
||||
5762 Need a method to handle MySQL port conflict on a multi-server install
|
||||
5773 Startsystem is failing when shutdown has not completed.
|
||||
5847 IDB-2021 on query using multiple pseudo column functions against same column and aggregation
|
||||
5848 No CP elimination from idbPartition(col) in the where clause
|
||||
5865 ERROR 138 (HY000): IDB-1000: 'orders' and 'sub-query' are not joined on a query with an or condition and not in condition
|
||||
5891 getsystemdisk reporting minus value
|
||||
5894 Performance issue when inserting a value in an autoincrement column
|
||||
5930 Not in group by error on query grouping by idbPm and idbDbRoot functions
|
||||
5931 current builds do not support a non-root / hdfs install
|
||||
5946 load data infile error: ERROR 122 (HY000): CAL0006: Error verifying compression headers
|
||||
5947 calonlinealter always creates non compressed columns
|
||||
5950 getModuleHostNames command on AWS returned a segmentation fault error
|
||||
5954 calpontSupport for Windows does not recognize options
|
||||
5958 Query with a subselect is getting an assertion error
|
||||
5963 configxml.sh fails to set CrossEngineSupport Password from the default setting
|
||||
5978 crash with prepared statements
|
||||
5987 hadoop test failed on install, hadoop not install where setenv was looking and not a parcel
|
||||
5992 Bulk load fails on long schema name, long table name, and long column name combination.
|
||||
5993 IDB-2016: Non supported item 'c2' on the GROUP BY list.
|
||||
5996 Table reporting errors after a LDI
|
||||
5997 standard mysql and infinidb mysql incorrectly starting/stopping each other
|
||||
6000 New MySQL port test is insufficient
|
||||
6001 cpimport performance improvement for tables with many dictionary columns
|
||||
6005 addModule command failed to add an UM
|
||||
6010 InfiniDB mysql replication doesn't work when UM mysql Port address is not 3306
|
||||
6013 HW 2.1 testing with 4.5.1-2 - different JAVA_HOME's are setup
|
||||
6017 Queries with "where date(col) in (select dtCol)" not finding rows
|
||||
6026 Prevent potential infinite loops reading input in postConfigure
|
||||
6027 post-install message for a non-root hadoop install is incorrect..
|
||||
6029 when autocommit off, batchinsert set hwm of dictionary store file to 0
|
||||
6041 When loading 4160825419 rows cpimport reported as -134141877 rows
|
||||
6044 'union all' query generates tupleconstantstep.cpp@731: assertion 'fRowConst.getSize() == fRowOut.getSize()' failed
|
||||
6061 window function returned incorrect results
|
||||
6066 query with alias is returning IDB-3009: Unknown column error.
|
||||
6073 setenv scripts issues on Ubuntu
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Copyright (C) 2013 InfiniDB Corp
|
||||
* All Rights Reserved
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
June 23, 2014
|
||||
Version 4.5.1
|
||||
|
||||
|
||||
ENHANCEMENTS INCLUDED IN THIS RELEASE
|
||||
-------------------------------------
|
||||
Enh # Short Description
|
||||
|
||||
|
||||
|
||||
ISSUES RESOLVED IN THIS RELEASE
|
||||
-------------------------------
|
||||
Bug # Short Description
|
||||
|
||||
4438 Implement -j option with simple usage to create a specific job log file
|
||||
4638 Update from 2.2.x to 3.0 is not supported with multiple dbroots
|
||||
5501 update with subquery using a view with an order by receives an error when using infinidb tables
|
||||
5523 Mysql is resetting when running a query on a information_schema.table and an InfiniDB table.
|
||||
5739 install-infinidb.sh script should be removed
|
||||
5756 After a failed addModule command movePmDbrootConfig did not fail
|
||||
5758 when amazon UM modules are removed, their associated EBS storages aren't
|
||||
5761 Add support for additional Java versions with installation on HDFS
|
||||
5762 Need a method to handle MySQL port conflict on a multi-server install
|
||||
5785 While running a complex query a Control C aborts the query but may not clear ExeMgr memory
|
||||
5804 mysql reset occurring following an install when /dev/shm permissions were not set correctly
|
||||
5838 no prompt postConfigure does not work when mysql password is required.
|
||||
5873 install failure - No Columnstore.xml: failed to be written in config api
|
||||
5881 with replication, delete with idbpm(colname) in where clause failed with an error.
|
||||
5884 query returns incorrect results when using an on clause filter involving a table not directly involved in the outer join
|
||||
5887 " Incorrect results of Is Null "
|
||||
5891 getsystemdisk returns minus value
|
||||
5893 Pseudo column functions return an "BPS not created 1" error when used as the 2nd expression in a where clause
|
||||
5896 getConfig has no linefeed after returning value
|
||||
5900 PrimProc crashes if NumBlocksPct has '%' in value
|
||||
5903 startsystem reported successful system start when mysqld aborted
|
||||
5904 Changing dbroot-to-pm assignment during postConfigure causes double-mounted storage devices
|
||||
5906 Diagnostic messages logged in the err.log file during new installation
|
||||
5907 After installation, a rsync error was report in UM1 but the stack seems to be in working state
|
||||
5908 4.5 non-root install problems
|
||||
5909 On a stack with replication and local query enabled, rerunning postConfigure caused the two features to become disabled
|
||||
5910 Object names > 64 cause replication errors
|
||||
5913 Renaming an autoincrement column is resetting the next value
|
||||
5915 On hadoop system, SYSTABLE's update was not flushed to disk when implementing split dbroots for systables
|
||||
5916 query using a view on a view causes ERROR 2013 (HY000): Lost connection to MySQL server during query
|
||||
5917 non-root gluster / hadoop installs fail - storage types not being offered in postConfigure
|
||||
5919 Warning of future deprecated "default-character-set" setting on Windows install
|
||||
5923 ERROR 122 (HY000): Lost connection to DDLProc
|
||||
5925 Add the two new options to postConfigure -h
|
||||
5932 Queries with limits sometimes set the extent map min / max incorrectly
|
||||
5943 mysql daemon fails to start on pm2 of a non-root install local-query configured system
|
||||
5944 Incorrect schema name in error message
|
||||
5946 load data infile error: ERROR 122 (HY000): CAL0006: Error verifying compression headers
|
||||
5947 calonlinealter always creates non compressed columns
|
||||
5956 Error Code: 138 IDB-2015: Sorting length exceeded when using a view
|
||||
5958 Query with a subselect is getting an assertion error
|
||||
5973 large system (1um-30pm) failing to start, ProcMgr incorrect stopping with ProcMons not active
|
||||
5981 postconfigure upgrade when enabling local-query fails
|
||||
5983 all the hdfs settings are not in the .bashrc file after install
|
||||
5993 IDB-2016: Non supported item 'c2' on the GROUP BY list.
|
||||
5996 Table reporting errors after a LDI
|
||||
6001 cpimport performance improvement for tables with many dictionary columns
|
||||
6029 with autocommit off, batchinsert set hwm of dictionary store file to 0
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Copyright (C) 2013 InfiniDB Corp
|
||||
* All Rights Reserved
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
March 31, 2014
|
||||
Version 4.5
|
||||
|
||||
|
||||
ENHANCEMENTS INCLUDED IN THIS RELEASE
|
||||
-------------------------------------
|
||||
Enh # Short Description
|
||||
|
||||
4021 Selectable pseudo columns for row/PM identification
|
||||
4578 Upgrade to latest MySQL 5.1.73
|
||||
5572 Optimizations to cpimport with Hadoop
|
||||
5634 Optimization: Project only the necessary columns from views with union all or union
|
||||
5635 Optimization: Use partition elimination for from clause sub queries and views with union / union all
|
||||
5657 Local PM query interface
|
||||
5660 Local PM Sqoop Import
|
||||
5740 Enable use of MySQL Replication on UMs with InfiniDB
|
||||
5799 Enhancement request to not provide information when performing a non-hadoop install on a system with hadoop
|
||||
|
||||
|
||||
ISSUES RESOLVED IN THIS RELEASE
|
||||
-------------------------------
|
||||
Bug # Short Description
|
||||
|
||||
5443 An error is not issued when changing a column's datatype
|
||||
5444 alter table will not allow an autoincrement column to be renamed.
|
||||
5611 Windows MySQL doesn't build out of github
|
||||
5640 Hadoop: dumpcol and eval returned a java error with stack trace when non-existing file is supplied
|
||||
5647 cpimport -i option doesn't work with modes 1 and 2
|
||||
5745 hadoop: unknown bulk rollback error on 4PM stack
|
||||
5748 startsystem failure when user-module is disabled
|
||||
5805 Query with avg windowing function returning the average at the wrong decimal scale
|
||||
5806 cpimport loads data incorrectly on a multi-server stack when the table has a mix of compressed and non-compressed columns
|
||||
5807 concat producing an incorrect count when using a view
|
||||
5808 colxml error reported on Windows system.
|
||||
5811 selecting from a view which has a cross engine join produces an ERROR 122 (HY000): fatal error executing query in crossengine client lib(17)(17)
|
||||
5817 addModule / altersystem-enablemodule fails on amazon with InfiniDB 4.x
|
||||
5819 Columnstore.xml and Columnstore.xml.singleserver do not have the same parameters.
|
||||
5820 Inconsistent rounding on percentile_cont windowing function
|
||||
5861 post-install reported to have run the setenv-hdfs-12 script on a CDH 4 install
|
||||
5864 Include calpontSupport in the standard edition
|
||||
5874 Reset of ProcessMonitor on PM2 on a combo system left mysqld as man_offline
|
||||
|
||||
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Copyright (C) 2014 InfiniDB Corp
|
||||
* All Rights Reserved
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
April 14, 2014
|
||||
Version 4.0.3
|
||||
|
||||
|
||||
ENHANCEMENTS INCLUDED IN THIS RELEASE
|
||||
-------------------------------------
|
||||
Enh # Short Description
|
||||
|
||||
|
||||
|
||||
ISSUES RESOLVED IN THIS RELEASE
|
||||
-------------------------------
|
||||
Bug # Short Description
|
||||
|
||||
4638 Update from 2.2.x to 3.0 is not supported with multiple dbroots
|
||||
5610 The MySQL front end no longer outputs a descriptive messages when version buffer is full
|
||||
5748 startsystem failure when user-module is disabled
|
||||
5778 Distributed import error message for auto increment overflow is not friendly
|
||||
5793 Remove O/S version checking in glusterconf
|
||||
5801 Queries with string comparison in where clause occasionally causes a PM to hang
|
||||
5805 Query with avg windowing function returning the average at the wrong decimal scale
|
||||
5806 cpimport loads data incorrectly on a multi-server stack when the table has a mix of compressed and non-compressed columns
|
||||
5807 concat producing an incorrect count when using a view
|
||||
5808 colxml error reported on Windows system.
|
||||
5810 update doesn't flush string file with table oid 3000
|
||||
5811 selecting from a view which has a cross engine join produces an ERROR 122 (HY000): fatal error executing query in crossengine client lib(17)(17)
|
||||
5817 addModule / altersystem-enablemodule fails on amazon 4.x
|
||||
5820 Inconsistent rounding on percentile_cont windowing function
|
||||
5821 PM join with F & E in-join filter + a UM join will crash ExeMgr
|
||||
5823 System hung when running concurrent queries with autocommit off
|
||||
5838 no prompt postConfigure does not work when mysql password is required.
|
||||
5874 Reset of ProcessMonitor on PM2 on a combo system left mysqld as man_offline
|
||||
5877 After loading 1 extent worth of data into a table, select count(*) failed.
|
||||
5882 cleartablelock fails on a multi server system.
|
||||
5884 query returns incorrect results when using an on clause filter involving a table not directly involved in the outer join
|
||||
5887 " Incorrect results of Is Null "
|
||||
5870 select following delete statement is encountering a rid error.
|
||||
5896 getConfig has no linefeed after returning value
|
||||
5900 PrimProc crashes if NumBlocksPct has '%' in value
|
||||
5904 Changing dbroot-to-pm assignment during postConfigure causes double-mounted storage devices
|
||||
5915 On hadoop system, SYSTABLE's update was not flushed to disk when implementing split dbroots for systables
|
||||
5916 query using a view on a view causes ERROR 2013 (HY000): Lost connection to MySQL server during query
|
||||
5917 non-root gluster / hadoop installs fail - storage types not being offered in postConfigure
|
||||
5932 Queries with limits sometimes set the extent map min / max incorrectly
|
||||
|
||||
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Copyright (C) 2013 Calpont Corp
|
||||
* All Rights Reserved
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
February 10, 2014
|
||||
Version 4.0.2
|
||||
|
||||
|
||||
ENHANCEMENTS INCLUDED IN THIS RELEASE
|
||||
-------------------------------------
|
||||
Enh # Short Description
|
||||
|
||||
5760 Hadoop with Cloudera parcel-based install
|
||||
5769 Optimization to not preallocate database column files in HDFS
|
||||
5732 Add ability to report compressed bytes used rather than file size on disk
|
||||
|
||||
|
||||
ISSUES RESOLVED IN THIS RELEASE
|
||||
-------------------------------
|
||||
Bug # Short Description
|
||||
|
||||
2437 When expression results in data overflow, no error or warning was returned
|
||||
4930 no prompt install on AWS had an error when it did not use the volume information.
|
||||
5363 HAVING statement regression on 4.0 with COUNT DISTINCT
|
||||
5383 NOT NULL constraint cpimport issues
|
||||
5604 cpimport jobs hanging on HDFS installs
|
||||
5617 Invalid Package error reported during the running of calpontSupport - incorrect error message
|
||||
5636 query gives ERROR 1054 (42S22): Unknown column
|
||||
5678 ERROR 138 (HY000): 'date_last_update_tk' isn't in tuple.
|
||||
5682 HDFS updating a row that was inserted sometimes does not update the row
|
||||
5687 TIMESTAMPADD(SECOND,2147483647, returns incorrect information.
|
||||
5696 insert statement not providing a warning for truncated data
|
||||
5697 IDB produces different results for equivalent calculations
|
||||
5705 hadoop: HdfsFileSystem::listDirectory() not returning all files in directory; bulk rollback not deleting db files
|
||||
5712 left('unsigned int',6) provides incorrect result
|
||||
5715 incorrect calculation provided in result set
|
||||
5716 union sql statement not displaying correct result
|
||||
5717 create table with invalid Infinidb option does not provide an error or warning
|
||||
5718 cross engine join results in ERROR 122 (HY000): InetStreamSocket::readToMagic: Remote is closed
|
||||
5721 amazon upgrade 4.0.0 to 4.0.1 issues
|
||||
5722 cpimport failing on table to PM17; not handling a boundary case where 2 DBRoots have partial HWM extents
|
||||
5726 amazon 3.6.3 to 4.0.1 upgrade issue - the ebs storage data not given in postConfigure
|
||||
5728 update Server cpu-info and disk scheduler in calpontSupport output
|
||||
5733 databaseSizeReport doesn't report the size of dictionary string files in calpontsys tables
|
||||
5735 Launching simultaneous databaseSizeReports at virtually the same time can sometimes yield incorrect results
|
||||
5749 addModule for failed on Amazon system - user_installer password error
|
||||
5750 dbrm halt/resumes need to be put around the load of dbrm files
|
||||
5752 ERROR 138 (HY000) at line 2: Sub-query failed: error code 2003 error for query that exceeded TotalUmMemory
|
||||
5753 When PrimProc restarts, DML statement didn't reset the connections to PrimProc in connector
|
||||
5757 addModule for UM failed on Amazon system - remote_command error
|
||||
5759 Must use -p option for hadoop fs -mkdir when creating /usr/local/mariadb/columnstore
|
||||
5764 select count(*) from a complex view is returning an incorrect answer.
|
||||
5765 truncate statement does not show schema in the debug.log
|
||||
5767 'create table' creates table in front end when spaces are in the table name.
|
||||
5775 Windows does not log when PrimProc goes down or restarts
|
||||
5777 LAG function returns invalid answer on a float column
|
||||
|
||||
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Copyright (C) 2013 Calpont Corp
|
||||
* All Rights Reserved
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
December 2, 2013
|
||||
Version 4.0.1
|
||||
|
||||
|
||||
ENHANCEMENTS INCLUDED IN THIS RELEASE
|
||||
-------------------------------------
|
||||
Enh # Short Description
|
||||
|
||||
5619 Support VPC environment with AMI
|
||||
|
||||
|
||||
ISSUES RESOLVED IN THIS RELEASE
|
||||
-------------------------------
|
||||
Bug # Short Description
|
||||
|
||||
4996 removeDbroot should be disabled when GlusterFS is configured
|
||||
5268 Incorrect date_format answer from infindb table
|
||||
5402 OAM getSystemStatus message in Windows log
|
||||
5429 LDI updated casual partitioning min/max values for an extent when where is no update to the actual column value.
|
||||
5454 assignDbrootPmConfig needs to error out when the system is shutdown
|
||||
5463 calpontSupport is not including the -c option when -a is selected.
|
||||
5499 'Memory leak of ExeMgr'
|
||||
5529 _CpNoTf_ is reported in results set
|
||||
5549 update on two columns with an AND causes mysql reset
|
||||
5555 HDFS tools installed on non-Hadoop system
|
||||
5558 Issuing Ctrl-C on a repetitive OAM command will set terminal session to echo off
|
||||
5566 hdfs error message printed to screen in calpontConsole - run before hdfs is up
|
||||
5573 hadoop: update a string column is very slow.
|
||||
5588 Delete statement left table locked.
|
||||
5596 postConfigure/glusterconf is creating gluster brick directories owned by root user
|
||||
5614 "hdfsCheck failed" message logged in crit.log when the stack came up normal
|
||||
5621 can't create large (20+ pm) amazon systems using 4.0 AMI
|
||||
5626 PrimProc crash running on HDFS
|
||||
5628 Bug joining against unsigned tinyint data type
|
||||
5631 After applying the row_number() function the table content is going to be lost.
|
||||
5638 issue with using a constant in group by column
|
||||
5642 system hung during distributed import
|
||||
5646 Left outer join on varchar column and date datetime column to date column not returning all matching rows
|
||||
5651 Query wrapped in a select * () returns invalid results.
|
||||
5652 alter table add dictionary column doesn’t set Number of allocated blocks correctly
|
||||
5667 Gluster Install with debian - 'glusterctl status' returns with NOTINSTALLED
|
||||
5669 gluster install - dbroot setup in gluster was mismatched to OAM setup per pm
|
||||
5670 DecomSrv is restarting after upgrade to 4.0
|
||||
5672 dbroot gets unmounted during upgrade when a softlink is used and disk type is internal
|
||||
5681 cpimport sometimes fails during concurrent query / import test on HDFS
|
||||
5683 HdfsRdwrMemBuffer: unable to write all bytes error in cpimport
|
||||
5689 rename table leaves table inaccessible in HDFS
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Copyright (C) 2013 Calpont Corp
|
||||
* All Rights Reserved
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
October 15, 2013
|
||||
Version 4.0
|
||||
|
||||
|
||||
ENHANCEMENTS INCLUDED IN THIS RELEASE
|
||||
-------------------------------------
|
||||
Enh # Short Description
|
||||
|
||||
3581 Optimize Memory Utilization for wide string columns
|
||||
4531 Add support for Windowing Functions
|
||||
4568 Add ability to report database, schema, and table sizes
|
||||
4901 Improve performance of concat function
|
||||
4902 Improve performance of insert() and replace() string functions
|
||||
4919 Improve performance of makedate() and maketime() functions
|
||||
4920 Improve performance of adddate(), date_add(), subdate(), date_sub() functions.
|
||||
5087 Enhance InfiniDB to support over 32 PMs.
|
||||
5208 Change the Status Updates messages to have state show an ASCII value
|
||||
5237 Remove restriction preventing user from dropping a logical partition (segment file) in the last physical partition for a DBRoot
|
||||
5243 Add setting in Columnstore.xml for enable/disable corefiles
|
||||
5300 calpontSupport script performance improvement and additional features
|
||||
5316 Include schema name in SQL statement debug log entries
|
||||
5410 Add support for InfiniDB on Apache Hadoop
|
||||
5414 Add Infinidb support for Apache Sqoop
|
||||
5421 Add support for running InfiniDB under a Linux Control Group
|
||||
|
||||
|
||||
|
||||
ISSUES RESOLVED IN THIS RELEASE
|
||||
-------------------------------
|
||||
Bug # Launchpad Short Description
|
||||
|
||||
2871 Exceeding aggregation limits can block session
|
||||
4208 'drop table' cannot delete files on NFS
|
||||
4345 Specific SQL statements exhausts memory in seconds
|
||||
4552 1025340 Load data infile and cpimport produce different results
|
||||
1025247
|
||||
4757 Incorrect results with correlated subquery
|
||||
4774 Port Data Duplication to debian & Ubuntu
|
||||
5160 Incorrect result on query with "DATE(IF(t1.`end_date` - INTERVAL 30 DAY < t1.`start_date`, t1.`start_date`, t1.`end_date` - INTERVAL 30 DAY))" expression
|
||||
5222 Update errors out when dealing with out-of-range date and datetime values
|
||||
5256 OAM ops returning without DDLProc fully up
|
||||
5269 swap limit exceeded and not cleared by OAM restart of the system
|
||||
5272 cast function returns incorrect result
|
||||
5274 alter table add column returned "Constraints are currently not supported in InfiniDB" error
|
||||
5287 system came up Active while a pm was disabled and dbroot was assigned to it
|
||||
5299 stopsystem with Force Option is incorrectly resetting dbrm and save_brm too early
|
||||
5301 startsystem command system status ended up in MAN_OFFLINE instead of ACTIVE
|
||||
5304 Windows command prompt exit hangs after cpimport on upgraded database from 3.0.x and earlier
|
||||
5321 Delete from table command fails when pm1 is down on a combo 2pm system
|
||||
5322 query failed after disabling and enabling partitions
|
||||
5323 Backup error opening column file for OID-3132 on a multi node cpimport
|
||||
5331 select calshowpartitions not showing limits incorrectly for char fields in empty table
|
||||
5332 shutdownSystem command incorrectly reported 'success'
|
||||
5349 ERR : Backup error for column file error message occurred running cpimport
|
||||
5356 Default syslog.conf to the asynchronous option
|
||||
5374 Data mismatch occurred running query via view
|
||||
5379 LPAD is not functioning correctly when using a Japanese character
|
||||
5391 ERROR 138 (HY000): IDB-1000: 'c1, c2' and 'c3' are not joined error message on a query
|
||||
5392 Reset invalid locale alarm when locale has been corrected
|
||||
5426 calshowprocesslist issue hard-coded to look for host in first 13 bytes
|
||||
5427 Distributed cpimport not handling connection failure with WriteEngineServer
|
||||
5429 Load data infile cleared the min/max values for an extent that was not updated
|
||||
5436 ERROR 122 (HY000): CAL0001: Alter table Failed: AlterTableProcessor::addColumn Failed to set offset in a compressed data file.
|
||||
5438 query filters issue
|
||||
5447 cpimport is reporting that -i is an invalid option
|
||||
5448 Bug in date_add() with InfiniDB table
|
||||
5455 PrimProc resets during a particular sql statement
|
||||
5463 calpontSupport is not including the -c option when -a is selected.
|
||||
5481 Maintain DBBC/NumThreads setting through upgrade
|
||||
5488 PrimProc hangs when DecomSvr dies
|
||||
5494 calpontSupport -a option is not capturing the logs from PM1
|
||||
5495 DB occasionally hangs querying old data loaded in 3.5.0 or prior release
|
||||
|
1199
build/InfiniDB.sln
1199
build/InfiniDB.sln
File diff suppressed because it is too large
Load Diff
@ -4,25 +4,10 @@
|
||||
#
|
||||
# columnstore_startup.sh steps for columnstore single server startup after install
|
||||
|
||||
prefix=/usr/local
|
||||
installdir=$prefix/mariadb/columnstore
|
||||
|
||||
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" : '--installdir='` -eq 13 ]; then
|
||||
installdir="`echo $arg | awk -F= '{print $2}'`"
|
||||
prefix=`dirname $installdir`
|
||||
else
|
||||
echo "columnstore_startup.sh: ignoring unknown argument: $arg" 1>&2
|
||||
fi
|
||||
done
|
||||
|
||||
$installdir/bin/post-install --installdir=/usr/local/mariadb/columnstore
|
||||
echo -e "1\n1\n1\n1\n1\n1\n" | $installdir/bin/postConfigure -i $installdir
|
||||
columnstore-post-install
|
||||
echo -e "1\n1\n1\n1\n1\n1\n" | postConfigure
|
||||
if [ $? -eq 0 ]; then
|
||||
exit 0
|
||||
else
|
||||
|
@ -1,8 +1,7 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
rpmmode=install
|
||||
prefix=/usr/local
|
||||
|
||||
echo "MariaDB ColumnStore install completed"
|
||||
|
||||
exit 0
|
||||
exit 0
|
||||
|
@ -1,10 +1,9 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
rpmmode=install
|
||||
prefix=/usr/local
|
||||
|
||||
test -x /usr/local/mariadb/columnstore/bin/post-install && /usr/local/mariadb/columnstore/bin/post-install --prefix=$prefix --rpmmode=$rpmmode
|
||||
columnstore-post-install --rpmmode=$rpmmode
|
||||
|
||||
echo "MariaDB ColumnStore install completed"
|
||||
|
||||
exit 0
|
||||
exit 0
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
test -x /usr/local/mariadb/columnstore/bin/pre-uninstall && /usr/local/mariadb/columnstore/bin/pre-uninstall
|
||||
columnstore-pre-uninstall
|
||||
|
||||
exit 0
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
rpmmode=install
|
||||
prefix=/usr/local
|
||||
|
||||
echo "MariaDB ColumnStore install completed"
|
||||
|
||||
|
@ -5,6 +5,4 @@ if [ "$1" -eq "$1" 2> /dev/null ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
prefix=/usr/local
|
||||
|
||||
|
||||
|
@ -5,7 +5,6 @@ if [ "$1" -eq "$1" 2> /dev/null ]; then
|
||||
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
|
||||
mkdir -p /var/lib/columnstore/local
|
||||
columnstore-post-install --rpmmode=$rpmmode
|
||||
|
||||
|
@ -4,8 +4,3 @@ if [ "$1" -eq "$1" 2> /dev/null ]; then
|
||||
rpmmode=upgrade
|
||||
fi
|
||||
fi
|
||||
|
||||
prefix=/usr/local
|
||||
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@ else
|
||||
fi
|
||||
|
||||
if [ $rpmmode = erase ]; then
|
||||
test -x /usr/local/mariadb/columnstore/bin/pre-uninstall && /usr/local/mariadb/columnstore/bin/pre-uninstall
|
||||
columnstore-pre-uninstall
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
@ -113,6 +113,12 @@ SET(CPACK_RPM_SPEC_MORE_DEFINE "${CPACK_RPM_SPEC_MORE_DEFINE}
|
||||
SET(ignored
|
||||
"%ignore /usr"
|
||||
"%ignore /usr/local"
|
||||
"%ignore /bin"
|
||||
"%ignore /lib"
|
||||
"%ignore /usr/sbin"
|
||||
"%ignore /usr/lib64/mysql"
|
||||
"%ignore /usr/lib64/mysql/plugin"
|
||||
"%ignore /etc/my.cnf.d"
|
||||
)
|
||||
|
||||
#SET(CPACK_RPM_SPEC_MORE_DEFINE "
|
||||
|
@ -389,4 +389,10 @@
|
||||
|
||||
#define MCSSYSCONFDIR "${ENGINE_SYSCONFDIR}"
|
||||
|
||||
#define MCSSUPPORTDIR "${ENGINE_SUPPORTDIR}"
|
||||
|
||||
#define MCSSBINDIR "${ENGINE_SBINDIR}"
|
||||
|
||||
#define MCSMYCNFDIR "${MARIADB_MYCNFDIR}"
|
||||
|
||||
#endif
|
||||
|
@ -45,8 +45,6 @@ using namespace messageqcpp;
|
||||
#include "loggingid.h"
|
||||
using namespace logging;
|
||||
|
||||
#include "installdir.h"
|
||||
|
||||
#include "clientrotator.h"
|
||||
|
||||
//#include "idb_mysql.h"
|
||||
@ -68,12 +66,10 @@ const uint64_t LOCAL_EXEMGR_PORT = 8601;
|
||||
|
||||
string ClientRotator::getModule()
|
||||
{
|
||||
string installDir = startup::StartUp::installDir();
|
||||
|
||||
//Log to debug.log
|
||||
LoggingID logid( 24, 0, 0);
|
||||
|
||||
string fileName = installDir + "/local/module";
|
||||
string fileName = "/var/lib/columnstore/local/module";
|
||||
|
||||
string module;
|
||||
ifstream moduleFile (fileName.c_str());
|
||||
|
@ -106,7 +106,7 @@ SessionMonitor::SessionMonitor()
|
||||
fSegmentFilename = strdup(stmp.c_str());
|
||||
else
|
||||
{
|
||||
string tmpdir = startup::StartUp::installDir() + "CalpontSessionMonitorShm";
|
||||
string tmpdir = "/var/lib/columnstore/CalpontSessionMonitorShm";
|
||||
|
||||
fSegmentFilename = strdup(tmpdir);
|
||||
}
|
||||
|
@ -1,3 +1,5 @@
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/install_mcs_mysql.sh.in" "${CMAKE_CURRENT_SOURCE_DIR}/install_mcs_mysql.sh" @ONLY)
|
||||
|
||||
|
||||
include_directories( ${ENGINE_COMMON_INCLUDES}
|
||||
/usr/include/libxml2 )
|
||||
@ -28,7 +30,7 @@ set_source_files_properties(ha_mcs.cpp PROPERTIES COMPILE_FLAGS "-fno-implicit-t
|
||||
|
||||
add_library(calmysql SHARED ${libcalmysql_SRCS})
|
||||
|
||||
target_link_libraries(calmysql ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${NETSNMP_LIBRARIES} ${SERVER_BUILD_INCLUDE_DIR}/../libservices/libmysqlservices.a threadpool)
|
||||
target_link_libraries(calmysql ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${NETSNMP_LIBRARIES} ${SERVER_BUILD_DIR}/libservices/libmysqlservices.a threadpool)
|
||||
|
||||
set_target_properties(calmysql PROPERTIES VERSION 1.0.0 SOVERSION 1)
|
||||
|
||||
@ -38,7 +40,7 @@ SET ( is_columnstore_tables_SRCS
|
||||
)
|
||||
add_library(is_columnstore_tables SHARED ${is_columnstore_tables_SRCS})
|
||||
|
||||
target_link_libraries(is_columnstore_tables ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${SERVER_BUILD_INCLUDE_DIR}/../libservices/libmysqlservices.a threadpool)
|
||||
target_link_libraries(is_columnstore_tables ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${SERVER_BUILD_DIR}/libservices/libmysqlservices.a threadpool)
|
||||
|
||||
# Don't prepend .so file with 'lib'
|
||||
set_target_properties(is_columnstore_tables PROPERTIES PREFIX "")
|
||||
@ -50,7 +52,7 @@ SET ( is_columnstore_columns_SRCS
|
||||
)
|
||||
add_library(is_columnstore_columns SHARED ${is_columnstore_columns_SRCS})
|
||||
|
||||
target_link_libraries(is_columnstore_columns ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${SERVER_BUILD_INCLUDE_DIR}/../libservices/libmysqlservices.a threadpool)
|
||||
target_link_libraries(is_columnstore_columns ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${SERVER_BUILD_DIR}/libservices/libmysqlservices.a threadpool)
|
||||
|
||||
# Don't prepend .so file with 'lib'
|
||||
set_target_properties(is_columnstore_columns PROPERTIES PREFIX "")
|
||||
@ -62,7 +64,7 @@ SET ( is_columnstore_extents_SRCS
|
||||
)
|
||||
add_library(is_columnstore_extents SHARED ${is_columnstore_extents_SRCS})
|
||||
|
||||
target_link_libraries(is_columnstore_extents ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${SERVER_BUILD_INCLUDE_DIR}/../libservices/libmysqlservices.a threadpool)
|
||||
target_link_libraries(is_columnstore_extents ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${SERVER_BUILD_DIR}/libservices/libmysqlservices.a threadpool)
|
||||
|
||||
# Don't prepend .so file with 'lib'
|
||||
set_target_properties(is_columnstore_extents PROPERTIES PREFIX "")
|
||||
@ -74,7 +76,7 @@ SET ( is_columnstore_files_SRCS
|
||||
)
|
||||
add_library(is_columnstore_files SHARED ${is_columnstore_files_SRCS})
|
||||
|
||||
target_link_libraries(is_columnstore_files ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${SERVER_BUILD_INCLUDE_DIR}/../libservices/libmysqlservices.a threadpool)
|
||||
target_link_libraries(is_columnstore_files ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${SERVER_BUILD_DIR}/libservices/libmysqlservices.a threadpool)
|
||||
|
||||
# Don't prepend .so file with 'lib'
|
||||
set_target_properties(is_columnstore_files PROPERTIES PREFIX "")
|
||||
@ -88,12 +90,12 @@ install(FILES syscatalog_mysql.sql
|
||||
calremoveuserpriority.sql
|
||||
calshowprocesslist.sql
|
||||
columnstore_info.sql
|
||||
DESTINATION ${ENGINE_MYSQLDIR} COMPONENT storage-engine)
|
||||
DESTINATION ${ENGINE_SUPPORTDIR} COMPONENT storage-engine)
|
||||
install(PROGRAMS install_mcs_mysql.sh mysql-Columnstore
|
||||
DESTINATION ${ENGINE_MYSQLDIR} COMPONENT storage-engine)
|
||||
DESTINATION ${ENGINE_SBINDIR} COMPONENT storage-engine)
|
||||
|
||||
install(FILES columnstore.cnf
|
||||
DESTINATION /etc/my.cnf.d COMPONENT storage-engine)
|
||||
DESTINATION ${MARIADB_MYCNFDIR} COMPONENT storage-engine)
|
||||
|
||||
|
||||
#AM_CPPFLAGS = $(idb_common_includes) $(idb_cppflags)
|
||||
|
@ -3209,7 +3209,7 @@ void ha_mcs_impl_start_bulk_insert(ha_rows rows, TABLE* table)
|
||||
//cout << "current set up is usecpimport:delimiter = " << (int)ci->useCpimport<<":"<< ci->delimiter <<endl;
|
||||
//set up for cpimport
|
||||
std::vector<char*> Cmds;
|
||||
std::string aCmdLine(startup::StartUp::installDir());
|
||||
std::string aCmdLine;
|
||||
std::string aTmpDir(startup::StartUp::tmpDir());
|
||||
|
||||
//If local module type is not PM and Local PM query is set, error out
|
||||
@ -3234,18 +3234,18 @@ void ha_mcs_impl_start_bulk_insert(ha_rows rows, TABLE* table)
|
||||
else
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
aCmdLine = aCmdLine + "/bin/cpimport.exe -N -P " + to_string(localModuleId) + " -s " + ci->delimiter + " -e 0" + " -E " + escapechar + ci->enclosed_by + " ";
|
||||
aCmdLine = "cpimport.exe -N -P " + to_string(localModuleId) + " -s " + ci->delimiter + " -e 0" + " -E " + escapechar + ci->enclosed_by + " ";
|
||||
#else
|
||||
aCmdLine = aCmdLine + "/bin/cpimport -m 1 -N -P " + boost::to_string(localModuleId) + " -s " + ci->delimiter + " -e 0" + " -T " + thd->variables.time_zone->get_name()->ptr() + " -E " + escapechar + ci->enclosed_by + " ";
|
||||
aCmdLine = "cpimport -m 1 -N -P " + boost::to_string(localModuleId) + " -s " + ci->delimiter + " -e 0" + " -T " + thd->variables.time_zone->get_name()->ptr() + " -E " + escapechar + ci->enclosed_by + " ";
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
aCmdLine = aCmdLine + "/bin/cpimport.exe -N -s " + ci->delimiter + " -e 0" + " -E " + escapechar + ci->enclosed_by + " ";
|
||||
aCmdLine = "cpimport.exe -N -s " + ci->delimiter + " -e 0" + " -E " + escapechar + ci->enclosed_by + " ";
|
||||
#else
|
||||
aCmdLine = aCmdLine + "/bin/cpimport -m 1 -N -s " + ci->delimiter + " -e 0" + " -T " + thd->variables.time_zone->get_name()->ptr() + " -E " + escapechar + ci->enclosed_by + " ";
|
||||
aCmdLine = std::string("cpimport -m 1 -N -s ") + ci->delimiter + " -e 0" + " -T " + thd->variables.time_zone->get_name()->ptr() + " -E " + escapechar + ci->enclosed_by + " ";
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -3,20 +3,12 @@
|
||||
# $Id$
|
||||
#
|
||||
|
||||
prefix=/usr/local
|
||||
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/mariadb/columnstore
|
||||
elif [ `expr -- "$arg" : '--rpmmode='` -eq 10 ]; then
|
||||
if [ `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" : '--tmpdir='` -eq 9 ]; then
|
||||
tmpdir="`echo $arg | awk -F= '{print $2}'`"
|
||||
else
|
||||
@ -116,9 +108,9 @@ CREATE TABLE IF NOT EXISTS infinidb_querystats.priority
|
||||
insert ignore into infinidb_querystats.priority values ('High', 100),('Medium', 66), ('Low', 33);
|
||||
EOD
|
||||
|
||||
mysql --user=root mysql 2>/dev/null <$installdir/mysql/syscatalog_mysql.sql
|
||||
mysql --user=root mysql 2>/dev/null <$installdir/mysql/calsetuserpriority.sql
|
||||
mysql --user=root mysql 2>/dev/null <$installdir/mysql/calremoveuserpriority.sql
|
||||
mysql --user=root mysql 2>/dev/null <$installdir/mysql/calshowprocesslist.sql
|
||||
mysql --user=root mysql 2>/dev/null <$installdir/mysql/columnstore_info.sql
|
||||
mysql --user=root mysql 2>/dev/null <@ENGINE_SUPPORTDIR@/syscatalog_mysql.sql
|
||||
mysql --user=root mysql 2>/dev/null <@ENGINE_SUPPORTDIR@/calsetuserpriority.sql
|
||||
mysql --user=root mysql 2>/dev/null <@ENGINE_SUPPORTDIR@/calremoveuserpriority.sql
|
||||
mysql --user=root mysql 2>/dev/null <@ENGINE_SUPPORTDIR@/calshowprocesslist.sql
|
||||
mysql --user=root mysql 2>/dev/null <@ENGINE_SUPPORTDIR@/columnstore_info.sql
|
||||
|
@ -1,2 +1,4 @@
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/MCSVolumeCmds.sh.in" "${CMAKE_CURRENT_SOURCE_DIR}/MCSVolumeCmds.sh" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/MCSInstanceCmds.sh.in" "${CMAKE_CURRENT_SOURCE_DIR}/MCSInstanceCmds.sh" @ONLY)
|
||||
|
||||
install(PROGRAMS MCSInstanceCmds.sh MCSVolumeCmds.sh MCSgetCredentials.sh DESTINATION ${ENGINE_BINDIR} COMPONENT platform)
|
||||
|
@ -4,14 +4,8 @@
|
||||
#
|
||||
# 1. Amazon EC2
|
||||
|
||||
if [ -z "$COLUMNSTORE_INSTALL_DIR" ]; then
|
||||
COLUMNSTORE_INSTALL_DIR=/usr/local/mariadb/columnstore
|
||||
fi
|
||||
|
||||
export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR
|
||||
|
||||
#get temp directory
|
||||
tmpdir=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig SystemConfig SystemTempFileDir`
|
||||
tmpdir=`mcsGetConfig SystemConfig SystemTempFileDir`
|
||||
|
||||
#check command
|
||||
if [ "$1" = "" ]; then
|
||||
@ -94,9 +88,9 @@ if [ "$1" = "deassignElasticIP" ]; then
|
||||
fi
|
||||
|
||||
|
||||
$COLUMNSTORE_INSTALL_DIR/bin/MCSgetCredentials.sh >/dev/null 2>&1
|
||||
MCSgetCredentials.sh >/dev/null 2>&1
|
||||
|
||||
test -f $COLUMNSTORE_INSTALL_DIR/post/functions && . $COLUMNSTORE_INSTALL_DIR/post/functions
|
||||
. @ENGINE_SUPPORTDIR@/columnstore_functions
|
||||
|
||||
#default instance to null
|
||||
instance=""
|
@ -4,14 +4,8 @@
|
||||
#
|
||||
# 1. Amazon EC2
|
||||
|
||||
if [ -z "$COLUMNSTORE_INSTALL_DIR" ]; then
|
||||
COLUMNSTORE_INSTALL_DIR=/usr/local/mariadb/columnstore
|
||||
fi
|
||||
|
||||
export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR
|
||||
|
||||
#get temp directory
|
||||
tmpdir=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig SystemConfig SystemTempFileDir`
|
||||
tmpdir=`mcsGetConfig SystemConfig SystemTempFileDir`
|
||||
|
||||
#check command
|
||||
if [ "$1" = "" ]; then
|
||||
@ -100,14 +94,14 @@ if [ "$1" = "createTag" ]; then
|
||||
fi
|
||||
|
||||
|
||||
test -f $COLUMNSTORE_INSTALL_DIR/post/functions && . $COLUMNSTORE_INSTALL_DIR/post/functions
|
||||
. @ENGINE_SUPPORTDIR@/columnstore_functions
|
||||
|
||||
AWSCLI="aws ec2 "
|
||||
|
||||
$COLUMNSTORE_INSTALL_DIR/MCSgetCredentials.sh >/dev/null 2>&1
|
||||
MCSgetCredentials.sh >/dev/null 2>&1
|
||||
|
||||
#get Region
|
||||
Region=`$COLUMNSTORE_INSTALL_DIR/bin/MCSInstanceCmds.sh getRegion`
|
||||
Region=`MCSInstanceCmds.sh getRegion`
|
||||
|
||||
checkInfostatus() {
|
||||
#check if attached
|
||||
@ -160,21 +154,21 @@ checkInfostatus() {
|
||||
|
||||
createvolume() {
|
||||
# get zone
|
||||
zone=`$COLUMNSTORE_INSTALL_DIR/bin/MCSInstanceCmds.sh getZone`
|
||||
zone=`MCSInstanceCmds.sh getZone`
|
||||
|
||||
if [ $moduleType == "um" ]; then
|
||||
# get type
|
||||
volumeType=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation UMVolumeType`
|
||||
volumeType=`mcsGetConfig Installation UMVolumeType`
|
||||
if [ $volumeType == "io1" ]; then
|
||||
# get IOPS
|
||||
volumeIOPS=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation UMVolumeIOPS`
|
||||
volumeIOPS=`mcsGetConfig Installation UMVolumeIOPS`
|
||||
fi
|
||||
else # pm
|
||||
# get type
|
||||
volumeType=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation PMVolumeType`
|
||||
volumeType=`mcsGetConfig Installation PMVolumeType`
|
||||
if [ $volumeType == "io1" ]; then
|
||||
# get IOPS
|
||||
volumeIOPS=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation PMVolumeIOPS`
|
||||
volumeIOPS=`mcsGetConfig Installation PMVolumeIOPS`
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -217,8 +211,8 @@ detachvolume() {
|
||||
((retries++))
|
||||
sleep 1
|
||||
done
|
||||
test -f /usr/local/mariadb/columnstore/post/functions && . /usr/local/mariadb/columnstore/post/functions
|
||||
$COLUMNSTORE_INSTALL_DIR/bin/cplogger -w 6 "MCSVolume: detachvolume failed: $STATUS"
|
||||
. @ENGINE_SUPPORTDIR@/columnstore_functions
|
||||
cplogger -w 6 "MCSVolume: detachvolume failed: $STATUS"
|
||||
echo "failed"
|
||||
exit 1
|
||||
fi
|
||||
@ -228,8 +222,8 @@ detachvolume() {
|
||||
exit 0
|
||||
fi
|
||||
|
||||
test -f $COLUMNSTORE_INSTALL_DIR/post/functions && . $COLUMNSTORE_INSTALL_DIR/post/functions
|
||||
$COLUMNSTORE_INSTALL_DIR/bin/cplogger -w 6 "MCSVolume: detachvolume failed status: $STATUS"
|
||||
. @ENGINE_SUPPORTDIR@/columnstore_functions
|
||||
cplogger -w 6 "MCSVolume: detachvolume failed status: $STATUS"
|
||||
echo $STATUS
|
||||
exit 1
|
||||
}
|
||||
@ -252,8 +246,8 @@ attachvolume() {
|
||||
((retries++))
|
||||
sleep 1
|
||||
done
|
||||
test -f $COLUMNSTORE_INSTALL_DIR/post/functions && . $COLUMNSTORE_INSTALL_DIR/post/functions
|
||||
$COLUMNSTORE_INSTALL_DIR/bin/cplogger -w 6 "MCSVolume: attachvolume failed: $STATUS"
|
||||
. @ENGINE_SUPPORTDIR@/columnstore_functions
|
||||
cplogger -w 6 "MCSVolume: attachvolume failed: $STATUS"
|
||||
echo "failed"
|
||||
exit 1
|
||||
fi
|
||||
@ -263,8 +257,8 @@ attachvolume() {
|
||||
exit 0
|
||||
fi
|
||||
|
||||
test -f $COLUMNSTORE_INSTALL_DIR/post/functions && . $COLUMNSTORE_INSTALL_DIR/post/functions
|
||||
$COLUMNSTORE_INSTALL_DIR/bin/cplogger -w 6 "MCSVolume: attachvolume failed: $STATUS"
|
||||
. @ENGINE_SUPPORTDIR@/columnstore_functions
|
||||
cplogger -w 6 "MCSVolume: attachvolume failed: $STATUS"
|
||||
echo $STATUS
|
||||
exit 1
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ProcessConfig.xml.in" "${CMAKE_CURRENT_SOURCE_DIR}/ProcessConfig.xml" @ONLY)
|
||||
|
||||
install(FILES AlarmConfig.xml
|
||||
Columnstore.xml
|
||||
|
@ -241,9 +241,9 @@
|
||||
-->
|
||||
<!-- Warning: Do not change this value once database is built -->
|
||||
<DBRootCount>1</DBRootCount>
|
||||
<DBRoot1>$INSTALLDIR/data1</DBRoot1>
|
||||
<DBRMRoot>$INSTALLDIR/data1/systemFiles/dbrm/BRM_saves</DBRMRoot>
|
||||
<TableLockSaveFile>$INSTALLDIR/data1/systemFiles/dbrm/tablelocks</TableLockSaveFile>
|
||||
<DBRoot1>/var/lib/columnstore/data1</DBRoot1>
|
||||
<DBRMRoot>/var/lib/columnstore/data1/systemFiles/dbrm/BRM_saves</DBRMRoot>
|
||||
<TableLockSaveFile>/var/lib/columnstore/data1/systemFiles/dbrm/tablelocks</TableLockSaveFile>
|
||||
<DBRMTimeOut>20</DBRMTimeOut> <!-- in seconds -->
|
||||
<DBRMSnapshotInterval>100000</DBRMSnapshotInterval>
|
||||
<ExternalCriticalThreshold>90</ExternalCriticalThreshold>
|
||||
@ -257,7 +257,6 @@
|
||||
<NMSIPAddress>0.0.0.0</NMSIPAddress>
|
||||
<TempSaveSize>128M</TempSaveSize> <!-- default SWSDL max element save size -->
|
||||
<WaitPeriod>10</WaitPeriod> <!-- in seconds -->
|
||||
<CalpontHome>$INSTALLDIR</CalpontHome>
|
||||
<ProcessRestartCount>10</ProcessRestartCount>
|
||||
<ProcessRestartPeriod>120</ProcessRestartPeriod>
|
||||
<SwapAction>restartSystem</SwapAction> <!-- OAM command (or 'none') to run when swap space exceeds Major Threshold -->
|
||||
@ -350,7 +349,7 @@
|
||||
</SystemExtDeviceConfig>
|
||||
<SessionManager>
|
||||
<MaxConcurrentTransactions>1000</MaxConcurrentTransactions>
|
||||
<TxnIDFile>$INSTALLDIR/data1/systemFiles/dbrm/SMTxnID</TxnIDFile>
|
||||
<TxnIDFile>/var/lib/columnstore/data1/systemFiles/dbrm/SMTxnID</TxnIDFile>
|
||||
</SessionManager>
|
||||
<VersionBuffer>
|
||||
<!-- VersionBufferFileSize must be a multiple of 8192.
|
||||
@ -359,13 +358,13 @@
|
||||
</VersionBuffer>
|
||||
<OIDManager>
|
||||
<!-- Do not change this file after database built -->
|
||||
<OIDBitmapFile>$INSTALLDIR/data1/systemFiles/dbrm/oidbitmap</OIDBitmapFile>
|
||||
<OIDBitmapFile>/var/lib/columnstore/data1/systemFiles/dbrm/oidbitmap</OIDBitmapFile>
|
||||
<!-- Do not change this value after database built -->
|
||||
<FirstOID>3000</FirstOID>
|
||||
</OIDManager>
|
||||
<WriteEngine>
|
||||
<BulkRoot>$INSTALLDIR/data/bulk</BulkRoot>
|
||||
<BulkRollbackDir>$INSTALLDIR/data1/systemFiles/bulkRollback</BulkRollbackDir>
|
||||
<BulkRoot>/var/lib/columnstore/data/bulk</BulkRoot>
|
||||
<BulkRollbackDir>/var/lib/columnstore/data1/systemFiles/bulkRollback</BulkRollbackDir>
|
||||
<MaxFileSystemDiskUsagePct>98</MaxFileSystemDiskUsagePct>
|
||||
<CompressedPaddingBlocks>1</CompressedPaddingBlocks> <!-- Number of blocks used to pad compressed chunks -->
|
||||
</WriteEngine>
|
||||
|
@ -226,9 +226,9 @@
|
||||
-->
|
||||
<!-- Warning: Do not change this value once database is built -->
|
||||
<DBRootCount>1</DBRootCount>
|
||||
<DBRoot1>$INSTALLDIR/data1</DBRoot1>
|
||||
<DBRMRoot>$INSTALLDIR/data1/systemFiles/dbrm/BRM_saves</DBRMRoot>
|
||||
<TableLockSaveFile>$INSTALLDIR/data1/systemFiles/dbrm/tablelocks</TableLockSaveFile>
|
||||
<DBRoot1>/var/lib/columnstore/data1</DBRoot1>
|
||||
<DBRMRoot>/var/lib/columnstore/data1/systemFiles/dbrm/BRM_saves</DBRMRoot>
|
||||
<TableLockSaveFile>/var/lib/columnstore/data1/systemFiles/dbrm/tablelocks</TableLockSaveFile>
|
||||
<DBRMTimeOut>20</DBRMTimeOut> <!-- in seconds -->
|
||||
<DBRMSnapshotInterval>100000</DBRMSnapshotInterval>
|
||||
<ExternalCriticalThreshold>90</ExternalCriticalThreshold>
|
||||
@ -241,7 +241,6 @@
|
||||
<TempSaveSize>128M</TempSaveSize> <!-- default SWSDL max element save size -->
|
||||
<WaitPeriod>10</WaitPeriod> <!-- in seconds -->
|
||||
<TempFileDir>/tmp/columnstore_tmp_files</TempFileDir>
|
||||
<CalpontHome>$INSTALLDIR</CalpontHome>
|
||||
<ModuleHeartbeatPeriod>10</ModuleHeartbeatPeriod>
|
||||
<ModuleHeartbeatCount>3</ModuleHeartbeatCount>
|
||||
<ProcessRestartCount>10</ProcessRestartCount>
|
||||
@ -334,11 +333,11 @@
|
||||
</SystemExtDeviceConfig>
|
||||
<SessionManager>
|
||||
<MaxConcurrentTransactions>1000</MaxConcurrentTransactions>
|
||||
<SharedMemoryTmpFile>$INSTALLDIR/data1/systemFiles/dbrm/CalpontShm</SharedMemoryTmpFile>
|
||||
<TxnIDFile>$INSTALLDIR/data1/systemFiles/dbrm/SMTxnID</TxnIDFile>
|
||||
<SharedMemoryTmpFile>/var/lib/columnstore/data1/systemFiles/dbrm/CalpontShm</SharedMemoryTmpFile>
|
||||
<TxnIDFile>/var/lib/columnstore/data1/systemFiles/dbrm/SMTxnID</TxnIDFile>
|
||||
</SessionManager>
|
||||
<SessionMonitor>
|
||||
<SharedMemoryTmpFile>$INSTALLDIR/data1/systemFiles/dbrm/CalpontSessionMonitorShm</SharedMemoryTmpFile>
|
||||
<SharedMemoryTmpFile>/var/lib/columnstore/data1/systemFiles/dbrm/CalpontSessionMonitorShm</SharedMemoryTmpFile>
|
||||
<TransactionAgeLimit>10</TransactionAgeLimit>
|
||||
</SessionMonitor>
|
||||
<VersionBuffer>
|
||||
@ -351,13 +350,13 @@
|
||||
It should be relocated to $INSTALLDIR/share/oidbitmap
|
||||
on the production machine-->
|
||||
<!-- Do not change this file after database built -->
|
||||
<OIDBitmapFile>$INSTALLDIR/data1/systemFiles/dbrm/oidbitmap</OIDBitmapFile>
|
||||
<OIDBitmapFile>/var/lib/columnstore/data1/systemFiles/dbrm/oidbitmap</OIDBitmapFile>
|
||||
<!-- Do not change this value after database built -->
|
||||
<FirstOID>3000</FirstOID>
|
||||
</OIDManager>
|
||||
<WriteEngine>
|
||||
<BulkRoot>$INSTALLDIR/data/bulk</BulkRoot>
|
||||
<BulkRollbackDir>$INSTALLDIR/data/bulk/rollback</BulkRollbackDir>
|
||||
<BulkRoot>/var/lib/columnstore/data/bulk</BulkRoot>
|
||||
<BulkRollbackDir>/var/lib/columnstore/data/bulk/rollback</BulkRollbackDir>
|
||||
<MaxFileSystemDiskUsagePct>98</MaxFileSystemDiskUsagePct>
|
||||
<CompressedPaddingBlocks>1</CompressedPaddingBlocks> <!-- Number of blocks used to pad compressed chunks -->
|
||||
</WriteEngine>
|
||||
@ -487,7 +486,7 @@
|
||||
<!-- Be careful modifying TempFilePath! On start, ExeMgr deletes
|
||||
the entire directory and recreates it to make sure no
|
||||
files are left behind. -->
|
||||
<TempFilePath>$INSTALLDIR/tmp</TempFilePath>
|
||||
<TempFilePath>/var/lib/columnstore/tmp</TempFilePath>
|
||||
<TempFileCompression>Y</TempFileCompression>
|
||||
</HashJoin>
|
||||
<JobList>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<PROCESSCONFIG1>
|
||||
<ProcessName>ProcessMonitor</ProcessName>
|
||||
<ModuleType>ChildExtOAMModule</ModuleType>
|
||||
<ProcessLocation>$INSTALLDIR/bin/ProcMon</ProcessLocation>
|
||||
<ProcessLocation>@ENGINE_BINDIR@/ProcMon</ProcessLocation>
|
||||
<BootLaunch>0</BootLaunch>
|
||||
<LaunchID>1</LaunchID>
|
||||
<DepProcessName/>
|
||||
@ -14,7 +14,7 @@
|
||||
<PROCESSCONFIG2>
|
||||
<ProcessName>ProcessManager</ProcessName>
|
||||
<ModuleType>ParentOAMModule</ModuleType>
|
||||
<ProcessLocation>$INSTALLDIR/bin/ProcMgr</ProcessLocation>
|
||||
<ProcessLocation>@ENGINE_BINDIR@/ProcMgr</ProcessLocation>
|
||||
<BootLaunch>1</BootLaunch>
|
||||
<LaunchID>2</LaunchID>
|
||||
<DepProcessName/>
|
||||
@ -24,7 +24,7 @@
|
||||
<PROCESSCONFIG3>
|
||||
<ProcessName>StorageManager</ProcessName>
|
||||
<ModuleType>ChildExtOAMModule</ModuleType>
|
||||
<ProcessLocation>$INSTALLDIR/bin/StorageManager</ProcessLocation>
|
||||
<ProcessLocation>@ENGINE_BINDIR@/StorageManager</ProcessLocation>
|
||||
<BootLaunch>2</BootLaunch>
|
||||
<LaunchID>3</LaunchID>
|
||||
<DepProcessName/>
|
||||
@ -35,8 +35,8 @@
|
||||
<PROCESSCONFIG4>
|
||||
<ProcessName>DBRMControllerNode</ProcessName>
|
||||
<ModuleType>ParentOAMModule</ModuleType>
|
||||
<ProcessLocation>$INSTALLDIR/bin/controllernode</ProcessLocation>
|
||||
<ProcessArg1>$INSTALLDIR/bin/controllernode</ProcessArg1>
|
||||
<ProcessLocation>@ENGINE_BINDIR@/controllernode</ProcessLocation>
|
||||
<ProcessArg1>@ENGINE_BINDIR@/controllernode</ProcessArg1>
|
||||
<ProcessArg2>fg</ProcessArg2>
|
||||
<BootLaunch>2</BootLaunch>
|
||||
<LaunchID>4</LaunchID>
|
||||
@ -48,8 +48,8 @@
|
||||
<PROCESSCONFIG5>
|
||||
<ProcessName>ServerMonitor</ProcessName>
|
||||
<ModuleType>ChildOAMModule</ModuleType>
|
||||
<ProcessLocation>$INSTALLDIR/bin/ServerMonitor</ProcessLocation>
|
||||
<ProcessArg1>$INSTALLDIR/bin/ServerMonitor</ProcessArg1>
|
||||
<ProcessLocation>@ENGINE_BINDIR@/ServerMonitor</ProcessLocation>
|
||||
<ProcessArg1>@ENGINE_BINDIR@/ServerMonitor</ProcessArg1>
|
||||
<BootLaunch>2</BootLaunch>
|
||||
<LaunchID>6</LaunchID>
|
||||
<DepProcessName/>
|
||||
@ -59,8 +59,8 @@
|
||||
<PROCESSCONFIG6>
|
||||
<ProcessName>DBRMWorkerNode</ProcessName>
|
||||
<ModuleType>ChildExtOAMModule</ModuleType>
|
||||
<ProcessLocation>$INSTALLDIR/bin/workernode</ProcessLocation>
|
||||
<ProcessArg1>$INSTALLDIR/bin/workernode</ProcessArg1>
|
||||
<ProcessLocation>@ENGINE_BINDIR@/workernode</ProcessLocation>
|
||||
<ProcessArg1>@ENGINE_BINDIR@/workernode</ProcessArg1>
|
||||
<ProcessArg2>DBRM_Worker</ProcessArg2>
|
||||
<ProcessArg3>fg</ProcessArg3>
|
||||
<BootLaunch>2</BootLaunch>
|
||||
@ -72,7 +72,7 @@
|
||||
<PROCESSCONFIG7>
|
||||
<ProcessName>PrimProc</ProcessName>
|
||||
<ModuleType>pm</ModuleType>
|
||||
<ProcessLocation>$INSTALLDIR/bin/PrimProc</ProcessLocation>
|
||||
<ProcessLocation>@ENGINE_BINDIR@/PrimProc</ProcessLocation>
|
||||
<BootLaunch>2</BootLaunch>
|
||||
<LaunchID>20</LaunchID>
|
||||
<DepProcessName/>
|
||||
@ -82,7 +82,7 @@
|
||||
<PROCESSCONFIG8>
|
||||
<ProcessName>ExeMgr</ProcessName>
|
||||
<ModuleType>um</ModuleType>
|
||||
<ProcessLocation>$INSTALLDIR/bin/ExeMgr</ProcessLocation>
|
||||
<ProcessLocation>@ENGINE_BINDIR@/ExeMgr</ProcessLocation>
|
||||
<BootLaunch>2</BootLaunch>
|
||||
<LaunchID>30</LaunchID>
|
||||
<DepProcessName1>PrimProc</DepProcessName1>
|
||||
@ -93,7 +93,7 @@
|
||||
<PROCESSCONFIG9>
|
||||
<ProcessName>WriteEngineServer</ProcessName>
|
||||
<ModuleType>pm</ModuleType>
|
||||
<ProcessLocation>$INSTALLDIR/bin/WriteEngineServer</ProcessLocation>
|
||||
<ProcessLocation>@ENGINE_BINDIR@/WriteEngineServer</ProcessLocation>
|
||||
<BootLaunch>2</BootLaunch>
|
||||
<LaunchID>40</LaunchID>
|
||||
<RunType>LOADSHARE</RunType>
|
||||
@ -102,7 +102,7 @@
|
||||
<PROCESSCONFIG10>
|
||||
<ProcessName>DDLProc</ProcessName>
|
||||
<ModuleType>um</ModuleType>
|
||||
<ProcessLocation>$INSTALLDIR/bin/DDLProc</ProcessLocation>
|
||||
<ProcessLocation>@ENGINE_BINDIR@/DDLProc</ProcessLocation>
|
||||
<BootLaunch>2</BootLaunch>
|
||||
<LaunchID>50</LaunchID>
|
||||
<DepProcessName1>WriteEngineServer</DepProcessName1>
|
||||
@ -117,7 +117,7 @@
|
||||
<PROCESSCONFIG11>
|
||||
<ProcessName>DMLProc</ProcessName>
|
||||
<ModuleType>um</ModuleType>
|
||||
<ProcessLocation>$INSTALLDIR/bin/DMLProc</ProcessLocation>
|
||||
<ProcessLocation>@ENGINE_BINDIR@/DMLProc</ProcessLocation>
|
||||
<BootLaunch>2</BootLaunch>
|
||||
<LaunchID>51</LaunchID>
|
||||
<DepProcessName1>WriteEngineServer</DepProcessName1>
|
@ -1,131 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- $Id: ProcessConfig.xml 1283 2009-03-30 20:12:43Z dhill $ -->
|
||||
<Columnstore Version="V1.0.0">
|
||||
<PROCESSCONFIG1>
|
||||
<ProcessName>ProcessMonitor</ProcessName>
|
||||
<ModuleType>ChildExtOAMModule</ModuleType>
|
||||
<ProcessLocation>/usr/local/mariadb/columnstore/bin/ProcMon</ProcessLocation>
|
||||
<BootLaunch>0</BootLaunch>
|
||||
<LaunchID>1</LaunchID>
|
||||
<DepProcessName/>
|
||||
<RunType>LOADSHARE</RunType>
|
||||
<LogFile>off</LogFile>
|
||||
</PROCESSCONFIG1>
|
||||
<PROCESSCONFIG2>
|
||||
<ProcessName>ProcessManager</ProcessName>
|
||||
<ModuleType>ParentOAMModule</ModuleType>
|
||||
<ProcessLocation>/usr/local/mariadb/columnstore/bin/ProcMgr</ProcessLocation>
|
||||
<BootLaunch>1</BootLaunch>
|
||||
<LaunchID>2</LaunchID>
|
||||
<DepProcessName/>
|
||||
<RunType>ACTIVE_STANDBY</RunType>
|
||||
<LogFile>off</LogFile>
|
||||
</PROCESSCONFIG2>
|
||||
<PROCESSCONFIG3>
|
||||
<ProcessName>DBRMControllerNode</ProcessName>
|
||||
<ModuleType>ParentOAMModule</ModuleType>
|
||||
<ProcessLocation>/usr/local/mariadb/columnstore/bin/controllernode</ProcessLocation>
|
||||
<ProcessArg1>/usr/local/mariadb/columnstore/bin/controllernode</ProcessArg1>
|
||||
<ProcessArg2>fg</ProcessArg2>
|
||||
<BootLaunch>2</BootLaunch>
|
||||
<LaunchID>4</LaunchID>
|
||||
<DepProcessName1>ProcessManager</DepProcessName1>
|
||||
<DepModuleName1>@</DepModuleName1>
|
||||
<RunType>SIMPLEX</RunType>
|
||||
<LogFile>off</LogFile>
|
||||
</PROCESSCONFIG3>
|
||||
<PROCESSCONFIG4>
|
||||
<ProcessName>ServerMonitor</ProcessName>
|
||||
<ModuleType>ChildOAMModule</ModuleType>
|
||||
<ProcessLocation>/usr/local/mariadb/columnstore/bin/ServerMonitor</ProcessLocation>
|
||||
<ProcessArg1>/usr/local/mariadb/columnstore/bin/ServerMonitor</ProcessArg1>
|
||||
<BootLaunch>2</BootLaunch>
|
||||
<LaunchID>6</LaunchID>
|
||||
<DepProcessName/>
|
||||
<RunType>LOADSHARE</RunType>
|
||||
<LogFile>off</LogFile>
|
||||
</PROCESSCONFIG4>
|
||||
<PROCESSCONFIG5>
|
||||
<ProcessName>DBRMWorkerNode</ProcessName>
|
||||
<ModuleType>ChildExtOAMModule</ModuleType>
|
||||
<ProcessLocation>/usr/local/mariadb/columnstore/bin/workernode</ProcessLocation>
|
||||
<ProcessArg1>/usr/local/mariadb/columnstore/bin/workernode</ProcessArg1>
|
||||
<ProcessArg2>DBRM_Worker</ProcessArg2>
|
||||
<ProcessArg3>fg</ProcessArg3>
|
||||
<BootLaunch>2</BootLaunch>
|
||||
<LaunchID>7</LaunchID>
|
||||
<DepProcessName/>
|
||||
<RunType>LOADSHARE</RunType>
|
||||
<LogFile>off</LogFile>
|
||||
</PROCESSCONFIG5>
|
||||
<PROCESSCONFIG7>
|
||||
<ProcessName>PrimProc</ProcessName>
|
||||
<ModuleType>pm</ModuleType>
|
||||
<ProcessLocation>/usr/local/mariadb/columnstore/bin/PrimProc</ProcessLocation>
|
||||
<BootLaunch>2</BootLaunch>
|
||||
<LaunchID>20</LaunchID>
|
||||
<DepProcessName/>
|
||||
<RunType>LOADSHARE</RunType>
|
||||
<LogFile>off</LogFile>
|
||||
</PROCESSCONFIG7>
|
||||
<PROCESSCONFIG8>
|
||||
<ProcessName>ExeMgr</ProcessName>
|
||||
<ModuleType>pm</ModuleType>
|
||||
<ProcessLocation>/usr/local/mariadb/columnstore/bin/ExeMgr</ProcessLocation>
|
||||
<BootLaunch>2</BootLaunch>
|
||||
<LaunchID>30</LaunchID>
|
||||
<DepProcessName1>PrimProc</DepProcessName1>
|
||||
<DepModuleName1>pm*</DepModuleName1>
|
||||
<RunType>LOADSHARE</RunType>
|
||||
<LogFile>off</LogFile>
|
||||
</PROCESSCONFIG8>
|
||||
<PROCESSCONFIG9>
|
||||
<ProcessName>WriteEngineServer</ProcessName>
|
||||
<ModuleType>pm</ModuleType>
|
||||
<ProcessLocation>/usr/local/mariadb/columnstore/bin/WriteEngineServer</ProcessLocation>
|
||||
<BootLaunch>2</BootLaunch>
|
||||
<LaunchID>40</LaunchID>
|
||||
<RunType>LOADSHARE</RunType>
|
||||
<LogFile>off</LogFile>
|
||||
</PROCESSCONFIG9>
|
||||
<PROCESSCONFIG10>
|
||||
<ProcessName>DDLProc</ProcessName>
|
||||
<ModuleType>um</ModuleType>
|
||||
<ProcessLocation>$INSTALLDIR/bin/DDLProc</ProcessLocation>
|
||||
<BootLaunch>2</BootLaunch>
|
||||
<LaunchID>50</LaunchID>
|
||||
<DepProcessName1>WriteEngineServer</DepProcessName1>
|
||||
<DepModuleName1>pm*</DepModuleName1>
|
||||
<DepProcessName2>DBRMWorkerNode</DepProcessName2>
|
||||
<DepModuleName2>*</DepModuleName2>
|
||||
<DepProcessName3>ExeMgr</DepProcessName3>
|
||||
<DepModuleName3>um*</DepModuleName3>
|
||||
<RunType>SIMPLEX</RunType>
|
||||
<LogFile>off</LogFile>
|
||||
</PROCESSCONFIG10>
|
||||
<PROCESSCONFIG11>
|
||||
<ProcessName>DMLProc</ProcessName>
|
||||
<ModuleType>um</ModuleType>
|
||||
<ProcessLocation>$INSTALLDIR/bin/DMLProc</ProcessLocation>
|
||||
<BootLaunch>2</BootLaunch>
|
||||
<LaunchID>51</LaunchID>
|
||||
<DepProcessName1>WriteEngineServer</DepProcessName1>
|
||||
<DepModuleName1>pm*</DepModuleName1>
|
||||
<DepProcessName2>DBRMWorkerNode</DepProcessName2>
|
||||
<DepModuleName2>*</DepModuleName2>
|
||||
<DepProcessName3>DDLProc</DepProcessName3>
|
||||
<DepModuleName3>@</DepModuleName3>
|
||||
<RunType>SIMPLEX</RunType>
|
||||
<LogFile>off</LogFile>
|
||||
</PROCESSCONFIG11>
|
||||
<PROCESSCONFIG12>
|
||||
<ProcessName>mysqld</ProcessName>
|
||||
<ModuleType>pm</ModuleType>
|
||||
<ProcessLocation>/usr/bin/mysqld</ProcessLocation>
|
||||
<BootLaunch>0</BootLaunch>
|
||||
<LaunchID>100</LaunchID>
|
||||
<DepProcessName/>
|
||||
<RunType>LOADSHARE</RunType>
|
||||
<LogFile>off</LogFile>
|
||||
</PROCESSCONFIG12>
|
||||
</Columnstore>
|
@ -1,45 +1,48 @@
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/syslogSetup.sh.in" "${CMAKE_CURRENT_SOURCE_DIR}/syslogSetup.sh" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/post-install.in" "${CMAKE_CURRENT_SOURCE_DIR}/post-install" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/columnstoreSyslogSetup.sh.in" "${CMAKE_CURRENT_SOURCE_DIR}/columnstoreSyslogSetup.sh" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/columnstore-post-install.in" "${CMAKE_CURRENT_SOURCE_DIR}/columnstore-post-install" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/columnstore.in" "${CMAKE_CURRENT_SOURCE_DIR}/columnstore" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/columnstoreInstall.sh.in" "${CMAKE_CURRENT_SOURCE_DIR}/columnstoreInstall.sh" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/pre-uninstall.in" "${CMAKE_CURRENT_SOURCE_DIR}/pre-uninstall" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/columnstore-pre-uninstall.in" "${CMAKE_CURRENT_SOURCE_DIR}/columnstore-pre-uninstall" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/columnstoreLogRotate.in" "${CMAKE_CURRENT_SOURCE_DIR}/columnstoreLogRotate" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/postInstall.sh.in" "${CMAKE_CURRENT_SOURCE_DIR}/postInstall.sh" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/startupTests.sh.in" "${CMAKE_CURRENT_SOURCE_DIR}/startupTests.sh" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/columnstore.service.in" "${CMAKE_CURRENT_SOURCE_DIR}/columnstore.service" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/columnstore_module_installer.sh.in" "${CMAKE_CURRENT_SOURCE_DIR}/columnstore_module_installer.sh" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/master-rep-columnstore.sh.in" "${CMAKE_CURRENT_SOURCE_DIR}/master-rep-columnstore.sh" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/disable-rep-columnstore.sh.in" "${CMAKE_CURRENT_SOURCE_DIR}/disable-rep-columnstore.sh" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/mariadb-command-line.sh.in" "${CMAKE_CURRENT_SOURCE_DIR}/mariadb-command-line.sh" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/slave-rep-columnstore.sh.in" "${CMAKE_CURRENT_SOURCE_DIR}/slave-rep-columnstore.sh" @ONLY)
|
||||
|
||||
install(PROGRAMS post-install
|
||||
pre-uninstall
|
||||
install(PROGRAMS columnstore-post-install
|
||||
columnstore-pre-uninstall
|
||||
remote_command.sh
|
||||
columnstoreLogRotate
|
||||
transactionLog
|
||||
transactionLogArchiver.sh
|
||||
module_installer.sh
|
||||
columnstore_module_installer.sh
|
||||
startupTests.sh
|
||||
package_installer.sh
|
||||
remote_scp_get.sh
|
||||
columnstoreAlias
|
||||
run.sh
|
||||
columnstore_run.sh
|
||||
post-mysql-install
|
||||
post-mysqld-install
|
||||
binary_installer.sh
|
||||
os_check.sh
|
||||
columnstore_os_check.sh
|
||||
columnstore
|
||||
columnstoreSyslog
|
||||
columnstoreSyslog-ng
|
||||
syslogSetup.sh
|
||||
columnstoreSyslogSetup.sh
|
||||
remote_scp_put.sh
|
||||
remotessh.exp
|
||||
rsync.sh
|
||||
remote_command_verify.sh
|
||||
columnstore.conf
|
||||
columnstoreSyslog7
|
||||
master-rep-columnstore.sh
|
||||
slave-rep-columnstore.sh
|
||||
disable-rep-columnstore.sh
|
||||
myCnf-include-args.text
|
||||
myCnf-exclude-args.text
|
||||
columnstore.service
|
||||
mariadb-command-line.sh
|
||||
DESTINATION ${ENGINE_BINDIR} COMPONENT platform)
|
||||
|
||||
install(FILES module DESTINATION ${ENGINE_LOCALDIR} COMPONENT platform)
|
||||
DESTINATION ${ENGINE_BINDIR} COMPONENT platform)
|
||||
|
||||
install(FILES columnstore.service
|
||||
columnstoreAlias
|
||||
columnstoreSyslog
|
||||
columnstoreSyslog7
|
||||
columnstoreSyslog-ng
|
||||
columnstoreLogRotate
|
||||
myCnf-include-args.text
|
||||
myCnf-exclude-args.text
|
||||
DESTINATION ${ENGINE_SUPPORTDIR} COMPONENT platform)
|
||||
|
||||
install(FILES module DESTINATION ${ENGINE_SYSCONFDIR}/columnstore COMPONENT platform)
|
||||
|
||||
|
@ -1,235 +0,0 @@
|
||||
#!/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 6 - Install Type, "initial", "upgrade", "uninstall"
|
||||
# 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 INSTALLTYPE [lindex $argv 4]
|
||||
set AMAZONINSTALL [lindex $argv 5]
|
||||
set PKGTYPE "binary"
|
||||
set DEBUG [lindex $argv 6]
|
||||
set INSTALLDIR "/usr/local/mariadb/columnstore"
|
||||
set IDIR [lindex $argv 7]
|
||||
if { $IDIR != "" } {
|
||||
set INSTALLDIR $IDIR
|
||||
}
|
||||
set env(COLUMNSTORE_INSTALL_DIR) $INSTALLDIR
|
||||
set PREFIX [file dirname $INSTALLDIR]
|
||||
set PREFIX [file dirname $PREFIX]
|
||||
set USERNAME $env(USER)
|
||||
set UNM [lindex $argv 8]
|
||||
if { $UNM != "" } {
|
||||
set USERNAME $UNM
|
||||
}
|
||||
|
||||
log_user $DEBUG
|
||||
spawn -noecho /bin/bash
|
||||
#
|
||||
|
||||
#check and see if remote server has ssh keys setup, set PASSWORD if so
|
||||
send_user " "
|
||||
send "ssh -v $USERNAME@$SERVER 'time'\n"
|
||||
set timeout 60
|
||||
expect {
|
||||
"authenticity" { send "yes\n"
|
||||
exp_continue
|
||||
}
|
||||
"word: " { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"passphrase" { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"Exit status 0" { send_user "DONE"}
|
||||
"Exit status 1" { send_user "FAILED: Login Failure\n" ; exit 1 }
|
||||
"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 }
|
||||
"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 2 }
|
||||
}
|
||||
send_user "\n"
|
||||
|
||||
|
||||
send_user "Stop ColumnStore service "
|
||||
send "ssh -v $USERNAME@$SERVER 'export COLUMNSTORE_INSTALL_DIR=$INSTALLDIR; $INSTALLDIR/bin/columnstore stop'\n"
|
||||
set timeout 60
|
||||
# check return
|
||||
expect {
|
||||
"word: " { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"passphrase" { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
"Exit status 127" { send_user "DONE" }
|
||||
"Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1}
|
||||
timeout { send_user "DONE" }
|
||||
}
|
||||
send_user "\n"
|
||||
|
||||
#
|
||||
# remove MariaDB Columnstore files
|
||||
#
|
||||
send_user "Uninstall MariaDB Columnstore Package "
|
||||
send_user " \n"
|
||||
send "ssh -v $USERNAME@$SERVER '$INSTALLDIR/bin/pre-uninstall --installdir=$INSTALLDIR >/dev/null 2>&1'\n"
|
||||
set timeout 60
|
||||
expect {
|
||||
"word: " { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"passphrase" { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
"Exit status 127" { send_user "DONE" }
|
||||
timeout { send_user "DONE" }
|
||||
}
|
||||
send_user "\n"
|
||||
|
||||
if { $INSTALLTYPE == "uninstall" } { exit 0 }
|
||||
|
||||
#
|
||||
# send the MariaDB Columnstore package
|
||||
#
|
||||
send_user "Copy New MariaDB Columnstore Package to Module "
|
||||
send_user " \n"
|
||||
send "scp -v $CALPONTPKG $USERNAME@$SERVER:$CALPONTPKG\n"
|
||||
set timeout 360
|
||||
expect {
|
||||
"word: " { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"passphrase" { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
"scp :" { send_user "ERROR\n" ;
|
||||
send_user "\n*** Installation ERROR\n" ;
|
||||
exit 1 }
|
||||
"Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1}
|
||||
timeout { send_user "ERROR: Timeout\n" ; exit 2 }
|
||||
}
|
||||
send_user "\n"
|
||||
#
|
||||
# install package
|
||||
#
|
||||
send_user "Install MariaDB Columnstore Package on Module "
|
||||
send_user " \n"
|
||||
send "ssh -v $USERNAME@$SERVER 'tar -C $PREFIX --exclude db -zxf $CALPONTPKG'\n"
|
||||
set timeout 360
|
||||
expect {
|
||||
"word: " { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"passphrase" { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
"Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1}
|
||||
timeout { send_user "ERROR: Timeout\n" ; exit 2 }
|
||||
}
|
||||
send_user "\n"
|
||||
|
||||
#
|
||||
# copy over custom OS tmp files
|
||||
#
|
||||
send_user "Copy Custom OS files to Module "
|
||||
send_user " \n"
|
||||
send "scp -rv $INSTALLDIR/local/etc $USERNAME@$SERVER:$INSTALLDIR/local\n"
|
||||
set timeout 120
|
||||
expect {
|
||||
"word: " { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"passphrase" { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
"scp :" { send_user "ERROR\n" ;
|
||||
send_user "\n*** Installation ERROR\n" ;
|
||||
exit 1 }
|
||||
"Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1}
|
||||
timeout { send_user "ERROR: Timeout\n" ; exit 2 }
|
||||
}
|
||||
send_user "\n"
|
||||
|
||||
#
|
||||
# copy over MariaDB Columnstore Module file
|
||||
#
|
||||
send_user "Copy MariaDB Columnstore Module file to Module "
|
||||
send "scp -v $INSTALLDIR/local/etc/$MODULE/* $USERNAME@$SERVER:$INSTALLDIR/local/.\n"
|
||||
set timeout 120
|
||||
expect {
|
||||
"word: " { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"passphrase" { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
"scp :" { send_user "ERROR\n" ;
|
||||
send_user "\n*** Installation ERROR\n" ;
|
||||
exit 1 } "Exit status 0" { send_user "DONE" }
|
||||
"Exit status 1" { send_user "ERROR: scp failed" ; exit 1 }
|
||||
timeout { send_user "ERROR: Timeout to host\n" ; exit 2 }
|
||||
}
|
||||
send_user "\n"
|
||||
|
||||
send_user "Run post-install script "
|
||||
send_user " \n"
|
||||
send "ssh -v $USERNAME@$SERVER '$INSTALLDIR/bin/post-install --installdir=$INSTALLDIR'\n"
|
||||
set timeout 90
|
||||
# check return
|
||||
expect {
|
||||
"word: " { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"passphrase" { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"Exit status 127" { send_user "ERROR: $INSTALLDIR/bin/post-install Not Found\n" ; exit 1 }
|
||||
"MariaDB Columnstore syslog logging not working" { send_user "WARNING: MariaDB Columnstore System logging not setup\n"; exp_continue }
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
timeout { send_user "ERROR: Timeout to host\n" ; exit 2 }
|
||||
}
|
||||
send_user "\n"
|
||||
|
||||
send_user "Start ColumnStore service "
|
||||
send_user " \n"
|
||||
send "ssh -v $USERNAME@$SERVER 'export COLUMNSTORE_INSTALL_DIR=$INSTALLDIR; $INSTALLDIR/bin/columnstore restart'\n"
|
||||
set timeout 120
|
||||
# check return
|
||||
expect {
|
||||
"word: " { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"passphrase" { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"Exit status 127" { send_user "ERROR: $INSTALLDIR/bin/post-install Not Found\n" ; exit 1 }
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
timeout { send_user "ERROR: Timeout to host\n" ; exit 2 }
|
||||
}
|
||||
send_user "\n"
|
||||
|
||||
send_user "\nInstallation Successfully Completed on '$MODULE'\n"
|
||||
exit 0
|
||||
|
199
oam/install_scripts/columnstore-post-install.in
Executable file
199
oam/install_scripts/columnstore-post-install.in
Executable file
@ -0,0 +1,199 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# $Id: post-install 3705 2013-08-07 19:47:20Z dhill $
|
||||
#
|
||||
# Post-install steps for columnstore install
|
||||
|
||||
rpmmode=install
|
||||
user=`whoami 2>/dev/null`
|
||||
|
||||
quiet=0
|
||||
|
||||
for arg in "$@"; do
|
||||
if [ `expr -- "$arg" : '--rpmmode='` -eq 10 ]; then
|
||||
rpmmode="`echo $arg | awk -F= '{print $2}'`"
|
||||
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: invalid unknown argument: $arg" 1>&2
|
||||
echo "exiting..."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
if [ ! -f @ENGINE_SYSCONFDIR@/columnstore/Columnstore.xml ]; then
|
||||
echo "@ENGINE_SYSCONFDIR@/columnstore/Columnstore.xml not found, exiting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
touch /dev/shm/columnstore-test && rm /dev/shm/columnstore-test
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "User $user will need R/W access to /dev/shm."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
profileFile="/etc/profile.d/columnstoreAlias.sh"
|
||||
/bin/cp -f @ENGINE_SUPPORTDIR@/columnstoreAlias /etc/profile.d/columnstoreAlias.sh
|
||||
chmod 644 /etc/profile.d/columnstoreAlias.sh >/dev/null 2>&1
|
||||
|
||||
# set Profile File in config file
|
||||
mcsSetConfig -d Installation ProfileFile $profileFile
|
||||
|
||||
test -d /var/log/mariadb/columnstore || mkdir -p /var/log/mariadb/columnstore >/dev/null 2>&1
|
||||
test -d /var/log/mariadb/columnstore/archive || mkdir /var/log/mariadb/columnstore/archive >/dev/null 2>&1
|
||||
test -d /var/log/mariadb/columnstore/corefiles || mkdir /var/log/mariadb/columnstore/corefiles >/dev/null 2>&1
|
||||
test -d /var/log/mariadb/columnstore/trace || mkdir /var/log/mariadb/columnstore/trace >/dev/null 2>&1
|
||||
test -h /var/log/mariadb/columnstore/data && rm -f /var/log/mariadb/columnstore/data
|
||||
chmod 755 /var/log/mariadb/columnstore/corefiles > /dev/null 2>&1
|
||||
|
||||
# make sure trace dir is world-writable and sticky
|
||||
test -d /var/lib/columnstore/data || mkdir -p /var/lib/columnstore/data
|
||||
test -d /var/lib/columnstore/data1/systemFiles/dbrm || mkdir -p /var/lib/columnstore/data1/systemFiles/dbrm
|
||||
test -d /var/lib/columnstore/local || mkdir -p /var/lib/columnstore/local
|
||||
test -d /var/lib/columnstore/data1/systemFiles/dataTransaction || rmdir /var/lib/columnstore/data1/systemFiles/dataTransaction >/dev/null 2>&1
|
||||
test -d /var/lib/columnstore/data1/systemFiles/dataTransaction/archive || rmdir /var/lib/columnstore/data1/systemFiles/dataTransaction/archive >/dev/null 2>&1
|
||||
chmod 1755 /var/lib/columnstore/data1 >/dev/null 2>&1
|
||||
chmod -R 1755 /var/lib/columnstore/data1/systemFiles >/dev/null 2>&1
|
||||
chmod 1755 @ENGINE_SYSCONFDIR@/columnstore > /dev/null 2>&1
|
||||
|
||||
#create the bulk-load dirs
|
||||
mkdir -p /var/lib/columnstore/data/bulk/data/import >/dev/null 2>&1
|
||||
mkdir -p /var/lib/columnstore/data/bulk/log >/dev/null 2>&1
|
||||
mkdir -p /var/lib/columnstore/data/bulk/job >/dev/null 2>&1
|
||||
mkdir -p /var/lib/columnstore/data/bulk/rollback >/dev/null 2>&1
|
||||
mkdir -p /var/lib/columnstore/data/bulk/tmpjob >/dev/null 2>&1
|
||||
rm -f /var/lib/columnstore/data/bulk/tmpjob/* >/dev/null 2>&1
|
||||
|
||||
#get temp base directory
|
||||
tmpDir="/tmp"
|
||||
if [ $user != "root" ]; then
|
||||
tmpDir=$HOME"/.tmp"
|
||||
mkdir $tmpDir >/dev/null 2>&1
|
||||
else
|
||||
#get columnstore temp file directory name
|
||||
TempFileDir=`mcsGetConfig SystemConfig TempFileDir`
|
||||
tmpDir=${tmpDir}${TempFileDir}
|
||||
mkdir $tmpDir >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
#set base columnstore temp file directory
|
||||
mcsSetConfig -d SystemConfig SystemTempFileDir $tmpDir
|
||||
|
||||
#create mount directories
|
||||
mkdir /mnt/tmp > /dev/null 2>&1
|
||||
|
||||
# delete Columnstore shared memory segments
|
||||
clearShm > /dev/null 2>&1
|
||||
|
||||
#check and create rc.local file if missing
|
||||
if [ -f /etc/rc.d ]; then
|
||||
RCFILE=/etc/rc.d/rc.local
|
||||
else
|
||||
RCFILE=/etc/rc.local
|
||||
fi
|
||||
|
||||
if [ $user = "root" ]; then
|
||||
touch $RCFILE
|
||||
chmod +x $RCFILE
|
||||
else
|
||||
printf '%s\n' '#!/bin/bash' "#" | tee -a $RCFILE > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [ $user = "root" ]; then
|
||||
#setup the columnstore service script
|
||||
rm -f /etc/init.d/columnstore >/dev/null 2>&1
|
||||
rm -f /etc/init.d/mysql-Columnstore >/dev/null 2>&1
|
||||
rm -f /etc/default/columnstore
|
||||
|
||||
systemctl=`which systemctl 2>/dev/null`
|
||||
if [ -n "$systemctl" ]; then
|
||||
|
||||
cp @ENGINE_SUPPORTDIR@/columnstore.service /usr/lib/systemd/system/. >/dev/null 2>&1
|
||||
cp @ENGINE_SUPPORTDIR@/columnstore.service /lib/systemd/system/. >/dev/null 2>&1
|
||||
systemctl enable columnstore >/dev/null 2>&1
|
||||
else
|
||||
chkconfig=`which chkconfig 2>/dev/null`
|
||||
if [ -n "$chkconfig" ]; then
|
||||
|
||||
cp @ENGINE_SBINDIR@/columnstore /etc/init.d/. >/dev/null 2>&1
|
||||
chkconfig --add columnstore > /dev/null 2>&1
|
||||
chkconfig columnstore on > /dev/null 2>&1
|
||||
else
|
||||
cp @ENGINE_SBINDIR@/columnstore /etc/init.d/. >/dev/null 2>&1
|
||||
updaterc=`which update-rc.d 2>/dev/null`
|
||||
if [ -n "$updaterc" ]; then
|
||||
|
||||
update-rc.d columnstore defaults 99 > /dev/null 2>&1
|
||||
else
|
||||
echo ""
|
||||
echo "Package 'systemctl', 'chkconfig' or 'update-rc.d' not installed, contact your sysadmin if you want to setup to autostart for columnstore"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $user = "root" ]; then
|
||||
columnstoreSyslogSetup.sh install > $tmpDir/syslog_install.log 2>&1
|
||||
|
||||
#check if MariaDB Columnstore system logging was setup
|
||||
cat $tmpDir/syslog_install.log | grep 'No System Logging' >/dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
cat $tmpDir/syslog_install.log
|
||||
fi
|
||||
else
|
||||
chown $user:$user @ENGINE_SYSCONFDIR@/columnstore/Columnstore.xml
|
||||
|
||||
cat <<EOD
|
||||
|
||||
NOTE: For non-root install, you will need to run the following commands as root user to
|
||||
setup the MariaDB ColumnStore System Logging
|
||||
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
|
||||
columnstoreSyslogSetup.sh --user=$user install
|
||||
|
||||
|
||||
EOD
|
||||
fi
|
||||
|
||||
#determine lock file directory
|
||||
|
||||
# Lock directory for root user
|
||||
lockdir='/var/lock/subsys'
|
||||
|
||||
mcsSetConfig -d Installation LockFileDirectory $lockdir
|
||||
|
||||
mkdir $lockdir >/dev/null 2>&1
|
||||
|
||||
rm -f $lockdir/mysql-Columnstore
|
||||
rm -f $lockdir/columnstore
|
||||
|
||||
#backup copy of Alarm Config File
|
||||
/bin/cp -f @ENGINE_SYSCONFDIR@/columnstore/AlarmConfig.xml @ENGINE_SYSCONFDIR@/columnstore/AlarmConfig.xml.installSave > /dev/null 2>&1
|
||||
|
||||
#check and get amazon env variables
|
||||
aws=`which aws 2>/dev/null`
|
||||
if [ -z "aws" ]; then
|
||||
MCSgetCredentials.sh >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
cat <<EOD
|
||||
The next step is:
|
||||
|
||||
If installation on pm1:
|
||||
|
||||
postConfigure
|
||||
|
||||
If installing on a node other than pm1:
|
||||
|
||||
columnstore start
|
||||
|
||||
|
||||
EOD
|
||||
|
||||
exit 0
|
||||
|
104
oam/install_scripts/columnstore-pre-uninstall.in
Executable file
104
oam/install_scripts/columnstore-pre-uninstall.in
Executable file
@ -0,0 +1,104 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# $Id: post-uninstall 421 2007-04-05 15:46:55Z dhill $
|
||||
#
|
||||
# pre-uninstall steps for columnstore install
|
||||
|
||||
rpmmode=install
|
||||
user=`whoami 2>/dev/null`
|
||||
|
||||
quiet=0
|
||||
|
||||
for arg in "$@"; do
|
||||
if [ `expr -- "$arg" : '--rpmmode='` -eq 10 ]; then
|
||||
rpmmode="`echo $arg | awk -F= '{print $2}'`"
|
||||
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 "pre-install: invalid unknown argument: $arg" 1>&2
|
||||
echo "exiting..."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
#stop services
|
||||
columnstore stop > /dev/null 2>&1
|
||||
mysql-Columnstore stop > /dev/null 2>&1
|
||||
|
||||
cloud=`mcsGetConfig Installation Cloud`
|
||||
if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then
|
||||
if test -f /etc/fstab ; then
|
||||
sed -i '/Columnstore\/data/d' /etc/fstab > /dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
|
||||
rm -f /etc/profile.d/columnstoreAlias.sh
|
||||
|
||||
rm -f /var/log/mariadb/columnstore/activeAlarms > /dev/null 2>&1
|
||||
rm -f /var/log/mariadb/columnstore/*.log1 > /dev/null 2>&1
|
||||
|
||||
# delete Mariab Columnstore shared memory segments
|
||||
clearShm > /dev/null 2>&1
|
||||
|
||||
#get temp directory
|
||||
tmpDir=`mcsGetConfig SystemConfig SystemTempFileDir`
|
||||
if [[ $tmpDir = *"tmp" ]]; then
|
||||
# delete tmp files
|
||||
rm -rf $tmpDir/*
|
||||
fi
|
||||
rm -f /var/lib/columnstore/local/*.columnstore
|
||||
rm -rf /var/lib/columnstore/local/etc/
|
||||
rm -f /var/lib/columnstore/data/bulk/tmp/job/* >/dev/null 2>&1
|
||||
rm -f /var/lib/columnstore/local/moveDbrootTransactionLog
|
||||
|
||||
lockdir=`mcsGetConfig Installation LockFileDirectory`
|
||||
rm -f $lockdir/columnstore
|
||||
rm -f $lockdir/mysql-Columnstore
|
||||
|
||||
# delete core files
|
||||
#rm -f /var/log/mariadb/columnstore/corefiles/* > /dev/null 2>&1
|
||||
|
||||
#uninstall MariaDB Columnstore system logging
|
||||
columnstoreSyslogSetup.sh uninstall >/dev/null 2>&1
|
||||
|
||||
#remove the start service command
|
||||
systemctl=`which systemctl 2>/dev/null`
|
||||
if [ -n "$systemctl" ]; then
|
||||
|
||||
systemctl disable columnstore >/dev/null 2>&1
|
||||
rm -f /usr/lib/systemd/system/columnstore.service
|
||||
rm -f /lib/systemd/system/columnstore.service
|
||||
else
|
||||
chkconfig=`which chkconfig 2>/dev/null`
|
||||
if [ -n "$chkconfig" ]; then
|
||||
chkconfig columnstore off > /dev/null 2>&1
|
||||
chkconfig --del columnstore > /dev/null 2>&1
|
||||
rm -f /etc/init.d/columnstore > /dev/null 2>&1
|
||||
else
|
||||
updaterc=`which update-rc.d 2>/dev/null`
|
||||
if [ -n "$updaterc" ]; then
|
||||
update-rc.d -f columnstore remove > /dev/null 2>&1
|
||||
rm -f /etc/init.d/columnstore > /dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $quiet != 1 ]; then
|
||||
#make copy of Columnstore.xml
|
||||
/bin/cp -f @ENGINE_SYSCONFDIR@/columnstore/Columnstore.xml @ENGINE_SYSCONFDIR@/columnstore/Columnstore.xml.rpmsave > /dev/null 2>&1
|
||||
/bin/cp -f @MARIADB_MYCNFDIR@/columnstore.cnf @MARIADB_MYCNFDIR@/columnstore.cnf.rpmsave > /dev/null 2>&1
|
||||
cp @ENGINE_SUPPORTDIR@/myCnf-include-args.text @ENGINE_SUPPORTDIR@/myCnf-include-args.text.rpmsave >& /dev/null
|
||||
rm -f @ENGINE_SYSCONFDIR@/columnstore/AlarmConfig.xml.installSave
|
||||
fi
|
||||
|
||||
#remove OAMdbrootCheck file
|
||||
rm -f /var/lib/columnstore/data*/OAMdbrootCheck > /dev/null 2>&1
|
||||
|
||||
#tell user to run post configure script
|
||||
echo " "
|
||||
echo "Mariab Columnstore uninstall completed"
|
||||
|
||||
exit 0
|
||||
|
@ -1 +0,0 @@
|
||||
/usr/local/mariadb/columnstore/lib
|
@ -17,69 +17,31 @@
|
||||
# Short-Description: Start/stop MariaDB Columnstore DW DBMS
|
||||
### END INIT INFO
|
||||
|
||||
prefix=/usr/local
|
||||
|
||||
USER=`whoami 2>/dev/null`
|
||||
|
||||
if [ $USER != "root" ]; then
|
||||
prefix=$HOME
|
||||
fi
|
||||
|
||||
if [ $USER != "root" ]; then
|
||||
if [ -f $prefix/.bash_profile ]; then
|
||||
profileFile=$prefix/.bash_profile
|
||||
elif [ -f $prefix/.profile ]; then
|
||||
profileFile=$prefix/.profile
|
||||
else
|
||||
profileFile=$prefix/.bashrc
|
||||
fi
|
||||
|
||||
. $profileFile
|
||||
fi
|
||||
|
||||
# Source function library.
|
||||
if [ -f /etc/init.d/functions ]; then
|
||||
. /etc/init.d/functions
|
||||
fi
|
||||
|
||||
if [ -z "$COLUMNSTORE_INSTALL_DIR" ]; then
|
||||
COLUMNSTORE_INSTALL_DIR=/usr/local/mariadb/columnstore
|
||||
fi
|
||||
|
||||
export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR
|
||||
|
||||
InstallDir=$COLUMNSTORE_INSTALL_DIR
|
||||
|
||||
if [ $InstallDir != "/usr/local/mariadb/columnstore" ]; then
|
||||
export PATH=$InstallDir/bin:/bin:/usr/bin
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$InstallDir/lib
|
||||
fi
|
||||
|
||||
#hadoop
|
||||
plugin=`$InstallDir/bin/getConfig SystemConfig DataFilePlugin`
|
||||
if [ -n "$plugin" ]; then
|
||||
setenv=`$InstallDir/bin/getConfig SystemConfig DataFileEnvFile`
|
||||
. $InstallDir/bin/$setenv >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
test -f $InstallDir/post/functions && . $InstallDir/post/functions
|
||||
. @ENGINE_SUPPORTDIR@/columnstore_functions
|
||||
|
||||
mt=`module_type`
|
||||
mid=`module_id`
|
||||
|
||||
has_um=`$InstallDir/bin/getConfig SystemModuleConfig ModuleCount2`
|
||||
has_um=`mcsGetConfig SystemModuleConfig ModuleCount2`
|
||||
if [ "x$has_um" = x ]; then
|
||||
has_um=0
|
||||
fi
|
||||
|
||||
lockdir=`$InstallDir/bin/getConfig Installation LockFileDirectory`
|
||||
lockdir=`mcsGetConfig Installation LockFileDirectory`
|
||||
|
||||
#get temp directory
|
||||
tmpDir=`$InstallDir/bin/getConfig SystemConfig SystemTempFileDir`
|
||||
tmpDir=`mcsGetConfig SystemConfig SystemTempFileDir`
|
||||
mkdir $tmpDir >/dev/null 2>&1
|
||||
|
||||
checkInstallSetup() {
|
||||
InitialInstallFlag=`$InstallDir/bin/getConfig -c @ENGINE_SYSCONFDIR@/columnstore/Columnstore.xml Installation InitialInstallFlag`
|
||||
InitialInstallFlag=`mcsGetConfig -c @ENGINE_SYSCONFDIR@/columnstore/Columnstore.xml Installation InitialInstallFlag`
|
||||
if [ $InitialInstallFlag != "y" ]; then
|
||||
echo "Please run the postConfigure install script, check the Installation Guide"
|
||||
echo "for additional details"
|
||||
@ -88,8 +50,6 @@ checkInstallSetup() {
|
||||
fi
|
||||
}
|
||||
|
||||
[ -f $InstallDir/bin/ProcMon ] || exit 0
|
||||
|
||||
start() {
|
||||
if [ -f $lockdir/columnstore ]; then
|
||||
echo "MariaDB Columnstore Database Platform already running"
|
||||
@ -98,17 +58,9 @@ start() {
|
||||
|
||||
(mkdir -p $lockdir && touch $lockdir/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 $lockdir/columnstore
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
#checkInstallSetup
|
||||
|
||||
CoreFileFlag=`$InstallDir/bin/getConfig -c @ENGINE_SYSCONFDIR@/columnstore/Columnstore.xml Installation CoreFileFlag`
|
||||
CoreFileFlag=`mcsGetConfig -c @ENGINE_SYSCONFDIR@/columnstore/Columnstore.xml Installation CoreFileFlag`
|
||||
if [ $CoreFileFlag = "y" ]; then
|
||||
#columnstore core files
|
||||
ulimit -c unlimited > /dev/null 2>&1
|
||||
@ -120,7 +72,7 @@ start() {
|
||||
RETVAL=0
|
||||
echo "Starting MariaDB Columnstore Database Platform"
|
||||
rm -f ${tmpDir}/StopColumnstore
|
||||
exec $InstallDir/bin/run.sh -l ${tmpDir} $InstallDir/bin/ProcMon > /dev/null 2>&1 &
|
||||
exec columnstore_run.sh -l ${tmpDir} ProcMon > /dev/null 2>&1 &
|
||||
|
||||
return $RETVAL
|
||||
}
|
||||
@ -129,15 +81,11 @@ stop() {
|
||||
touch ${tmpDir}/StopColumnstore
|
||||
pkill ProcMon
|
||||
pkill ProcMgr
|
||||
$InstallDir/bin/clearShm
|
||||
clearShm
|
||||
RETVAL=$?
|
||||
rm -f $lockdir/columnstore
|
||||
fuser -k 8604/tcp > /dev/null 2>&1
|
||||
test -f $InstallDir/mysql/mysql-Columnstore || return $RETVAL
|
||||
$InstallDir/mysql/mysql-Columnstore stop > /dev/null 2>&1
|
||||
if [ -x $InstallDir/bin/columnstore.post-stop ]; then
|
||||
$InstallDir/bin/columnstore.post-stop
|
||||
fi
|
||||
mysql-Columnstore stop > /dev/null 2>&1
|
||||
return $RETVAL
|
||||
}
|
||||
restart() {
|
||||
|
@ -5,8 +5,8 @@ After=network.target
|
||||
Type=forking
|
||||
#Restart=on-abnormal
|
||||
GuessMainPID=yes
|
||||
ExecStart=/usr/local/mariadb/columnstore/bin/columnstore start
|
||||
ExecStopPost=/usr/local/mariadb/columnstore/bin/columnstore stop
|
||||
ExecStart=@ENGINE_BINDIR@/columnstore start
|
||||
ExecStopPost=@ENGINE_BINDIR@/columnstore stop
|
||||
TimeoutStopSec=5
|
||||
LimitNOFILE=65535
|
||||
[Install]
|
@ -1,16 +0,0 @@
|
||||
# $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/mariadb/columnstore/bin/ProcMon
|
||||
|
@ -1,17 +1,12 @@
|
||||
# MariaDB Columnstore Alias Commands
|
||||
#
|
||||
alias mcsmysql='mysql -u root'
|
||||
alias ma=/usr/local/mariadb/columnstore/bin/mcsadmin
|
||||
alias mcsadmin=/usr/local/mariadb/columnstore/bin/mcsadmin
|
||||
alias cpimport=/usr/local/mariadb/columnstore/bin/cpimport
|
||||
alias mcshome='cd /usr/local/mariadb/columnstore'
|
||||
alias log='cd /var/log/mariadb/columnstore/'
|
||||
alias ma=mcsadmin
|
||||
alias core='cd /var/log/mariadb/columnstore/corefiles'
|
||||
alias tmsg='tail -f /var/log/messages'
|
||||
alias tdebug='tail -f /var/log/mariadb/columnstore/debug.log'
|
||||
alias tinfo='tail -f /var/log/mariadb/columnstore/info.log'
|
||||
alias terror='tail -f /var/log/mariadb/columnstore/err.log'
|
||||
alias twarning='tail -f /var/log/mariadb/columnstore/warning.log'
|
||||
alias tcrit='tail -f /var/log/mariadb/columnstore/crit.log'
|
||||
alias dbrm='cd /usr/local/mariadb/columnstore/data1/systemFiles/dbrm'
|
||||
alias mcsmodule='cat /usr/local/mariadb/columnstore/local/module'
|
||||
alias dbrm='cd /var/lib/columnstore/data1/systemFiles/dbrm'
|
||||
alias mcsmodule='cat /etc/columnstore/module'
|
||||
|
@ -1,167 +0,0 @@
|
||||
#!/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: Columnstore.xml config file with directory location, i.e. /root/Columnstore.xml\n"
|
||||
send_user " Default version is @ENGINE_SYSCONFDIR@/columnstore/Columnstore.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 @ENGINE_SYSCONFDIR@/columnstore/Columnstore.xml.rpmsave
|
||||
}
|
||||
|
||||
if { [catch { open $CONFIGFILE "r"} handle ] } {
|
||||
puts "Calpont Config file not found: $CONFIGFILE"; exit 1
|
||||
}
|
||||
|
||||
exec rm -f @ENGINE_SYSCONFDIR@/columnstore/Columnstore.xml.new > /dev/null 2>&1
|
||||
exec mv -f @ENGINE_SYSCONFDIR@/columnstore/Columnstore.xml @ENGINE_SYSCONFDIR@/columnstore/Columnstore.xml.new > /dev/null 2>&1
|
||||
exec /bin/cp -f $CONFIGFILE @ENGINE_SYSCONFDIR@/columnstore/Columnstore.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:
|
||||
|
@ -7,8 +7,6 @@
|
||||
# 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
|
||||
non_root_user=no
|
||||
@ -32,13 +30,7 @@ if [ -f /var/log/syslog ]; then
|
||||
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" : '--installdir='` -eq 13 ]; then
|
||||
installdir="`echo $arg | awk -F= '{print $2}'`"
|
||||
prefix=`dirname $installdir`
|
||||
elif [ `expr -- "$arg" : '--user='` -eq 7 ]; then
|
||||
if [ `expr -- "$arg" : '--user='` -eq 7 ]; then
|
||||
user="`echo $arg | awk -F= '{print $2}'`"
|
||||
groupname=$user
|
||||
username=$user
|
||||
@ -54,16 +46,11 @@ for arg in "$@"; do
|
||||
shift
|
||||
done
|
||||
|
||||
if [ $installdir != "/usr/local/mariadb/columnstore" ]; then
|
||||
export COLUMNSTORE_INSTALL_DIR=$installdir
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$COLUMNSTORE_INSTALL_DIR/lib
|
||||
fi
|
||||
|
||||
columnstoreSyslogFile=$installdir/bin/columnstoreSyslog
|
||||
columnstoreSyslogFile7=$installdir/bin/columnstoreSyslog7
|
||||
columnstoreSyslogFile=@ENGINE_SUPPORTDIR@/columnstoreSyslog
|
||||
columnstoreSyslogFile7=@ENGINE_SUPPORTDIR@/columnstoreSyslog7
|
||||
|
||||
#get temp directory
|
||||
tmpDir=`$installdir/bin/getConfig SystemConfig SystemTempFileDir`
|
||||
tmpDir=`mcsGetConfig SystemConfig SystemTempFileDir`
|
||||
|
||||
checkSyslog() {
|
||||
#check which syslog daemon is being used
|
||||
@ -112,7 +99,7 @@ fi
|
||||
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
|
||||
columnstoreSyslogFile=@ENGINE_SUPPORTDIR@/columnstoreSyslog-ng
|
||||
echo ""
|
||||
echo "System logging being used: syslog-ng"
|
||||
echo ""
|
||||
@ -156,7 +143,7 @@ elif [ "$daemon" = "syslog" ]; then
|
||||
echo ""
|
||||
elif [ -d /etc/syslog-ng/syslog-ng.conf ]; then
|
||||
syslog_conf=/etc/syslog-ng/syslog-ng.conf
|
||||
columnstoreSyslogFile=$installdir/bin/columnstoreSyslog-ng
|
||||
columnstoreSyslogFile=@ENGINE_SUPPORTDIR@/columnstoreSyslog-ng
|
||||
echo ""
|
||||
echo "System logging being used: syslog-ng"
|
||||
echo ""
|
||||
@ -189,7 +176,7 @@ install() {
|
||||
makeDir
|
||||
checkSyslog
|
||||
if [ ! -z "$syslog_conf" ] ; then
|
||||
$installdir/bin/setConfig -d Installation SystemLogConfigFile ${syslog_conf} >/dev/null 2>&1
|
||||
mcsSetConfig -d Installation SystemLogConfigFile ${syslog_conf} >/dev/null 2>&1
|
||||
if [ $non_root_user == "yes" ]; then
|
||||
chown $user:$user @ENGINE_SYSCONFDIR@/columnstore/Columnstore.xml*
|
||||
fi
|
||||
@ -225,7 +212,7 @@ if [ ! -z "$syslog_conf" ] ; then
|
||||
|
||||
# install Columnstore Log Rotate File
|
||||
if [ -d /etc/logrotate.d ]; then
|
||||
cp $installdir/bin/columnstoreLogRotate /etc/logrotate.d/columnstore > /dev/null 2>&1
|
||||
cp @ENGINE_SUPPORTDIR@/columnstoreLogRotate /etc/logrotate.d/columnstore > /dev/null 2>&1
|
||||
chmod 644 /etc/logrotate.d/columnstore
|
||||
|
||||
#do the logrotate to start with a fresh log file during install
|
||||
@ -241,8 +228,8 @@ if [ ! -z "$syslog_conf" ] ; then
|
||||
chmod $CHMOD /var/log/mariadb/columnstore/corefiles
|
||||
chmod $CHMOD /var/log/mariadb/columnstore/trace
|
||||
|
||||
test -f $installdir/post/functions && . $installdir/post/functions
|
||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib $installdir/bin/cplogger -i 19 "***** MariaDB Columnstore Installed *****"
|
||||
. columnstore_functions
|
||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib cplogger -i 19 "***** MariaDB Columnstore Installed *****"
|
||||
|
||||
if [ -f /var/log/mariadb/columnstore/info.log ]; then
|
||||
if [ -s /var/log/mariadb/columnstore/info.log ]; then
|
||||
@ -299,9 +286,9 @@ fi
|
||||
}
|
||||
|
||||
check() {
|
||||
test -f $installdir/post/functions && . $installdir/post/functions
|
||||
. columnstore_functions
|
||||
number=$RANDOM
|
||||
$installdir/bin/cplogger -i 104 "MariaDB Columnstore Log Test: $number"
|
||||
cplogger -i 104 "MariaDB Columnstore Log Test: $number"
|
||||
sleep 3
|
||||
egrep -qs "MariaDB Columnstore Log Test: $number" /var/log/mariadb/columnstore/info.log
|
||||
if [ $? -eq 0 ]; then
|
||||
@ -356,4 +343,4 @@ esac
|
||||
|
||||
|
||||
exit 0
|
||||
/
|
||||
|
@ -1,118 +0,0 @@
|
||||
#!/usr/bin/expect
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Uninstall Package from system
|
||||
|
||||
set COLUMNSTORE_INSTALL_DIR "/usr/local/mariadb/columnstore"
|
||||
set env(COLUMNSTORE_INSTALL_DIR) $COLUMNSTORE_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 "$COLUMNSTORE_INSTALL_DIR/bin/getConfig DBRM_Controller NumWorkers\n"
|
||||
expect {
|
||||
1 { set INSTALL 1 }
|
||||
}
|
||||
|
||||
set PACKAGE "rpm"
|
||||
send "$COLUMNSTORE_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 "$COLUMNSTORE_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 "$COLUMNSTORE_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 "$COLUMNSTORE_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
|
153
oam/install_scripts/columnstore_module_installer.sh.in
Executable file
153
oam/install_scripts/columnstore_module_installer.sh.in
Executable file
@ -0,0 +1,153 @@
|
||||
#!/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
|
||||
#
|
||||
#
|
||||
|
||||
rpmmode=install
|
||||
user=`whoami 2>/dev/null`
|
||||
quiet=0
|
||||
shiftcnt=0
|
||||
password=" "
|
||||
|
||||
for arg in "$@"; do
|
||||
if [ $(expr -- "$arg" : '--rpmmode=') -eq 10 ]; then
|
||||
rpmmode="$(echo $arg | awk -F= '{print $2}')"
|
||||
((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++))
|
||||
elif [ $(expr -- "$arg" : '--password') -eq 10 ]; then
|
||||
password="$(echo $arg | awk -F= '{print $2}')"
|
||||
((shiftcnt++))
|
||||
fi
|
||||
done
|
||||
shift $shiftcnt
|
||||
|
||||
PMwithUM=`mcsGetConfig Installation PMwithUM`
|
||||
ServerTypeInstall=`mcsGetConfig Installation ServerTypeInstall`
|
||||
|
||||
#get temp directory
|
||||
tmpDir=`mcsGetConfig SystemConfig SystemTempFileDir`
|
||||
|
||||
cloud=`mcsGetConfig Installation Cloud`
|
||||
if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then
|
||||
echo "Amazon setup on Module"
|
||||
cp /var/lib/columnstore/local/etc/credentials $HOME/.aws/. > /dev/null 2>&1
|
||||
|
||||
if [ $module = "pm" ]; then
|
||||
if test -f /var/lib/columnstore/local/etc/pm1/fstab ; then
|
||||
echo "Setup fstab on Module"
|
||||
SUDO=""
|
||||
if [ $user != "root" ]; then
|
||||
SUDO="sudo "
|
||||
fi
|
||||
touch /etc/fstab
|
||||
$SUDO chmod 666 /etc/fstab
|
||||
rm -f /etc/fstab.columnstoreSave
|
||||
cp /etc/fstab /etc/fstab.columnstoreSave
|
||||
cat /var/lib/columnstore/local/etc/pm1/fstab >> /etc/fstab
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
. @ENGINE_SUPPORTDIR@/columnstore_functions
|
||||
|
||||
mid=`module_id`
|
||||
|
||||
#if um, cloud, separate system type, external um storage, then setup mount
|
||||
if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then
|
||||
if [ $module = "um" ]; then
|
||||
systemtype=`mcsGetConfig Installation ServerTypeInstall`
|
||||
if [ $systemtype = "1" ]; then
|
||||
umstoragetype=`mcsGetConfig Installation UMStorageType`
|
||||
fi
|
||||
fi
|
||||
|
||||
#setup rc.local for amazon
|
||||
RCFILE=/etc/rc.d/rc.local
|
||||
|
||||
if [ $user != "root" ]; then
|
||||
echo "uncomment runuser in rc.local, amazon AMI"
|
||||
sudo sed -i -e 's/#runuser/runuser/g' /etc/rc.d/rc.local >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
|
||||
#if pm, create dbroot directories
|
||||
if [ $module = "pm" ]; then
|
||||
numdbroots=`mcsGetConfig SystemConfig DBRootCount`
|
||||
for (( id=1; id<$numdbroots+1; id++ )); do
|
||||
mkdir -p /var/lib/columnstore/data$id > /dev/null 2>&1
|
||||
chmod 755 /var/lib/columnstore/data$id
|
||||
done
|
||||
fi
|
||||
|
||||
# if mysqlrep is on and module has a my.cnf file, upgrade it
|
||||
|
||||
MySQLRep=`mcsGetConfig Installation MySQLRep`
|
||||
if [ $MySQLRep = "y" ]; then
|
||||
if test -f @MARIADB_MYCNFDIR@/columnstore.cnf ; then
|
||||
echo "Run Upgrade on my.cnf on Module"
|
||||
mycnfUpgrade > ${tmpDir}/mycnfUpgrade.log 2>&1
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -f @MARIADB_MYCNFDIR@/columnstore.cnf ; then
|
||||
mysqlPort=`mcsGetConfig Installation MySQLPort`
|
||||
echo "Run Mysql Port update on my.cnf on Module"
|
||||
mycnfUpgrade $mysqlPort > ${tmpDir}/mycnfUpgrade_port.log 2>&1
|
||||
fi
|
||||
|
||||
# if um, run mysql install scripts
|
||||
if [ $module = "um" ] || ( [ $module = "pm" ] && [ $PMwithUM = "y" ] ) || [ $ServerTypeInstall = "2" ]; then
|
||||
|
||||
mysqlPassword=" "
|
||||
if [[ $password != " " ]]; then
|
||||
mysqlPassword="--password="$password
|
||||
fi
|
||||
|
||||
echo "Run post-mysqld-install"
|
||||
post-mysqld-install $mysqlPassword --tmpdir=${tmpDir} > ${tmpDir}/post-mysqld-install.log 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: post-mysqld-install failed: check ${tmpDir}/post-mysqld-install.log"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Run post-mysql-install"
|
||||
|
||||
post-mysql-install --tmpdir=${tmpDir} > ${tmpDir}/post-mysql-install.log 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: post-mysql-install failed: check ${tmpDir}/post-mysql-install.log"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $user == "root" ]; then
|
||||
columnstoreSyslogSetup.sh check > ${tmpDir}/syslogSetup-check.log 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
# try setup again
|
||||
columnstoreSyslogSetup.sh install > ${tmpDir}/syslogSetup-install.log 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "WARNING: columnstoreSyslogSetup.sh check failed: check ${tmpDir}/syslogSetup-check.log"
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "!!!Module Installation Successfully Completed!!!"
|
||||
|
||||
exit 0
|
@ -1,18 +0,0 @@
|
||||
#
|
||||
# MariaDB Columnstore version with Daily running at midnight
|
||||
#
|
||||
|
||||
SHELL=/bin/bash
|
||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||
MAILTO=root
|
||||
HOME=/
|
||||
|
||||
# run-parts
|
||||
01 * * * * root run-parts /etc/cron.hourly
|
||||
00 0 * * * root run-parts /etc/cron.daily
|
||||
22 4 * * 0 root run-parts /etc/cron.weekly
|
||||
42 4 1 * * root run-parts /etc/cron.monthly
|
||||
|
||||
# Translation Log Archiver, default to every 10 minutes
|
||||
00,10,20,30,40,50 * * * * root /usr/local/mariadb/columnstore/bin/transactionLogArchiver.sh
|
||||
|
@ -1,340 +0,0 @@
|
||||
#!/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
|
||||
|
@ -17,25 +17,17 @@ checkForError() {
|
||||
rm -f ${tmpdir}/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
|
||||
if [ `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" : '--tmpdir=') -eq 9 ]; then
|
||||
tmpdir="$(echo $arg | awk -F= '{print $2}')"
|
||||
fi
|
||||
done
|
||||
|
||||
test -f $installdir/post/functions && . $installdir/post/functions
|
||||
. @ENGINE_SUPPORTDIR@/columnstore_functions
|
||||
|
||||
>${tmpdir}/disable-rep-status.log
|
||||
|
@ -24,17 +24,12 @@ checkForError() {
|
||||
rm -f ${tmpdir}/error.check
|
||||
}
|
||||
|
||||
prefix=/usr/local
|
||||
installdir=$prefix/mariadb/columnstore
|
||||
pwprompt=
|
||||
for arg in "$@"; do
|
||||
if [ `expr -- "$arg" : '--command='` -eq 10 ]; then
|
||||
command1="`echo $arg | awk -F= '{print $2}'`"
|
||||
command2="`echo $arg | awk -F= '{print $3}'`"
|
||||
command=$command1"="$command2
|
||||
elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then
|
||||
installdir="`echo $arg | awk -F= '{print $2}'`"
|
||||
prefix=`dirname $installdir`
|
||||
elif [ `expr -- "$arg" : '--port='` -eq 7 ]; then
|
||||
port="`echo $arg | awk -F= '{print $2}'`"
|
||||
elif [ $(expr -- "$arg" : '--tmpdir=') -eq 9 ]; then
|
||||
@ -42,7 +37,7 @@ for arg in "$@"; do
|
||||
fi
|
||||
done
|
||||
|
||||
test -f $installdir/post/functions && . $installdir/post/functions
|
||||
. @ENGINE_SUPPORTDIR@/columnstore_functions
|
||||
|
||||
|
||||
>${tmpdir}/mariadb-command-line.log
|
@ -17,24 +17,16 @@ checkForError() {
|
||||
rm -f ${tmpdir}/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" : '--installdir='` -eq 13 ]; then
|
||||
installdir="`echo $arg | awk -F= '{print $2}'`"
|
||||
prefix=`dirname $installdir`
|
||||
elif [ `expr -- "$arg" : '--hostIP='` -eq 9 ]; then
|
||||
if [ `expr -- "$arg" : '--hostIP='` -eq 9 ]; then
|
||||
hostipaddr="`echo $arg | awk -F= '{print $2}'`"
|
||||
elif [ $(expr -- "$arg" : '--tmpdir=') -eq 9 ]; then
|
||||
tmpdir="$(echo $arg | awk -F= '{print $2}')"
|
||||
fi
|
||||
done
|
||||
|
||||
test -f $installdir/post/functions && . $installdir/post/functions
|
||||
. @ENGINE_SUPPORTDIR@/columnstore_functions
|
||||
|
||||
repUser="idbrep"
|
||||
password="Calpont1"
|
@ -1,187 +0,0 @@
|
||||
#!/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=`whoami 2>/dev/null`
|
||||
quiet=0
|
||||
shiftcnt=0
|
||||
password=" "
|
||||
|
||||
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++))
|
||||
elif [ $(expr -- "$arg" : '--password') -eq 10 ]; then
|
||||
password="$(echo $arg | awk -F= '{print $2}')"
|
||||
((shiftcnt++))
|
||||
fi
|
||||
done
|
||||
shift $shiftcnt
|
||||
|
||||
if [ $installdir != "/usr/local/mariadb/columnstore" ]; then
|
||||
export COLUMNSTORE_INSTALL_DIR=$installdir
|
||||
export PATH=$COLUMNSTORE_INSTALL_DIR/bin:/bin:/usr/bin
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$COLUMNSTORE_INSTALL_DIR/lib
|
||||
else
|
||||
export COLUMNSTORE_INSTALL_DIR=$installdir
|
||||
fi
|
||||
|
||||
PMwithUM=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation PMwithUM`
|
||||
ServerTypeInstall=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation ServerTypeInstall`
|
||||
|
||||
#get temp directory
|
||||
tmpDir=`$installdir/bin/getConfig SystemConfig SystemTempFileDir`
|
||||
|
||||
cloud=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation Cloud`
|
||||
if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then
|
||||
echo "Amazon setup on Module"
|
||||
cp $COLUMNSTORE_INSTALL_DIR/local/etc/credentials $HOME/.aws/. > /dev/null 2>&1
|
||||
|
||||
if [ $module = "pm" ]; then
|
||||
if test -f $COLUMNSTORE_INSTALL_DIR/local/etc/pm1/fstab ; then
|
||||
echo "Setup fstab on Module"
|
||||
SUDO=""
|
||||
if [ $user != "root" ]; then
|
||||
SUDO="sudo "
|
||||
fi
|
||||
touch /etc/fstab
|
||||
$SUDO chmod 666 /etc/fstab
|
||||
rm -f /etc/fstab.columnstoreSave
|
||||
cp /etc/fstab /etc/fstab.columnstoreSave
|
||||
cat $COLUMNSTORE_INSTALL_DIR/local/etc/pm1/fstab >> /etc/fstab
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
test -f $COLUMNSTORE_INSTALL_DIR/post/functions && . $COLUMNSTORE_INSTALL_DIR/post/functions
|
||||
|
||||
mid=`module_id`
|
||||
|
||||
#if um, cloud, separate system type, external um storage, then setup mount
|
||||
if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then
|
||||
if [ $module = "um" ]; then
|
||||
systemtype=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation ServerTypeInstall`
|
||||
if [ $systemtype = "1" ]; then
|
||||
umstoragetype=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation UMStorageType`
|
||||
fi
|
||||
fi
|
||||
|
||||
#setup rc.local for amazon
|
||||
RCFILE=/etc/rc.d/rc.local
|
||||
|
||||
if [ $user != "root" ]; then
|
||||
echo "uncomment runuser in rc.local, amazon AMI"
|
||||
sudo sed -i -e 's/#runuser/runuser/g' /etc/rc.d/rc.local >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
|
||||
#if pm, create dbroot directories
|
||||
if [ $module = "pm" ]; then
|
||||
numdbroots=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig SystemConfig DBRootCount`
|
||||
for (( id=1; id<$numdbroots+1; id++ )); do
|
||||
mkdir -p $COLUMNSTORE_INSTALL_DIR/data$id > /dev/null 2>&1
|
||||
chmod 755 $COLUMNSTORE_INSTALL_DIR/data$id
|
||||
done
|
||||
fi
|
||||
|
||||
plugin=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig SystemConfig DataFilePlugin`
|
||||
if [ -n "$plugin" ]; then
|
||||
echo "Setup .bashrc on Module for local-query"
|
||||
|
||||
setenv=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig SystemConfig DataFileEnvFile`
|
||||
|
||||
if [ -n "$setenv" ]; then
|
||||
eval userhome=~$user
|
||||
bashFile=$userhome/.bashrc
|
||||
touch ${bashFile}
|
||||
|
||||
echo " " >> ${bashFile}
|
||||
echo ". $COLUMNSTORE_INSTALL_DIR/bin/$setenv" >> ${bashFile}
|
||||
fi
|
||||
fi
|
||||
|
||||
# if mysqlrep is on and module has a my.cnf file, upgrade it
|
||||
|
||||
MySQLRep=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation MySQLRep`
|
||||
if [ $MySQLRep = "y" ]; then
|
||||
if test -f /etc/my.cnf.d/columnstore.cnf ; then
|
||||
echo "Run Upgrade on my.cnf on Module"
|
||||
$COLUMNSTORE_INSTALL_DIR/bin/mycnfUpgrade > ${tmpDir}/mycnfUpgrade.log 2>&1
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -f /etc//my.cnf.d/columnstore.cnf ; then
|
||||
mysqlPort=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation MySQLPort`
|
||||
echo "Run Mysql Port update on my.cnf on Module"
|
||||
$COLUMNSTORE_INSTALL_DIR/bin/mycnfUpgrade $mysqlPort > ${tmpDir}/mycnfUpgrade_port.log 2>&1
|
||||
fi
|
||||
|
||||
# if um, run mysql install scripts
|
||||
if [ $module = "um" ] || ( [ $module = "pm" ] && [ $PMwithUM = "y" ] ) || [ $ServerTypeInstall = "2" ]; then
|
||||
|
||||
mysqlPassword=" "
|
||||
if [[ $password != " " ]]; then
|
||||
mysqlPassword="--password="$password
|
||||
fi
|
||||
|
||||
echo "Run post-mysqld-install"
|
||||
$COLUMNSTORE_INSTALL_DIR/bin/post-mysqld-install --installdir=$COLUMNSTORE_INSTALL_DIR $mysqlPassword --tmpdir=${tmpDir} > ${tmpDir}/post-mysqld-install.log 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: post-mysqld-install failed: check ${tmpDir}/post-mysqld-install.log"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Run post-mysql-install"
|
||||
|
||||
$COLUMNSTORE_INSTALL_DIR/bin/post-mysql-install --installdir=$COLUMNSTORE_INSTALL_DIR --tmpdir=${tmpDir} > ${tmpDir}/post-mysql-install.log 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: post-mysql-install failed: check ${tmpDir}/post-mysql-install.log"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $user == "root" ]; then
|
||||
$COLUMNSTORE_INSTALL_DIR/bin/syslogSetup.sh check > ${tmpDir}/syslogSetup-check.log 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
# try setup again
|
||||
$COLUMNSTORE_INSTALL_DIR/bin/syslogSetup.sh install > ${tmpDir}/syslogSetup-install.log 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "WARNING: syslogSetup.sh check failed: check ${tmpDir}/syslogSetup-check.log"
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "!!!Module Installation Successfully Completed!!!"
|
||||
|
||||
exit 0
|
@ -1,252 +0,0 @@
|
||||
#!/usr/bin/expect
|
||||
#
|
||||
# $Id: package_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 AMAZONINSTALL [lindex $argv 5]
|
||||
set PKGTYPE [lindex $argv 6]
|
||||
set NODEPS [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 USERNAME "root"
|
||||
set UNM [lindex $argv 10]
|
||||
if { $UNM != "" } {
|
||||
set USERNAME $UNM
|
||||
}
|
||||
|
||||
set HOME "$env(HOME)"
|
||||
|
||||
log_user $DEBUG
|
||||
spawn -noecho /bin/bash
|
||||
#
|
||||
if { $PKGTYPE == "rpm" } {
|
||||
set PKGERASE "rpm -e --nodeps \$(rpm -qa | grep '^mariadb-columnstore')"
|
||||
set PKGERASE1 "rpm -e --nodeps "
|
||||
|
||||
set PKGINSTALL "rpm -ivh $NODEPS --force mariadb-columnstore*$VERSION*rpm"
|
||||
set PKGUPGRADE "rpm -Uvh --noscripts mariadb-columnstore*$VERSION*rpm"
|
||||
} else {
|
||||
if { $PKGTYPE == "deb" } {
|
||||
set PKGERASE "dpkg -P \$(dpkg --get-selections | grep '^mariadb-columnstore')"
|
||||
set PKGERASE1 "dpkg -P "
|
||||
set PKGINSTALL "dpkg -i --force-confnew mariadb-columnstore*$VERSION*deb"
|
||||
set PKGUPGRADE "dpkg -i --force-confnew mariadb-columnstore*$VERSION*deb"
|
||||
} 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 -v $USERNAME@$SERVER 'time'\n"
|
||||
set timeout 60
|
||||
expect {
|
||||
"authenticity" { send "yes\n"
|
||||
exp_continue
|
||||
}
|
||||
"word: " { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"passphrase" { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"Exit status 0" { send_user "DONE"}
|
||||
"Exit status 1" { send_user "FAILED: Login Failure\n" ; exit 1 }
|
||||
"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 }
|
||||
"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 2 }
|
||||
}
|
||||
send_user "\n"
|
||||
|
||||
send_user "Stop ColumnStore service "
|
||||
send "ssh -v $USERNAME@$SERVER '$INSTALLDIR/bin/columnstore stop'\n"
|
||||
set timeout 60
|
||||
# check return
|
||||
expect {
|
||||
"word: " { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"passphrase" { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
# "No such file or directory" { send_user "DONE" }
|
||||
"Exit status 127" { send_user "DONE" }
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
"Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1}
|
||||
timeout { send_user "DONE" }
|
||||
}
|
||||
send_user "\n"
|
||||
|
||||
#
|
||||
# erase package
|
||||
#
|
||||
send_user "Erase MariaDB Columnstore Packages on Module "
|
||||
send "ssh -v $USERNAME@$SERVER '$PKGERASE '\n"
|
||||
set timeout 60
|
||||
expect {
|
||||
"word: " { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"passphrase" { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"error: Failed dependencies" { send_user "ERROR: Failed dependencies\n" ; exit 1 }
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
"Exit status 2" { send_user "DONE" }
|
||||
timeout { send_user "DONE" }
|
||||
}
|
||||
send_user "\n"
|
||||
|
||||
if { $INSTALLTYPE == "uninstall" } { exit 0 }
|
||||
|
||||
#
|
||||
# send the package
|
||||
#
|
||||
set timeout 60
|
||||
send_user "Copy New MariaDB Columnstore Package to Module "
|
||||
send "ssh -v $USERNAME@$SERVER 'rm -f /root/mariadb-columnstore-*.$PKGTYPE'\n"
|
||||
expect {
|
||||
"word: " { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"passphrase" { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
timeout { send_user "ERROR: Timeout to host\n" ; exit 2 }
|
||||
}
|
||||
set timeout 180
|
||||
send "scp -v $HOME/mariadb-columnstore*$VERSION*$PKGTYPE $USERNAME@$SERVER:.\n"
|
||||
expect {
|
||||
"word: " { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"passphrase" { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"scp :" { send_user "ERROR\n" ;
|
||||
send_user "\n*** Installation ERROR\n" ;
|
||||
exit 1 }
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
"Exit status 1" { send_user "ERROR: scp failed" ; exit 1 }
|
||||
timeout { send_user "ERROR: Timeout to host\n" ; exit 2 }
|
||||
}
|
||||
send_user "\n"
|
||||
|
||||
#
|
||||
# install package
|
||||
#
|
||||
send_user "Install MariaDB Columnstore Packages on Module "
|
||||
|
||||
send "ssh -v $USERNAME@$SERVER '$PKGINSTALL '\n"
|
||||
set timeout 180
|
||||
expect {
|
||||
"word: " { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"passphrase" { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"error: Failed dependencies" { send_user "ERROR: Failed dependencies\n" ;
|
||||
send_user "\n*** Installation ERROR\n" ;
|
||||
exit 1 }
|
||||
"needs" { send_user "ERROR: disk space issue\n" ; exit 1 }
|
||||
"conflicts" { send_user "ERROR: File Conflict issue\n" ; exit 1 }
|
||||
"MariaDB Columnstore syslog logging not working" { send_user "WARNING: MariaDB Columnstore System logging not setup\n"; exp_continue }
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
timeout { send_user "ERROR: Timeout to host\n" ; exit 2 }
|
||||
}
|
||||
send_user "\n"
|
||||
|
||||
#
|
||||
# copy over custom OS tmp files
|
||||
#
|
||||
send_user "Copy Custom OS files to Module "
|
||||
send_user " \n"
|
||||
send "scp -rv $INSTALLDIR/local/etc $USERNAME@$SERVER:$INSTALLDIR/local\n"
|
||||
set timeout 120
|
||||
expect {
|
||||
"word: " { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"passphrase" { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
"scp :" { send_user "ERROR\n" ;
|
||||
send_user "\n*** Installation ERROR\n" ;
|
||||
exit 1 }
|
||||
"Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1}
|
||||
timeout { send_user "ERROR: Timeout\n" ; exit 2 }
|
||||
}
|
||||
send_user "\n"
|
||||
|
||||
#
|
||||
# copy over MariaDB Columnstore Module file
|
||||
#
|
||||
send_user "Copy MariaDB Columnstore Module file to Module "
|
||||
send "scp -v $INSTALLDIR/local/etc/$MODULE/* $USERNAME@$SERVER:$INSTALLDIR/local/.\n"
|
||||
set timeout 120
|
||||
expect {
|
||||
"word: " { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"passphrase" { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"scp :" { send_user "ERROR\n" ;
|
||||
send_user "\n*** Installation ERROR\n" ;
|
||||
exit 1 }
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
"Exit status 1" { send_user "ERROR: scp failed" ; exit 1 }
|
||||
timeout { send_user "ERROR: Timeout to host\n" ; exit 2 }
|
||||
}
|
||||
send_user "\n"
|
||||
|
||||
send_user "Start ColumnStore service "
|
||||
send_user " \n"
|
||||
send "ssh -v $USERNAME@$SERVER '$INSTALLDIR/bin/columnstore restart'\n"
|
||||
set timeout 60
|
||||
# check return
|
||||
expect {
|
||||
"word: " { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"passphrase" { send "$PASSWORD\n"
|
||||
exp_continue
|
||||
}
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
"Exit status 127" { send_user "ERROR: $INSTALLDIR/bin/columnstore Not Found\n" ; exit 1 }
|
||||
timeout { send_user "ERROR: Timeout to host\n" ; exit 2 }
|
||||
}
|
||||
|
||||
send_user "\n"
|
||||
|
||||
send_user "\nInstallation Successfully Completed on '$MODULE'\n"
|
||||
exit 0
|
||||
|
@ -1,265 +0,0 @@
|
||||
#!/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 AMAZONINSTALL [lindex $argv 5]
|
||||
set PKGTYPE [lindex $argv 6]
|
||||
set NODEPS [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 USERNAME "root"
|
||||
set UNM [lindex $argv 10]
|
||||
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 '^mariadb-columnstore')"
|
||||
set PKGERASE1 "rpm -e --nodeps "
|
||||
|
||||
set PKGINSTALL "rpm -ivh $NODEPS --force mariadb-columnstore*$VERSION*rpm"
|
||||
set PKGUPGRADE "rpm -Uvh --noscripts mariadb-columnstore*$VERSION*rpm"
|
||||
} else {
|
||||
if { $PKGTYPE == "deb" } {
|
||||
set PKGERASE "dpkg -P \$(dpkg --get-selections | grep '^mariadb-columnstore')"
|
||||
set PKGERASE1 "dpkg -P "
|
||||
set PKGINSTALL "dpkg -i --force-confnew mariadb-columnstore*$VERSION*deb"
|
||||
set PKGUPGRADE "dpkg -i --force-confnew mariadb-columnstore*$VERSION*deb"
|
||||
} 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 -v $USERNAME@$SERVER 'time'\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" }
|
||||
}
|
||||
}
|
||||
"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 }
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
}
|
||||
|
||||
send_user "\n"
|
||||
|
||||
send_user "Stop ColumnStore service "
|
||||
send date\n
|
||||
send "ssh -v $USERNAME@$SERVER '$INSTALLDIR/bin/columnstore stop'\n"
|
||||
set timeout 10
|
||||
expect {
|
||||
"word: " { send "$PASSWORD\n" }
|
||||
"passphrase" { send "$PASSWORD\n" }
|
||||
}
|
||||
set timeout 60
|
||||
# check return
|
||||
expect {
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
# "No such file" { send_user "ERROR: post-install Not Found\n" ; exit 1 }
|
||||
"MariaDB Columnstore syslog logging not working" { send_user "ERROR: MariaDB Columnstore 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 }
|
||||
timeout { }
|
||||
}
|
||||
send_user "\n"
|
||||
|
||||
if { $INSTALLTYPE == "initial" || $INSTALLTYPE == "uninstall" } {
|
||||
#
|
||||
# erase package
|
||||
#
|
||||
send_user "Erase MariaDB Columnstore Packages on Module "
|
||||
send "ssh -v $USERNAME@$SERVER '$PKGERASE '\n"
|
||||
if { $PASSWORD != "ssh" } {
|
||||
set timeout 30
|
||||
expect {
|
||||
"word: " { send "$PASSWORD\n" }
|
||||
"passphrase" { send "$PASSWORD\n" }
|
||||
}
|
||||
}
|
||||
set timeout 120
|
||||
expect {
|
||||
"error: --purge needs at least one package" { 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 }
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
timeout { }
|
||||
}
|
||||
send_user "\n"
|
||||
}
|
||||
|
||||
if { $INSTALLTYPE == "uninstall" } { exit 0 }
|
||||
|
||||
#
|
||||
# send the package
|
||||
#
|
||||
set timeout 30
|
||||
send_user "Copy New MariaDB Columnstore Package to Module "
|
||||
send "ssh -v $USERNAME@$SERVER 'rm -f /root/mariadb-columnstore-*.$PKGTYPE'\n"
|
||||
if { $PASSWORD != "ssh" } {
|
||||
set timeout 30
|
||||
expect {
|
||||
"word: " { send "$PASSWORD\n" }
|
||||
"passphrase" { send "$PASSWORD\n" }
|
||||
}
|
||||
}
|
||||
expect {
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
"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 { }
|
||||
}
|
||||
set timeout 30
|
||||
send "scp -v $HOME/mariadb-columnstore*$VERSION*$PKGTYPE $USERNAME@$SERVER:.\n"
|
||||
if { $PASSWORD != "ssh"} {
|
||||
set timeout 30
|
||||
expect {
|
||||
"word: " { send "$PASSWORD\n" }
|
||||
"passphrase" { send "$PASSWORD\n" }
|
||||
}
|
||||
}
|
||||
set timeout 180
|
||||
expect {
|
||||
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
"Exit status 1" { send_user "ERROR: scp failed" ; exit 1 }
|
||||
timeout { }
|
||||
}
|
||||
send_user "\n"
|
||||
|
||||
#
|
||||
if { $INSTALLTYPE == "initial"} {
|
||||
#
|
||||
# install package
|
||||
#
|
||||
send_user "Install MariaDB Columnstore Packages on Module "
|
||||
|
||||
send "ssh -v $USERNAME@$SERVER '$PKGINSTALL '\n"
|
||||
if { $PASSWORD != "ssh" } {
|
||||
set timeout 30
|
||||
expect {
|
||||
"word: " { send "$PASSWORD\n" }
|
||||
"passphrase" { send "$PASSWORD\n" }
|
||||
}
|
||||
}
|
||||
set timeout 180
|
||||
expect {
|
||||
"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 }
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
timeout { }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
send_user "\n"
|
||||
send_user "Start ColumnStore service "
|
||||
send " \n"
|
||||
send date\n
|
||||
send "ssh -v $USERNAME@$SERVER '$INSTALLDIR/bin/columnstore restart'\n"
|
||||
set timeout 10
|
||||
expect {
|
||||
"word: " { send "$PASSWORD\n" }
|
||||
"passphrase" { send "$PASSWORD\n" }
|
||||
}
|
||||
set timeout 60
|
||||
# check return
|
||||
expect {
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
"No such file" { send_user "ERROR: post-install Not Found\n" ; exit 1 }
|
||||
"MariaDB Columnstore syslog logging not working" { send_user "ERROR: MariaDB Columnstore 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 }
|
||||
"Starting MariaDB" { send_user "DONE" }
|
||||
timeout { }
|
||||
}
|
||||
send_user "\n"
|
||||
|
||||
if { $AMAZONINSTALL == "1" } {
|
||||
#
|
||||
# copy over customer OS files
|
||||
#
|
||||
send_user "Copy MariaDB Columnstore OS files to Module "
|
||||
send " \n"
|
||||
send date\n
|
||||
send "scp -v -r $INSTALLDIR/local/etc $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 {
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
-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 }
|
||||
timeout { }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
send_user "\nInstallation Successfully Completed on '$MODULE'\n"
|
||||
exit 0
|
||||
|
@ -1,490 +0,0 @@
|
||||
#!/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=`whoami 2>/dev/null`
|
||||
|
||||
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
|
||||
installdirTmp="`echo $arg | awk -F= '{print $2}'`"
|
||||
if [ $installdirTmp == $installdir ] ; then
|
||||
user=root
|
||||
export COLUMNSTORE_INSTALL_DIR=$installdir
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib
|
||||
else
|
||||
installdir=$installdirTmp
|
||||
prefix=`dirname $installdir`
|
||||
prefix=`dirname $prefix`
|
||||
fi
|
||||
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: invalid unknown argument: $arg" 1>&2
|
||||
echo "exiting..."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $user != "root" ]; then
|
||||
export COLUMNSTORE_INSTALL_DIR=$installdir
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib
|
||||
else
|
||||
# add library config file
|
||||
/bin/cp -f $installdir/bin/columnstore.conf /etc/ld.so.conf.d/. >/dev/null 2>&1
|
||||
ldconfig >/dev/null 2>&1
|
||||
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 @ENGINE_SYSCONFDIR@/columnstore/Columnstore.xml ]; then
|
||||
echo "@ENGINE_SYSCONFDIR@/columnstore/Columnstore.xml not found, exiting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd $installdir/lib || exit 1
|
||||
|
||||
touch /dev/shm/columnstore-test && rm /dev/shm/columnstore-test
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "User $user will need R/W access to /dev/shm."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#remove libudfsdk.so.1.0.0 file, if it exist # mcol-875
|
||||
rm -f $installdir/lib/libudfsdk.so
|
||||
rm -f $installdir/lib/libudfsdk.so.1
|
||||
rm -f $installdir/lib/libudfsdk.so.1.0.0
|
||||
|
||||
for lib in *.so.1.0.0; do
|
||||
blib=`basename $lib .1.0.0`
|
||||
ln -sf $lib $blib
|
||||
ln -sf $lib ${blib}.1
|
||||
done
|
||||
for lib in *.so.1.1.0; do
|
||||
blib=`basename $lib .1.1.0`
|
||||
ln -sf $lib $blib
|
||||
ln -sf $lib ${blib}.1
|
||||
done
|
||||
chown -h $user.$user *.so >/dev/null 2>&1
|
||||
|
||||
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
|
||||
|
||||
# softlink for libperl.sp, used by cplogger
|
||||
ln -s /usr/lib64/perl5/CORE/libperl.so /usr/lib64/libperl.so >/dev/null 2>&1
|
||||
|
||||
if [ $installdir != "/usr/local/mariadb/columnstore" ]; then
|
||||
sed -i -e s@/usr/local/mariadb/columnstore@$installdir@g $installdir/bin/columnstoreAlias
|
||||
fi
|
||||
|
||||
if [ $user != "root" ]; then
|
||||
if [ -f $prefix/.bash_profile ]; then
|
||||
profileFile=$prefix/.bash_profile
|
||||
elif [ -f $prefix/.profile ]; then
|
||||
profileFile=$prefix/.profile
|
||||
else
|
||||
profileFile=$prefix/.bashrc
|
||||
touch $prefix/.bashrc
|
||||
fi
|
||||
|
||||
if [ ! -f ${profileFile}_backup ]; then
|
||||
cp $profileFile ${profileFile}_backup
|
||||
fi
|
||||
|
||||
egrep -qs 'MariaDB Columnstore Non-Root Environment Variables' ${profileFile}
|
||||
rc1=$?
|
||||
if [ $rc1 -ne 0 ]; then
|
||||
echo " " >> ${profileFile}
|
||||
echo "# MariaDB Columnstore Non-Root Environment Variables" >> ${profileFile}
|
||||
echo "export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR" >> ${profileFile}
|
||||
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$COLUMNSTORE_INSTALL_DIR/lib" >> ${profileFile}
|
||||
fi
|
||||
|
||||
egrep -qs 'MariaDB Columnstore Non-Root Alias Variables' ${profileFile}
|
||||
rc1=$?
|
||||
if [ $rc1 -ne 0 ]; then
|
||||
echo " " >> ${profileFile}
|
||||
echo "# MariaDB Columnstore Non-Root Alias Variables" >> ${profileFile}
|
||||
cat $installdir/bin/columnstoreAlias >> ${profileFile}
|
||||
fi
|
||||
|
||||
#source the file
|
||||
. ${profileFile}
|
||||
else
|
||||
profileFile="/etc/profile.d/columnstoreAlias.sh"
|
||||
/bin/cp -f $installdir/bin/columnstoreAlias /etc/profile.d/columnstoreAlias.sh
|
||||
chmod 644 /etc/profile.d/columnstoreAlias.sh >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
# set Profile File in config file
|
||||
$installdir/bin/setConfig -d Installation ProfileFile $profileFile
|
||||
|
||||
# create directories
|
||||
if [ $user == "root" ]; then
|
||||
test -d /var/log/mariadb || mkdir /var/log/mariadb >/dev/null 2>&1
|
||||
test -d /var/log/mariadb/columnstore || mkdir /var/log/mariadb/columnstore >/dev/null 2>&1
|
||||
test -d /var/log/mariadb/columnstore/archive || mkdir /var/log/mariadb/columnstore/archive >/dev/null 2>&1
|
||||
test -d /var/log/mariadb/columnstore/corefiles || mkdir /var/log/mariadb/columnstore/corefiles >/dev/null 2>&1
|
||||
test -d /var/log/mariadb/columnstore/trace || mkdir /var/log/mariadb/columnstore/trace >/dev/null 2>&1
|
||||
test -h /var/log/mariadb/columnstore/data && rm -f /var/log/mariadb/columnstore/data
|
||||
chmod 755 /var/log/mariadb/columnstore/corefiles > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
# make sure trace dir is world-writable and sticky
|
||||
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 @ENGINE_SYSCONFDIR@/columnstore > /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
|
||||
|
||||
#get temp base directory
|
||||
tmpDir="/tmp"
|
||||
if [ $user != "root" ]; then
|
||||
tmpDir=$HOME"/.tmp"
|
||||
mkdir $tmpDir >/dev/null 2>&1
|
||||
else
|
||||
#get columnstore temp file directory name
|
||||
TempFileDir=`$installdir/bin/getConfig SystemConfig TempFileDir`
|
||||
tmpDir=${tmpDir}${TempFileDir}
|
||||
mkdir $tmpDir >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
#set base columnstore temp file directory
|
||||
$installdir/bin/setConfig -d SystemConfig SystemTempFileDir $tmpDir
|
||||
|
||||
#get place file buffer temporary files
|
||||
hdfsRdwrScratch=`$installdir/bin/getConfig SystemConfig hdfsRdwrScratch`
|
||||
hdfsDir=${tmpDir}${hdfsRdwrScratch}
|
||||
|
||||
#create place file buffer temporary files
|
||||
mkdir -p $hdfsDir >/dev/null 2>&1
|
||||
|
||||
#create mount directories
|
||||
mkdir /mnt/tmp > /dev/null 2>&1
|
||||
|
||||
# delete Columnstore shared memory segments
|
||||
$installdir/bin/clearShm > /dev/null 2>&1
|
||||
|
||||
#check and create rc.local file if missing
|
||||
if [ -f /etc/rc.d ]; then
|
||||
RCFILE=/etc/rc.d/rc.local
|
||||
else
|
||||
RCFILE=/etc/rc.local
|
||||
fi
|
||||
|
||||
if [ $user = "root" ]; then
|
||||
touch $RCFILE
|
||||
chmod +x $RCFILE
|
||||
else
|
||||
printf '%s\n' '#!/bin/bash' "#" | tee -a $RCFILE > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [ $user = "root" ]; then
|
||||
#setup the columnstore service script
|
||||
rm -f /etc/init.d/columnstore >/dev/null 2>&1
|
||||
rm -f /etc/init.d/mysql-Columnstore >/dev/null 2>&1
|
||||
rm -f /etc/default/columnstore
|
||||
|
||||
systemctl=`which systemctl 2>/dev/null`
|
||||
if [ -n "$systemctl" ]; then
|
||||
|
||||
chmod 644 $installdir/bin/columnstore.service
|
||||
cp $installdir/bin/columnstore.service /usr/lib/systemd/system/. >/dev/null 2>&1
|
||||
cp $installdir/bin/columnstore.service /lib/systemd/system/. >/dev/null 2>&1
|
||||
systemctl enable columnstore >/dev/null 2>&1
|
||||
else
|
||||
chkconfig=`which chkconfig 2>/dev/null`
|
||||
if [ -n "$chkconfig" ]; then
|
||||
|
||||
cp $installdir/bin/columnstore /etc/init.d/. >/dev/null 2>&1
|
||||
chkconfig --add columnstore > /dev/null 2>&1
|
||||
chkconfig columnstore on > /dev/null 2>&1
|
||||
else
|
||||
cp $installdir/bin/columnstore /etc/init.d/. >/dev/null 2>&1
|
||||
updaterc=`which update-rc.d 2>/dev/null`
|
||||
if [ -n "$updaterc" ]; then
|
||||
|
||||
update-rc.d columnstore defaults 99 > /dev/null 2>&1
|
||||
else
|
||||
echo ""
|
||||
echo "Package 'systemctl', 'chkconfig' or 'update-rc.d' not installed, contact your sysadmin if you want to setup to autostart for columnstore"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $user = "root" ]; then
|
||||
$installdir/bin/syslogSetup.sh install > $tmpDir/syslog_install.log 2>&1
|
||||
|
||||
#check if MariaDB Columnstore system logging was setup
|
||||
cat $tmpDir/syslog_install.log | grep 'No System Logging' >/dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
cat $tmpDir/syslog_install.log
|
||||
fi
|
||||
else
|
||||
sed -i -e s@/usr/local/mariadb/columnstore@$installdir@g $installdir/bin/columnstoreLogRotate
|
||||
|
||||
sed -i -e s@prefix=/home/guest@prefix=$prefix@g $installdir/bin/*
|
||||
|
||||
chown $user:$user @ENGINE_SYSCONFDIR@/columnstore/Columnstore.xml
|
||||
|
||||
cat <<EOD
|
||||
|
||||
NOTE: For non-root install, you will need to run the following commands as root user to
|
||||
setup the MariaDB ColumnStore System Logging
|
||||
|
||||
export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
|
||||
$installdir/bin/syslogSetup.sh --installdir=$installdir --user=$user install
|
||||
|
||||
|
||||
EOD
|
||||
fi
|
||||
|
||||
#determine lock file directory
|
||||
|
||||
# Lock directory for root user
|
||||
lockdir='/var/lock/subsys'
|
||||
if [ $user != "root" ];then
|
||||
# Lock directory for non-root user
|
||||
lockdir=$prefix/.lock
|
||||
fi
|
||||
|
||||
$installdir/bin/setConfig -d Installation LockFileDirectory $lockdir
|
||||
|
||||
mkdir $lockdir >/dev/null 2>&1
|
||||
|
||||
rm -f $lockdir/mysql-Columnstore
|
||||
rm -f $lockdir/columnstore
|
||||
|
||||
#backup copy of Alarm Config File
|
||||
/bin/cp -f @ENGINE_SYSCONFDIR@/columnstore/AlarmConfig.xml @ENGINE_SYSCONFDIR@/columnstore/AlarmConfig.xml.installSave > /dev/null 2>&1
|
||||
|
||||
#check and get amazon env variables
|
||||
aws=`which aws 2>/dev/null`
|
||||
if [ -z "aws" ]; then
|
||||
$installdir/bin/MCSgetCredentials.sh >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
#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 <<EOD
|
||||
The next steps are:
|
||||
|
||||
If installation on pm1:
|
||||
|
||||
export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
|
||||
$installdir/bin/postConfigure -i $installdir
|
||||
|
||||
If installing on a node other than pm1:
|
||||
|
||||
export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
|
||||
$installdir/bin/columnstore start
|
||||
|
||||
EOD
|
||||
else
|
||||
cat <<EOD
|
||||
The next step is:
|
||||
|
||||
If installation on pm1:
|
||||
|
||||
$installdir/bin/postConfigure
|
||||
|
||||
If installing on a node other than pm1:
|
||||
|
||||
$installdir/bin/columnstore start
|
||||
|
||||
|
||||
EOD
|
||||
fi
|
||||
exit 0
|
||||
else
|
||||
chmod 755 $installdir/bin/setenv-hdfs-12
|
||||
chmod 755 $installdir/bin/setenv-hdfs-20
|
||||
|
||||
. $installdir/bin/setenv-hdfs-20
|
||||
$installdir/bin/hdfsCheck $installdir/lib/hdfs-20.so > $tmpDir/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 <<EOD
|
||||
|
||||
If you are intending to install MariaDB Columnstore over Hadoop, the next steps are:
|
||||
|
||||
If installing on a pm1 node:
|
||||
|
||||
export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
|
||||
. $installdir/bin/setenv-hdfs-20
|
||||
$installdir/bin/postConfigure -i $installdir
|
||||
|
||||
If installing on a node other than pm1:
|
||||
|
||||
export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
|
||||
$installdir/bin/columnstore start
|
||||
|
||||
If you are intending to install MariaDB Columnstore without Hadoop, the next steps are:
|
||||
|
||||
If installing on a pm1 node:
|
||||
|
||||
export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
|
||||
$installdir/bin/postConfigure -i $installdir
|
||||
|
||||
If installing on a node other than pm1:
|
||||
|
||||
export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
|
||||
$installdir/bin/columnstore start
|
||||
|
||||
EOD
|
||||
else
|
||||
cat <<EOD
|
||||
|
||||
If you are intending to install MariaDB Columnstore over Hadoop, the next steps are:
|
||||
|
||||
. $installdir/bin/setenv-hdfs-20
|
||||
$installdir/bin/postConfigure
|
||||
|
||||
If installing on a node other than pm1:
|
||||
|
||||
. $installdir/bin/setenv-hdfs-20
|
||||
$installdir/bin/columnstore start
|
||||
|
||||
If you are intending to install MariaDB Columnstore without Hadoop, the next step is:
|
||||
|
||||
If installing on a pm1 node:
|
||||
|
||||
$installdir/bin/postConfigure
|
||||
|
||||
If installing on a node other than pm1:
|
||||
|
||||
$installdir/bin/columnstore start
|
||||
|
||||
EOD
|
||||
fi
|
||||
else
|
||||
. $installdir/bin/setenv-hdfs-12
|
||||
$installdir/bin/hdfsCheck $installdir/lib/hdfs-12.so > $tmpDir/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 <<EOD
|
||||
|
||||
If you are intending to install MariaDB Columnstore over Hadoop, the next steps are:
|
||||
|
||||
If installing on a pm1 node:
|
||||
|
||||
export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
|
||||
. $installdir/bin/setenv-hdfs-12
|
||||
$installdir/bin/postConfigure -i $installdir
|
||||
|
||||
If you are intending to install MariaDB Columnstore without Hadoop, the next steps are:
|
||||
|
||||
If installing on a pm1 node:
|
||||
|
||||
export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
|
||||
. $installdir/bin/setenv-hdfs-12
|
||||
$installdir/bin/postConfigure -i $installdir
|
||||
|
||||
EOD
|
||||
else
|
||||
cat <<EOD
|
||||
|
||||
If you are intending to install MariaDB Columnstore over Hadoop, the next steps are:
|
||||
|
||||
If installing on a pm1 node:
|
||||
|
||||
. $installdir/bin/setenv-hdfs-12
|
||||
$installdir/bin/postConfigure
|
||||
|
||||
If installing on a node other than pm1:
|
||||
|
||||
. $installdir/bin/setenv-hdfs-12
|
||||
$installdir/bin/columnstore start
|
||||
|
||||
If you are intending to install MariaDB Columnstore without Hadoop, the next step is:
|
||||
|
||||
If installing on a pm1 node:
|
||||
|
||||
$installdir/bin/postConfigure
|
||||
|
||||
If installing on a node other than pm1:
|
||||
|
||||
$installdir/bin/columnstore start
|
||||
|
||||
EOD
|
||||
fi
|
||||
else
|
||||
cat <<EOD
|
||||
|
||||
If you are intending to install MariaDB Columnstore over Hadoop, the Hadoop sanity check did not pass.
|
||||
Most likely there is an environment setup conflict or the hdfs services are down.
|
||||
Please Contact MariaDB Columnstore Customer Support.
|
||||
EOD
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
@ -11,7 +11,7 @@ checkForError() {
|
||||
if [ `cat ${tmpdir}/error.check | wc -c` -ne 0 ]; then
|
||||
echo "MySQL Password file missing or incorrect, check .my.cnf file"
|
||||
rm -f ${tmpdir}/error.check
|
||||
$installdir/mysql/mysql-Columnstore stop
|
||||
mysql-Columnstore stop
|
||||
sleep 2
|
||||
exit 2;
|
||||
fi
|
||||
@ -40,20 +40,12 @@ checkForError() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
prefix=/usr/local
|
||||
installdir=$prefix/mariadb/columnstore
|
||||
rpmmode=install
|
||||
tmpdir="/tmp"
|
||||
|
||||
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
|
||||
if [ $(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" : '--tmpdir=') -eq 9 ]; then
|
||||
tmpdir="$(echo $arg | awk -F= '{print $2}')"
|
||||
else
|
||||
@ -61,39 +53,26 @@ for arg in "$@"; do
|
||||
fi
|
||||
done
|
||||
|
||||
USER=`whoami 2>/dev/null`
|
||||
if [ $USER != "root" ]; then
|
||||
ldconfig >/dev/null 2>&1
|
||||
export COLUMNSTORE_INSTALL_DIR=$installdir
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$COLUMNSTORE_INSTALL_DIR/lib
|
||||
else
|
||||
ldconfig
|
||||
fi
|
||||
|
||||
if [ $installdir != "/usr/local/mariadb/columnstore" ]; then
|
||||
sed -i -e s@/usr/local/mariadb/columnstore@$installdir@g /etc/my.cnf.d/columnstore.cnf
|
||||
fi
|
||||
|
||||
if [ -x $installdir/mysql/mysql-Columnstore ]; then
|
||||
if [ -x mysql-Columnstore ]; then
|
||||
|
||||
# Restart in the same way that mysqld will be started normally.
|
||||
$installdir/mysql/mysql-Columnstore stop >/dev/null 2>&1
|
||||
mysql-Columnstore stop >/dev/null 2>&1
|
||||
sleep 2
|
||||
$installdir/mysql/mysql-Columnstore start --skip-grant-tables
|
||||
mysql-Columnstore start --skip-grant-tables
|
||||
|
||||
sleep 5
|
||||
|
||||
# Install various Calpont stuff...
|
||||
$installdir/mysql/install_mcs_mysql.sh --installdir=$installdir --tmpdir=$tmpdir
|
||||
install_mcs_mysql.sh --tmpdir=$tmpdir
|
||||
checkForError
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Invalid password in .my.cnf, or Columnstore plugin install missing"
|
||||
$installdir/mysql/mysql-Columnstore stop
|
||||
mysql-Columnstore stop
|
||||
sleep 2
|
||||
exit 2;
|
||||
fi
|
||||
|
||||
$installdir/mysql/mysql-Columnstore stop
|
||||
mysql-Columnstore stop
|
||||
|
||||
fi
|
||||
|
||||
|
@ -4,9 +4,6 @@
|
||||
#
|
||||
# Post-install steps for columnstore-mysql install
|
||||
|
||||
prefix=/usr/local
|
||||
installdir=$prefix/mariadb/columnstore
|
||||
rpmmode=install
|
||||
user=mysql
|
||||
tmpdir="/tmp"
|
||||
|
||||
@ -19,15 +16,7 @@ if [ $EUID -ne 0 ]; then
|
||||
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
|
||||
if [ `expr -- "$arg" : '--user='` -eq 7 ]; then
|
||||
user="`echo $arg | awk -F= '{print $2}'`"
|
||||
elif [ $(expr -- "$arg" : '--password=') -eq 11 ]; then
|
||||
password="$(echo $arg | awk -F= '{print $2}')"
|
||||
|
@ -13,7 +13,6 @@ set PASSWORD " "
|
||||
set CONFIGFILE " "
|
||||
set DEBUG 0
|
||||
set USERNAME "root"
|
||||
set INSTALLDIR "/usr/local/mariadb/columnstore"
|
||||
|
||||
spawn -noecho /bin/bash
|
||||
|
||||
@ -47,9 +46,6 @@ while true {
|
||||
set CONFIGFILE $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)
|
||||
@ -76,7 +72,7 @@ send_user "\nPerforming Calpont RPM System Install\n\n"
|
||||
#
|
||||
send_user "Stop Calpont System "
|
||||
expect -re "# "
|
||||
send "$INSTALLDIR/bin/mcsadmin stopSystem INSTALL y\n"
|
||||
send "mcsadmin stopSystem INSTALL y\n"
|
||||
expect {
|
||||
-re "# " { send_user "DONE" }
|
||||
-re "**** stopSystem Failed" { send_user "INFO: System not running" }
|
||||
@ -122,7 +118,7 @@ set timeout 380
|
||||
# Run installer
|
||||
#
|
||||
send_user "Run System Installer "
|
||||
send "$INSTALLDIR/bin/installer $RPMPACKAGE initial $PASSWORD n 0\n"
|
||||
send "columnstore_installer $RPMPACKAGE initial $PASSWORD n 0\n"
|
||||
expect {
|
||||
-re "reboot request successful" { }
|
||||
-re "error" { send_user "FAILED" ; exit -1 }
|
||||
|
@ -1,167 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# $Id: post-uninstall 421 2007-04-05 15:46:55Z dhill $
|
||||
#
|
||||
# pre-uninstall steps for columnstore install
|
||||
|
||||
prefix=/usr/local
|
||||
installdir=$prefix/mariadb/columnstore
|
||||
rpmmode=install
|
||||
user=`whoami 2>/dev/null`
|
||||
|
||||
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`
|
||||
prefix=`dirname $prefix`
|
||||
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 "pre-install: invalid unknown argument: $arg" 1>&2
|
||||
echo "exiting..."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
#stop services
|
||||
$installdir/bin/columnstore stop > /dev/null 2>&1
|
||||
$installdir/myql/columnstore-Mysql stop > /dev/null 2>&1
|
||||
|
||||
if [ $user != "root" ]; then
|
||||
export COLUMNSTORE_INSTALL_DIR=$installdir
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib
|
||||
fi
|
||||
|
||||
cloud=`$installdir/bin/getConfig Installation Cloud`
|
||||
if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then
|
||||
if test -f /etc/fstab ; then
|
||||
sed -i '/Columnstore\/data/d' /etc/fstab > /dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
|
||||
#remove profile file
|
||||
if [ $user != "root" ]; then
|
||||
if [ -f $prefix/.bash_profile ]; then
|
||||
profileFile=$prefix/.bash_profile
|
||||
elif [ -f $prefix/.profile ]; then
|
||||
profileFile=$prefix/.profile
|
||||
else
|
||||
profileFile=$prefix/.bashrc
|
||||
touch $prefix/.bashrc
|
||||
fi
|
||||
|
||||
if [ -f ${profileFile}_backup ] ; then
|
||||
mv -f ${profileFile}_backup $profileFile
|
||||
fi
|
||||
else
|
||||
rm -f /etc/profile.d/columnstoreAlias.sh
|
||||
fi
|
||||
|
||||
#remove log file directories
|
||||
if [ $user == "root" ]; then
|
||||
rm -f /var/log/mariadb/columnstore/activeAlarms > /dev/null 2>&1
|
||||
rm -f /var/log/mariadb/columnstore/*.log1 > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
# delete Mariab Columnstore shared memory segments
|
||||
$installdir/bin/clearShm > /dev/null 2>&1
|
||||
|
||||
#get temp directory
|
||||
tmpDir=`$installdir/bin/getConfig SystemConfig SystemTempFileDir`
|
||||
if [[ $tmpDir = *"tmp" ]]; then
|
||||
# delete tmp files
|
||||
rm -rf $tmpDir/*
|
||||
fi
|
||||
rm -f $installdir/local/*.columnstore
|
||||
rm -rf $installdir/local/etc/
|
||||
rm -f $installdir/data/bulk/tmp/job/* >/dev/null 2>&1
|
||||
rm -f $installdir/local/moveDbrootTransactionLog
|
||||
|
||||
lockdir=`$installdir/bin/getConfig Installation LockFileDirectory`
|
||||
rm -f $lockdir/columnstore
|
||||
rm -f $lockdir/mysql-Columnstore
|
||||
|
||||
# delete core files
|
||||
#rm -f /var/log/mariadb/columnstore/corefiles/* > /dev/null 2>&1
|
||||
|
||||
#uninstall MariaDB Columnstore system logging
|
||||
if [ -x $installdir/bin/syslogSetup.sh ]; then
|
||||
if [ $user = "root" ]; then
|
||||
$installdir/bin/syslogSetup.sh uninstall >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
|
||||
#remove the start service command
|
||||
if [ $user = "root" ]; then
|
||||
systemctl=`which systemctl 2>/dev/null`
|
||||
if [ -n "$systemctl" ]; then
|
||||
|
||||
systemctl disable columnstore >/dev/null 2>&1
|
||||
rm -f /usr/lib/systemd/system/columnstore.service
|
||||
rm -f /lib/systemd/system/columnstore.service
|
||||
else
|
||||
chkconfig=`which chkconfig 2>/dev/null`
|
||||
if [ -n "$chkconfig" ]; then
|
||||
|
||||
chkconfig columnstore off > /dev/null 2>&1
|
||||
chkconfig --del columnstore > /dev/null 2>&1
|
||||
rm -f /etc/init.d/columnstore > /dev/null 2>&1
|
||||
else
|
||||
updaterc=`which update-rc.d 2>/dev/null`
|
||||
if [ -n "$updaterc" ]; then
|
||||
|
||||
update-rc.d -f columnstore remove > /dev/null 2>&1
|
||||
rm -f /etc/init.d/columnstore > /dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $quiet != 1 ]; then
|
||||
#make copy of Columnstore.xml
|
||||
/bin/cp -f @ENGINE_SYSCONFDIR@/columnstore/Columnstore.xml @ENGINE_SYSCONFDIR@/columnstore/Columnstore.xml.rpmsave > /dev/null 2>&1
|
||||
/bin/cp -f /etc/my.cnf.d/columnstore.cnf /etc/my.cnf.d/columnstore.cnf.rpmsave > /dev/null 2>&1
|
||||
cp $installdir/bin/myCnf-include-args.text $installdir/bin/myCnf-include-args.text.rpmsave >& /dev/null
|
||||
rm -f @ENGINE_SYSCONFDIR@/columnstore/AlarmConfig.xml.installSave
|
||||
fi
|
||||
|
||||
#remove OAMdbrootCheck file
|
||||
rm -f $installdir/data*/OAMdbrootCheck > /dev/null 2>&1
|
||||
|
||||
#remove library paths
|
||||
if [ $user = "root" ]; then
|
||||
rm -f /etc/ld.so.conf.d/columnstore.conf
|
||||
ldconfig
|
||||
else
|
||||
rm -f /etc/default/columnstore
|
||||
|
||||
cat <<EOD
|
||||
|
||||
NOTE: For non-root install, you will need to run the following commands as root user to
|
||||
uninstall the MariaDB ColumnStore System Logging. This can be skipped if
|
||||
running this script as part of an upgrade
|
||||
|
||||
export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
|
||||
$installdir/bin/syslogSetup.sh --installdir=$installdir --user=$user uninstall
|
||||
|
||||
|
||||
EOD
|
||||
|
||||
fi
|
||||
|
||||
#tell user to run post configure script
|
||||
echo " "
|
||||
echo "Mariab Columnstore uninstall completed"
|
||||
|
||||
exit 0
|
||||
|
@ -1,100 +0,0 @@
|
||||
#!/usr/bin/expect
|
||||
#
|
||||
# $Id: remote_installer.sh 2925 2012-05-24 18:58:17Z dhill $
|
||||
#
|
||||
# Remote Install RPM and custom OS files from postConfigure script
|
||||
# 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 - 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 PASSWORD [lindex $argv 2]
|
||||
set RPMPACKAGE [lindex $argv 3]
|
||||
set DEBUG [lindex $argv 4]
|
||||
log_user $DEBUG
|
||||
spawn -noecho /bin/bash
|
||||
#
|
||||
# erase package
|
||||
#
|
||||
send_user "Perform Old Calpont Package erased from Module"
|
||||
expect -re "# "
|
||||
send "ssh $USERNAME@$SERVER ' rpm -e --nodeps calpont'\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 "uninstall completed" { send_user " DONE" }
|
||||
-re "# " { send_user " DONE" }
|
||||
-re "not installed" { send_user " FAILED: Package not installed" }
|
||||
-re "Failed dependencies" { send_user " FAILED: Failed dependencies\n" ; exit }
|
||||
-re "Permission denied" { send_user " FAILED: Invalid password\n" ; exit }
|
||||
}
|
||||
send_user "\n"
|
||||
#
|
||||
# send the package
|
||||
#
|
||||
send_user "Copy New Calpont Package to Module"
|
||||
send "scp $RPMPACKAGE $USERNAME@$SERVER:$RPMPACKAGE\n"
|
||||
expect -re "word: "
|
||||
# send the password
|
||||
send "$PASSWORD\n"
|
||||
# check return
|
||||
expect {
|
||||
-re "100%" { send_user " DONE" }
|
||||
-re "# " { 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"
|
||||
#sleep to make sure it's finished
|
||||
sleep 5
|
||||
#
|
||||
# install package
|
||||
#
|
||||
set timeout 30
|
||||
send_user "Perform New Calpont Package install on Module"
|
||||
send "ssh $USERNAME@$SERVER ' rpm -ivh $RPMPACKAGE'\n"
|
||||
expect -re "word: "
|
||||
# password for ssh
|
||||
send "$PASSWORD\n"
|
||||
# check return
|
||||
expect {
|
||||
-re "completed" { send_user " DONE" }
|
||||
-re "# " { send_user " DONE" }
|
||||
-re "Failed dependencies" { send_user " FAILED: Failed dependencies\n" ;
|
||||
send_user "\n*** Installation Failed\n" ;
|
||||
exit }
|
||||
-re "error" { send_user " FAILED\n" ;
|
||||
send_user "\n*** Installation Failed\n" ;
|
||||
exit }
|
||||
-re "Permission denied" { send_user " FAILED: Invalid password\n" ; exit }
|
||||
}
|
||||
set timeout 10
|
||||
send_user "\n"
|
||||
#
|
||||
# copy over custom OS files
|
||||
#
|
||||
send_user "Copy Custom OS files to Module"
|
||||
send "scp /usr/local/mariadb/columnstore/local/etc/$MODULE/* $USERNAME@$SERVER:/etc/.\n"
|
||||
expect -re "word: "
|
||||
# send the password
|
||||
send "$PASSWORD\n"
|
||||
expect {
|
||||
-re "# " { send_user " DONE" }
|
||||
-re "Permission denied" { send_user " FAILED: Invalid password\n" ; exit }
|
||||
}
|
||||
#
|
||||
send_user "\n!!!Installation Successfully Completed!!!\n"
|
||||
exit
|
||||
|
@ -8,7 +8,6 @@
|
||||
# Argument 3 - Debug flag 1 for on, 0 for off
|
||||
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
|
||||
|
@ -17,17 +17,9 @@ checkForError() {
|
||||
rm -f ${tmpdir}/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" : '--installdir='` -eq 13 ]; then
|
||||
installdir="`echo $arg | awk -F= '{print $2}'`"
|
||||
prefix=`dirname $installdir`
|
||||
elif [ `expr -- "$arg" : '--masteripaddr='` -eq 15 ]; then
|
||||
if [ `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}'`"
|
||||
@ -40,7 +32,7 @@ for arg in "$@"; do
|
||||
fi
|
||||
done
|
||||
|
||||
test -f $installdir/post/functions && . $installdir/post/functions
|
||||
. @ENGINE_SUPPORTDIR@/columnstore_functions
|
||||
|
||||
repUser="idbrep"
|
||||
password="Calpont1"
|
@ -1,54 +0,0 @@
|
||||
#!/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
|
||||
|
||||
USER=`whoami 2>/dev/null`
|
||||
|
||||
if [ $USER != "root" ]; then
|
||||
prefix=$HOME
|
||||
fi
|
||||
|
||||
if [ $USER != "root" ]; then
|
||||
if [ -f $prefix/.bash_profile ]; then
|
||||
profileFile=$prefix/.bash_profile
|
||||
elif [ -f $prefix/.profile ]; then
|
||||
profileFile=$prefix/.profile
|
||||
else
|
||||
profileFile=$prefix/.bashrc
|
||||
fi
|
||||
|
||||
. $profileFile
|
||||
fi
|
||||
|
||||
# Source function library.
|
||||
if [ -f /etc/init.d/functions ]; then
|
||||
. /etc/init.d/functions
|
||||
fi
|
||||
|
||||
if [ -z "$COLUMNSTORE_INSTALL_DIR" ]; then
|
||||
COLUMNSTORE_INSTALL_DIR=/usr/local/mariadb/columnstore
|
||||
fi
|
||||
|
||||
export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR
|
||||
test -f $COLUMNSTORE_INSTALL_DIR/post/functions && . $COLUMNSTORE_INSTALL_DIR/post/functions
|
||||
|
||||
for testScript in $COLUMNSTORE_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
|
||||
|
31
oam/install_scripts/startupTests.sh.in
Executable file
31
oam/install_scripts/startupTests.sh.in
Executable file
@ -0,0 +1,31 @@
|
||||
#!/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
|
||||
|
||||
# Source function library.
|
||||
if [ -f /etc/init.d/functions ]; then
|
||||
. /etc/init.d/functions
|
||||
fi
|
||||
|
||||
. @ENGINE_SUPPORTDIR@/columnstore_functions
|
||||
|
||||
for testScript in @ENGINE_SUPPORTDIR@/mcstest*.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
|
||||
|
@ -1,161 +0,0 @@
|
||||
#!/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
|
||||
|
@ -1,12 +0,0 @@
|
||||
#
|
||||
# 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/mariadb/columnstore/bin/transactionLogArchiver.sh
|
||||
|
@ -1,48 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# $Id: transactionLogArchiver.sh 1375 2009-04-30 13:53:06Z rdempsey $
|
||||
|
||||
DATE=`date +'%s'`
|
||||
CDATA=/var/log/mariadb/columnstore/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
|
||||
|
@ -1,260 +0,0 @@
|
||||
#!/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 AMAZONINSTALL [lindex $argv 5]
|
||||
set PKGTYPE [lindex $argv 6]
|
||||
set NODEPS [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 USERNAME "root"
|
||||
set UNM [lindex $argv 10]
|
||||
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 '^mariadb-columnstore')"
|
||||
set PKGERASE1 "rpm -e --nodeps "
|
||||
|
||||
set PKGINSTALL "rpm -ivh $NODEPS --force mariadb-columnstore*$VERSION*rpm"
|
||||
set PKGUPGRADE "rpm -Uvh --noscripts mariadb-columnstore*$VERSION*rpm"
|
||||
} else {
|
||||
if { $PKGTYPE == "deb" } {
|
||||
set PKGERASE "dpkg -P \$(dpkg --get-selections | grep '^mariadb-columnstore')"
|
||||
set PKGERASE1 "dpkg -P "
|
||||
set PKGINSTALL "dpkg -i --force-confnew mariadb-columnstore*$VERSION*deb"
|
||||
set PKGUPGRADE "dpkg -i --force-confnew mariadb-columnstore*$VERSION*deb"
|
||||
} 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 -v $USERNAME@$SERVER 'time'\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" }
|
||||
}
|
||||
}
|
||||
"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 }
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
}
|
||||
send_user "\n"
|
||||
|
||||
send_user "Stop ColumnStore service "
|
||||
send date\n
|
||||
send "ssh -v $USERNAME@$SERVER '$INSTALLDIR/bin/columnstore stop'\n"
|
||||
set timeout 10
|
||||
expect {
|
||||
"word: " { send "$PASSWORD\n" }
|
||||
"passphrase" { send "$PASSWORD\n" }
|
||||
}
|
||||
set timeout 60
|
||||
# check return
|
||||
expect {
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
#"No such file" { send_user "ERROR: post-install Not Found\n" ; exit 1 }
|
||||
"MariaDB Columnstore syslog logging not working" { send_user "ERROR: MariaDB Columnstore 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 }
|
||||
timeout { }
|
||||
}
|
||||
send_user "\n"
|
||||
|
||||
if { $INSTALLTYPE == "initial" || $INSTALLTYPE == "uninstall" } {
|
||||
#
|
||||
# erase MariaDB Columnstore packages
|
||||
#
|
||||
send_user "Erase MariaDB Columnstore Packages on Module "
|
||||
send "ssh -v $USERNAME@$SERVER '$PKGERASE'\n"
|
||||
if { $PASSWORD != "ssh" } {
|
||||
set timeout 30
|
||||
expect {
|
||||
"word: " { send "$PASSWORD\n" }
|
||||
"passphrase" { send "$PASSWORD\n" }
|
||||
}
|
||||
}
|
||||
set timeout 120
|
||||
expect {
|
||||
"error: --purge needs at least one package" { 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 }
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
timeout { }
|
||||
}
|
||||
send_user "\n"
|
||||
}
|
||||
|
||||
if { $INSTALLTYPE == "uninstall" } { exit 0 }
|
||||
|
||||
#
|
||||
# send the MariaDB ColumnStore package
|
||||
#
|
||||
set timeout 30
|
||||
send_user "Copy new MariaDB Columnstore Packages to Module "
|
||||
send "ssh -v $USERNAME@$SERVER 'rm -f /root/mariadb-columnstore-*.$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 {
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
"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 { }
|
||||
}
|
||||
set timeout 30
|
||||
|
||||
send "scp -v $HOME/mariadb-columnstore*$VERSION*$PKGTYPE $USERNAME@$SERVER:.\n"
|
||||
if { $PASSWORD != "ssh" } {
|
||||
set timeout 30
|
||||
expect {
|
||||
"word: " { send "$PASSWORD\n" }
|
||||
"passphrase" { send "$PASSWORD\n" }
|
||||
}
|
||||
}
|
||||
set timeout 120
|
||||
expect {
|
||||
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
"Exit status 1" { send_user "ERROR: scp failed" ;exit 1 }
|
||||
timeout { }
|
||||
}
|
||||
send_user "\n"
|
||||
|
||||
set timeout 30
|
||||
if { $INSTALLTYPE == "initial"} {
|
||||
#
|
||||
# install package
|
||||
#
|
||||
send_user "Install MariaDB ColumnStore Packages on Module "
|
||||
send "ssh -v $USERNAME@$SERVER '$PKGINSTALL '\n"
|
||||
if { $PASSWORD != "ssh" } {
|
||||
set timeout 30
|
||||
expect {
|
||||
"word: " { send "$PASSWORD\n" }
|
||||
"passphrase" { send "$PASSWORD\n" }
|
||||
}
|
||||
}
|
||||
set timeout 180
|
||||
expect {
|
||||
"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 }
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
timeout { }
|
||||
}
|
||||
send_user "\n"
|
||||
}
|
||||
|
||||
send_user "\n"
|
||||
send_user "Start ColumnStore service "
|
||||
send " \n"
|
||||
send date\n
|
||||
send "ssh -v $USERNAME@$SERVER '$INSTALLDIR/bin/columnstore restart'\n"
|
||||
set timeout 10
|
||||
expect {
|
||||
"word: " { send "$PASSWORD\n" }
|
||||
"passphrase" { send "$PASSWORD\n" }
|
||||
}
|
||||
set timeout 60
|
||||
# check return
|
||||
expect {
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
"No such file" { send_user "ERROR: post-install Not Found\n" ; exit 1 }
|
||||
"MariaDB Columnstore syslog logging not working" { send_user "ERROR: MariaDB Columnstore 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 }
|
||||
"Starting MariaDB" { send_user "DONE" }
|
||||
timeout { }
|
||||
}
|
||||
send_user "\n"
|
||||
|
||||
if { $AMAZONINSTALL == "1" } {
|
||||
#
|
||||
# copy over customer OS files
|
||||
#
|
||||
send_user "Copy MariaDB Columnstore OS files to Module "
|
||||
send " \n"
|
||||
send date\n
|
||||
send "scp -v -r $INSTALLDIR/local/etc $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 {
|
||||
"Exit status 0" { send_user "DONE" }
|
||||
-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 }
|
||||
timeout { }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
send_user "\nInstallation Successfully Completed on '$MODULE'\n"
|
||||
exit 0
|
||||
|
@ -105,8 +105,6 @@ void handleControlC(int i)
|
||||
|
||||
Oam::Oam()
|
||||
{
|
||||
InstallDir = startup::StartUp::installDir();
|
||||
|
||||
CalpontConfigFile = std::string(MCSSYSCONFDIR) + "/columnstore/Columnstore.xml";
|
||||
|
||||
AlarmConfigFile = std::string(MCSSYSCONFDIR) + "/columnstore/AlarmConfig.xml";
|
||||
@ -2840,7 +2838,7 @@ oamModuleInfo_t Oam::getModuleInfo()
|
||||
int localModuleID;
|
||||
|
||||
// Get Module Name from module-file
|
||||
string fileName = InstallDir + "/local/module";
|
||||
string fileName = "/etc/columnstore/module";
|
||||
|
||||
ifstream oldFile (fileName.c_str());
|
||||
|
||||
@ -5006,7 +5004,7 @@ string Oam::getWritablePM()
|
||||
********************************************************************/
|
||||
string Oam::getHotStandbyPM()
|
||||
{
|
||||
string fileName = InstallDir + "/local/hotStandbyPM";
|
||||
string fileName = "/var/lib/columnstore/local/hotStandbyPM";
|
||||
string module;
|
||||
|
||||
ifstream oldFile (fileName.c_str());
|
||||
@ -5035,7 +5033,7 @@ string Oam::getHotStandbyPM()
|
||||
********************************************************************/
|
||||
void Oam::setHotStandbyPM(std::string moduleName)
|
||||
{
|
||||
string fileName = InstallDir + "/local/hotStandbyPM";
|
||||
string fileName = "/var/lib/columnstore/local/hotStandbyPM";
|
||||
|
||||
unlink (fileName.c_str());
|
||||
|
||||
@ -6048,7 +6046,7 @@ bool Oam::autoMovePmDbroot(std::string residePM)
|
||||
}
|
||||
|
||||
//store in move dbroot transaction file
|
||||
string fileName = InstallDir + "/local/moveDbrootTransactionLog";
|
||||
string fileName = "/var/lib/columnstore/local/moveDbrootTransactionLog";
|
||||
|
||||
string cmd = "echo '" + residePM + "|" + localModuleName + "|" + itoa(subDBRootID) + "' >> " + fileName;
|
||||
system(cmd.c_str());
|
||||
@ -6177,7 +6175,7 @@ bool Oam::autoMovePmDbroot(std::string residePM)
|
||||
}
|
||||
|
||||
//store in move dbroot transaction file
|
||||
string fileName = InstallDir + "/local/moveDbrootTransactionLog";
|
||||
string fileName = "/var/lib/columnstore/local/moveDbrootTransactionLog";
|
||||
|
||||
string cmd = "echo '" + residePM + "|" + toPM + "|" + itoa(dbrootID) + "' >> " + fileName;
|
||||
system(cmd.c_str());
|
||||
@ -6278,7 +6276,7 @@ bool Oam::autoMovePmDbroot(std::string residePM)
|
||||
}
|
||||
|
||||
//store in move dbroot transaction file
|
||||
string fileName = InstallDir + "/local/moveDbrootTransactionLog";
|
||||
string fileName = "/var/lib/columnstore/local/moveDbrootTransactionLog";
|
||||
|
||||
string cmd = "echo '" + residePM + "|" + toPM + "|" + itoa(dbrootID) + "' >> " + fileName;
|
||||
system(cmd.c_str());
|
||||
@ -6339,7 +6337,7 @@ bool Oam::autoUnMovePmDbroot(std::string toPM)
|
||||
return 1;
|
||||
|
||||
//store in move dbroot transaction file
|
||||
string fileName = InstallDir + "/local/moveDbrootTransactionLog";
|
||||
string fileName = "/var/lib/columnstore/local/moveDbrootTransactionLog";
|
||||
|
||||
ifstream oldFile (fileName.c_str());
|
||||
|
||||
@ -6397,7 +6395,7 @@ bool Oam::autoUnMovePmDbroot(std::string toPM)
|
||||
|
||||
if (!found)
|
||||
{
|
||||
writeLog("No dbroots found in " + InstallDir + "/moveDbrootTransactionLog", LOG_TYPE_DEBUG );
|
||||
writeLog("No dbroots found in /var/lib/columnstore/moveDbrootTransactionLog", LOG_TYPE_DEBUG );
|
||||
|
||||
cout << "No dbroots found in " << fileName << endl;
|
||||
}
|
||||
@ -6780,7 +6778,7 @@ void Oam::addDbroot(const int dbrootNumber, DBRootConfigList& dbrootlist, string
|
||||
for ( ; pt2 != dbrootlist.end() ; pt2++)
|
||||
{
|
||||
string DBrootID = "DBRoot" + itoa(*pt2);
|
||||
string pathID = InstallDir + "/data" + itoa(*pt2);
|
||||
string pathID = "/var/lib/columnstore/data" + itoa(*pt2);
|
||||
|
||||
try
|
||||
{
|
||||
@ -7789,10 +7787,7 @@ void Oam::actionMysqlCalpont(MYSQLCALPONT_ACTION action)
|
||||
return;
|
||||
|
||||
// check if mysql-Columnstore is installed
|
||||
string mysqlscript = InstallDir + "/mysql/mysql-Columnstore";
|
||||
|
||||
if (access(mysqlscript.c_str(), X_OK) != 0)
|
||||
return;
|
||||
string mysqlscript = "mysql-Columnstore";
|
||||
|
||||
string command;
|
||||
|
||||
@ -8189,7 +8184,7 @@ std::string Oam::getEC2InstanceIpAddress(std::string instanceName)
|
||||
{
|
||||
// run script to get Instance status and IP Address
|
||||
string tmplog = tmpdir + "/getCloudIP_" + instanceName;
|
||||
string cmd = InstallDir + "/bin/MCSInstanceCmds.sh getPrivateIP " + instanceName + " > " + tmplog;
|
||||
string cmd = "MCSInstanceCmds.sh getPrivateIP " + instanceName + " > " + tmplog;
|
||||
system(cmd.c_str());
|
||||
|
||||
if (checkLogStatus(tmplog, "stopped") )
|
||||
@ -8228,7 +8223,7 @@ std::string Oam::getEC2LocalInstance(std::string name)
|
||||
{
|
||||
// run script to get Instance status and IP Address
|
||||
string file = tmpdir + "/getInstanceInfo_" + name;
|
||||
string cmd = InstallDir + "/bin/MCSInstanceCmds.sh getInstance > " + file;
|
||||
string cmd = "MCSInstanceCmds.sh getInstance > " + file;
|
||||
int status = system(cmd.c_str());
|
||||
if (WEXITSTATUS(status) == 1 )
|
||||
return "failed";
|
||||
@ -8261,7 +8256,7 @@ std::string Oam::getEC2LocalInstanceType(std::string name)
|
||||
{
|
||||
// run script to get Instance status and IP Address
|
||||
string file = tmpdir + "/getInstanceType_" + name;
|
||||
string cmd = InstallDir + "/bin/MCSInstanceCmds.sh getType > " + file;
|
||||
string cmd = "MCSInstanceCmds.sh getType > " + file;
|
||||
int status = system(cmd.c_str());
|
||||
if (WEXITSTATUS(status) == 1 )
|
||||
return "failed";
|
||||
@ -8294,7 +8289,7 @@ std::string Oam::getEC2LocalInstanceSubnet(std::string name)
|
||||
{
|
||||
// run script to get Instance Subnet
|
||||
string file = tmpdir + "/getInstanceSubnet_" + name;
|
||||
string cmd = InstallDir + "/bin/MCSInstanceCmds.sh getSubnet > " + file;
|
||||
string cmd = "MCSInstanceCmds.sh getSubnet > " + file;
|
||||
int status = system(cmd.c_str());
|
||||
if (WEXITSTATUS(status) == 1 )
|
||||
return "failed";
|
||||
@ -8328,7 +8323,7 @@ std::string Oam::launchEC2Instance( const std::string name, const std::string IP
|
||||
{
|
||||
// run script to get Instance status and IP Address
|
||||
string file = tmpdir + "/getInstance_" + name;
|
||||
string cmd = InstallDir + "/bin/MCSInstanceCmds.sh launchInstance " + IPAddress + " " + type + " " + group + " > " + file;
|
||||
string cmd = "MCSInstanceCmds.sh launchInstance " + IPAddress + " " + type + " " + group + " > " + file;
|
||||
int status = system(cmd.c_str());
|
||||
if (WEXITSTATUS(status) == 1 )
|
||||
return "failed";
|
||||
@ -8371,7 +8366,7 @@ std::string Oam::launchEC2Instance( const std::string name, const std::string IP
|
||||
void Oam::terminateEC2Instance(std::string instanceName)
|
||||
{
|
||||
// run script to get Instance status and IP Address
|
||||
string cmd = InstallDir + "/bin/MCSInstanceCmds.sh terminateInstance " + instanceName + " > " + tmpdir + "/terminateEC2Instance_" + instanceName;
|
||||
string cmd = "MCSInstanceCmds.sh terminateInstance " + instanceName + " > " + tmpdir + "/terminateEC2Instance_" + instanceName;
|
||||
system(cmd.c_str());
|
||||
|
||||
return;
|
||||
@ -8388,7 +8383,7 @@ void Oam::terminateEC2Instance(std::string instanceName)
|
||||
void Oam::stopEC2Instance(std::string instanceName)
|
||||
{
|
||||
// run script to get Instance status and IP Address
|
||||
string cmd = InstallDir + "/bin/MCSInstanceCmds.sh stopInstance " + instanceName + " > " + tmpdir + "/stopEC2Instance_" + instanceName;
|
||||
string cmd = "MCSInstanceCmds.sh stopInstance " + instanceName + " > " + tmpdir + "/stopEC2Instance_" + instanceName;
|
||||
system(cmd.c_str());
|
||||
|
||||
return;
|
||||
@ -8405,7 +8400,7 @@ void Oam::stopEC2Instance(std::string instanceName)
|
||||
bool Oam::startEC2Instance(std::string instanceName)
|
||||
{
|
||||
// run script to get Instance status and IP Address
|
||||
string cmd = InstallDir + "/bin/MCSInstanceCmds.sh startInstance " + instanceName + " > " + tmpdir + "/startEC2Instance_" + instanceName;
|
||||
string cmd = "MCSInstanceCmds.sh startInstance " + instanceName + " > " + tmpdir + "/startEC2Instance_" + instanceName;
|
||||
int ret = system(cmd.c_str());
|
||||
if (WEXITSTATUS(ret) == 1 )
|
||||
return false;
|
||||
@ -8424,7 +8419,7 @@ bool Oam::startEC2Instance(std::string instanceName)
|
||||
bool Oam::assignElasticIP(std::string instanceName, std::string IpAddress)
|
||||
{
|
||||
// run script to get Instance status and IP Address
|
||||
string cmd = InstallDir + "/bin/MCSInstanceCmds.sh assignElasticIP " + instanceName + " " + IpAddress + " > " + tmpdir + "/assignElasticIP_" + instanceName;
|
||||
string cmd = "MCSInstanceCmds.sh assignElasticIP " + instanceName + " " + IpAddress + " > " + tmpdir + "/assignElasticIP_" + instanceName;
|
||||
int ret = system(cmd.c_str());
|
||||
if (WEXITSTATUS(ret) == 1 )
|
||||
exceptionControl("assignElasticIP", oam::API_FAILURE);
|
||||
@ -8443,7 +8438,7 @@ bool Oam::assignElasticIP(std::string instanceName, std::string IpAddress)
|
||||
bool Oam::deassignElasticIP(std::string IpAddress)
|
||||
{
|
||||
// run script to get Instance status and IP Address
|
||||
string cmd = InstallDir + "/bin/MCSInstanceCmds.sh deassignElasticIP " + IpAddress + " > " + tmpdir + "/deassignElasticIP_" + IpAddress;
|
||||
string cmd = "MCSInstanceCmds.sh deassignElasticIP " + IpAddress + " > " + tmpdir + "/deassignElasticIP_" + IpAddress;
|
||||
int ret = system(cmd.c_str());
|
||||
if (WEXITSTATUS(ret) == 1 )
|
||||
exceptionControl("deassignElasticIP", oam::API_FAILURE);
|
||||
@ -8462,7 +8457,7 @@ bool Oam::deassignElasticIP(std::string IpAddress)
|
||||
std::string Oam::getEC2VolumeStatus(std::string volumeName)
|
||||
{
|
||||
// run script to get Volume Status
|
||||
string cmd = InstallDir + "/bin/MCSVolumeCmds.sh describe " + volumeName + " > " + tmpdir + "/getVolumeStatus_" + volumeName;
|
||||
string cmd = "MCSVolumeCmds.sh describe " + volumeName + " > " + tmpdir + "/getVolumeStatus_" + volumeName;
|
||||
int ret = system(cmd.c_str());
|
||||
if (WEXITSTATUS(ret) == 1 ){
|
||||
return "failed";
|
||||
@ -8497,7 +8492,7 @@ std::string Oam::createEC2Volume(std::string size, std::string name)
|
||||
{
|
||||
// run script to get Volume Status
|
||||
string file = tmpdir + "/createVolumeStatus_" + name;
|
||||
string cmd = InstallDir + "/bin/MCSVolumeCmds.sh create " + size + " " + name + " > " + file;
|
||||
string cmd = "MCSVolumeCmds.sh create " + size + " " + name + " > " + file;
|
||||
int ret = system(cmd.c_str());
|
||||
if (WEXITSTATUS(ret) == 1 )
|
||||
return "failed";
|
||||
@ -8540,7 +8535,7 @@ bool Oam::attachEC2Volume(std::string volumeName, std::string deviceName, std::s
|
||||
for ( int retry = 0 ; retry < 2 ; retry++ )
|
||||
{
|
||||
// run script to attach Volume
|
||||
string cmd = InstallDir + "/bin/MCSVolumeCmds.sh attach " + volumeName + " " + instanceName + " " + deviceName + " > " + tmpdir + "/attachVolumeStatus_" + volumeName;
|
||||
string cmd = "MCSVolumeCmds.sh attach " + volumeName + " " + instanceName + " " + deviceName + " > " + tmpdir + "/attachVolumeStatus_" + volumeName;
|
||||
ret = system(cmd.c_str());
|
||||
|
||||
if (WEXITSTATUS(ret) == 1 )
|
||||
@ -8571,7 +8566,7 @@ bool Oam::attachEC2Volume(std::string volumeName, std::string deviceName, std::s
|
||||
bool Oam::detachEC2Volume(std::string volumeName)
|
||||
{
|
||||
// run script to attach Volume
|
||||
string cmd = InstallDir + "/bin/MCSVolumeCmds.sh detach " + volumeName + " > " + tmpdir + "/detachVolumeStatus_" + volumeName;
|
||||
string cmd = "MCSVolumeCmds.sh detach " + volumeName + " > " + tmpdir + "/detachVolumeStatus_" + volumeName;
|
||||
int ret = system(cmd.c_str());
|
||||
if (WEXITSTATUS(ret) == 1 )
|
||||
return false;
|
||||
@ -8590,7 +8585,7 @@ bool Oam::detachEC2Volume(std::string volumeName)
|
||||
bool Oam::deleteEC2Volume(std::string volumeName)
|
||||
{
|
||||
// run script to delete Volume
|
||||
string cmd = InstallDir + "/bin/MCSVolumeCmds.sh delete " + volumeName + " > " + tmpdir + "/deleteVolumeStatus_" + volumeName;
|
||||
string cmd = "MCSVolumeCmds.sh delete " + volumeName + " > " + tmpdir + "/deleteVolumeStatus_" + volumeName;
|
||||
int ret = system(cmd.c_str());
|
||||
if (WEXITSTATUS(ret) == 1 )
|
||||
return false;
|
||||
@ -8609,7 +8604,7 @@ bool Oam::deleteEC2Volume(std::string volumeName)
|
||||
bool Oam::createEC2tag(std::string resourceName, std::string tagName, std::string tagValue)
|
||||
{
|
||||
// run script to create a tag
|
||||
string cmd = InstallDir + "/bin/MCSVolumeCmds.sh createTag " + resourceName + " " + tagName + " " + tagValue + " > " + tmpdir + "createTagStatus_" + resourceName;
|
||||
string cmd = "MCSVolumeCmds.sh createTag " + resourceName + " " + tagName + " " + tagValue + " > " + tmpdir + "createTagStatus_" + resourceName;
|
||||
int ret = system(cmd.c_str());
|
||||
if (WEXITSTATUS(ret) == 1 )
|
||||
return false;
|
||||
@ -8685,7 +8680,7 @@ void Oam::syslogAction( std::string action)
|
||||
void Oam::dbrmctl(std::string command)
|
||||
{
|
||||
//reload DBRM with new configuration
|
||||
string cmd = InstallDir + "/bin/dbrmctl " + command + " > /dev/null 2>&1";
|
||||
string cmd = "dbrmctl " + command + " > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
|
||||
return;
|
||||
@ -8954,7 +8949,7 @@ int Oam::glusterctl(GLUSTER_COMMANDS command, std::string argument1, std::string
|
||||
if (WEXITSTATUS(status) != 0 )
|
||||
{
|
||||
cout << "ERROR: peer probe command failed." << endl;
|
||||
command = InstallDir + "/bin/remote_command.sh " + DataRedundancyConfigs[pm].pmIpAddr + " " + password + " 'stat /var/run/glusterd.pid > /dev/null 2>&1'";
|
||||
command = "remote_command.sh " + DataRedundancyConfigs[pm].pmIpAddr + " " + password + " 'stat /var/run/glusterd.pid > /dev/null 2>&1'";
|
||||
status = system(command.c_str());
|
||||
|
||||
if (WEXITSTATUS(status) != 0 )
|
||||
@ -8997,7 +8992,7 @@ int Oam::glusterctl(GLUSTER_COMMANDS command, std::string argument1, std::string
|
||||
for (; dbrootPmIter < dbrootPms[db].end(); dbrootPmIter++ )
|
||||
{
|
||||
int pm = (*dbrootPmIter) - 1;
|
||||
command += DataRedundancyConfigs[pm].pmIpAddr + ":" + InstallDir + "/gluster/brick" + itoa(pmnextbrick[pm]) + " ";
|
||||
command += DataRedundancyConfigs[pm].pmIpAddr + ":/var/lib/columnstore/gluster/brick" + itoa(pmnextbrick[pm]) + " ";
|
||||
pmnextbrick[pm]++;
|
||||
}
|
||||
|
||||
@ -9062,7 +9057,7 @@ int Oam::glusterctl(GLUSTER_COMMANDS command, std::string argument1, std::string
|
||||
string ModuleDBRootID = "ModuleDBRootID" + itoa(pm + 1) + "-" + itoa(i + 1) + "-3";
|
||||
string dbr = sysConfig->getConfig("SystemModuleConfig", ModuleDBRootID);
|
||||
string command = "" + DataRedundancyConfigs[pm].pmIpAddr +
|
||||
":/dbroot" + dbr + " " + InstallDir + "/data" + dbr +
|
||||
":/dbroot" + dbr + " /var/lib/columnstore/data" + dbr +
|
||||
" glusterfs defaults,direct-io-mode=enable 00";
|
||||
string toPM = "pm" + itoa(pm + 1);
|
||||
distributeFstabUpdates(command, toPM);
|
||||
@ -9120,7 +9115,7 @@ int Oam::glusterctl(GLUSTER_COMMANDS command, std::string argument1, std::string
|
||||
if (WEXITSTATUS(status) != 0 )
|
||||
{
|
||||
cout << "ERROR: peer probe command failed." << endl;
|
||||
command = InstallDir + "/bin/remote_command.sh " + ipAddress + " " + password + " 'stat /var/run/glusterd.pid > /dev/null 2>&1'";
|
||||
command = "remote_command.sh " + ipAddress + " " + password + " 'stat /var/run/glusterd.pid > /dev/null 2>&1'";
|
||||
status = system(command.c_str());
|
||||
|
||||
if (WEXITSTATUS(status) != 0 )
|
||||
@ -9151,7 +9146,7 @@ int Oam::glusterctl(GLUSTER_COMMANDS command, std::string argument1, std::string
|
||||
******************************************************************************************/
|
||||
bool Oam::changeMyCnf( std::string paramater, std::string value )
|
||||
{
|
||||
string mycnfFile = "/etc/my.cnf.d/columnstore.cnf";
|
||||
string mycnfFile = std::string(MCSMYCNFDIR) + "/columnstore.cnf";
|
||||
ifstream file (mycnfFile.c_str());
|
||||
|
||||
if (!file)
|
||||
@ -9431,9 +9426,9 @@ std::string Oam::updateFstab(std::string device, std::string dbrootID)
|
||||
string entry;
|
||||
|
||||
if (user == 0)
|
||||
entry = device + " " + InstallDir + "/data" + dbrootID + " ext2 noatime,nodiratime,noauto 0 0";
|
||||
entry = device + " /var/lib/columnstore/data" + dbrootID + " ext2 noatime,nodiratime,noauto 0 0";
|
||||
else
|
||||
entry = device + " " + InstallDir + "/data" + dbrootID + " ext2 noatime,nodiratime,noauto,user 0 0";
|
||||
entry = device + " /var/lib/columnstore/data" + dbrootID + " ext2 noatime,nodiratime,noauto,user 0 0";
|
||||
|
||||
string cmd;
|
||||
|
||||
@ -9452,14 +9447,14 @@ std::string Oam::updateFstab(std::string device, std::string dbrootID)
|
||||
system(cmd.c_str());
|
||||
}
|
||||
|
||||
cmd = "grep /data" + dbrootID + " " + InstallDir + "/local/etc/pm1/fstab > /dev/null 2>&1";
|
||||
cmd = "grep /data" + dbrootID + "/var/lib/columnstore/local/etc/pm1/fstab > /dev/null 2>&1";
|
||||
|
||||
status = system(cmd.c_str());
|
||||
|
||||
if (WEXITSTATUS(status) != 0 )
|
||||
{
|
||||
//use from addmodule later
|
||||
cmd = "touch " + InstallDir + "/local/etc/pm1/fstab;echo " + entry + " >> " + InstallDir + "/local/etc/pm1/fstab";
|
||||
cmd = "touch /var/lib/columnstore/local/etc/pm1/fstab;echo " + entry + " >> /var/lib/columnstore/local/etc/pm1/fstab";
|
||||
system(cmd.c_str());
|
||||
}
|
||||
|
||||
|
@ -2531,7 +2531,6 @@ private:
|
||||
std::string CalpontConfigFile;
|
||||
std::string AlarmConfigFile;
|
||||
std::string ProcessConfigFile;
|
||||
std::string InstallDir;
|
||||
static int UseHdfs;
|
||||
std::string userDir;
|
||||
|
||||
|
@ -284,7 +284,7 @@ int OamCache::getLocalPMId()
|
||||
{
|
||||
mutex::scoped_lock lk(cacheLock);
|
||||
|
||||
// This comes from the file $INSTALL/local/module, not from the xml.
|
||||
// This comes from the file /etc/columnstore/module, not from the xml.
|
||||
// Thus, it's not refreshed during checkReload().
|
||||
if (mLocalPMId > 0)
|
||||
{
|
||||
@ -293,7 +293,7 @@ int OamCache::getLocalPMId()
|
||||
|
||||
string localModule;
|
||||
string moduleType;
|
||||
string fileName = startup::StartUp::installDir() + "/local/module";
|
||||
string fileName = "/etc/columnstore/module";
|
||||
ifstream moduleFile (fileName.c_str());
|
||||
char line[400];
|
||||
|
||||
@ -337,7 +337,7 @@ string OamCache::getModuleName()
|
||||
if (!moduleName.empty())
|
||||
return moduleName;
|
||||
|
||||
string fileName = startup::StartUp::installDir() + "/local/module";
|
||||
string fileName = "/etc/columnstore/module";
|
||||
ifstream moduleFile(fileName.c_str());
|
||||
getline(moduleFile, moduleName);
|
||||
moduleFile.close();
|
||||
|
@ -1,3 +1,7 @@
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/mcstest-001.sh.in" "${CMAKE_CURRENT_SOURCE_DIR}/mcstest-001.sh" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/mcstest-002.sh.in" "${CMAKE_CURRENT_SOURCE_DIR}/mcstest-002.sh" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/mcstest-003.sh.in" "${CMAKE_CURRENT_SOURCE_DIR}/mcstest-003.sh" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/mcstest-004.sh.in" "${CMAKE_CURRENT_SOURCE_DIR}/mcstest-004.sh" @ONLY)
|
||||
|
||||
install(PROGRAMS functions DESTINATION ${ENGINE_POSTDIR} COMPONENT platform)
|
||||
install(PROGRAMS columnstore_functions mcstest-001.sh mcstest-002.sh mcstest-003.sh mcstest-004.sh DESTINATION ${ENGINE_SUPPORTDIR} COMPONENT platform)
|
||||
|
||||
|
42
oam/post/columnstore_functions
Executable file
42
oam/post/columnstore_functions
Executable file
@ -0,0 +1,42 @@
|
||||
#
|
||||
# $Id: functions 2937 2012-05-30 18:17:09Z rdempsey $
|
||||
#
|
||||
|
||||
# Source function library.
|
||||
if [ -f /etc/init.d/functions ]; then
|
||||
. /etc/init.d/functions
|
||||
fi
|
||||
|
||||
module_type()
|
||||
{
|
||||
(
|
||||
sed -r 's/[0-9]+$//' /etc/columnstore/module
|
||||
) 2>/dev/null
|
||||
}
|
||||
|
||||
firstboot()
|
||||
{
|
||||
dbrmroot="`mcsGetConfig SystemConfig DBRMRoot`"
|
||||
dbrmdir="`dirname $dbrmroot`"
|
||||
test ! -f $dbrmdir/BRM_saves_current
|
||||
}
|
||||
|
||||
oidbitmapfile()
|
||||
{
|
||||
oidfile="`mcsGetConfig OIDManager OIDBitmapFile`"
|
||||
test ! -f $oidfile
|
||||
}
|
||||
|
||||
module_name()
|
||||
{
|
||||
(
|
||||
cat /etc/columnstore/module
|
||||
) 2>/dev/null
|
||||
}
|
||||
|
||||
module_id()
|
||||
{
|
||||
(
|
||||
sed -r 's/[a-zA-Z]//g' /etc/columnstore/module
|
||||
) 2>/dev/null
|
||||
}
|
@ -1,71 +0,0 @@
|
||||
#
|
||||
# $Id: functions 2937 2012-05-30 18:17:09Z rdempsey $
|
||||
#
|
||||
|
||||
prefix=/usr/local
|
||||
|
||||
USER=`whoami 2>/dev/null`
|
||||
|
||||
if [ $USER != "root" ]; then
|
||||
prefix=$HOME
|
||||
fi
|
||||
|
||||
if [ $USER != "root" ]; then
|
||||
if [ -f $prefix/.bash_profile ]; then
|
||||
profileFile=$prefix/.bash_profile
|
||||
elif [ -f $prefix/.profile ]; then
|
||||
profileFile=$prefix/.profile
|
||||
else
|
||||
profileFile=$prefix/.bashrc
|
||||
fi
|
||||
|
||||
. $profileFile
|
||||
fi
|
||||
|
||||
# Source function library.
|
||||
if [ -f /etc/init.d/functions ]; then
|
||||
. /etc/init.d/functions
|
||||
fi
|
||||
|
||||
if [ -z "$COLUMNSTORE_INSTALL_DIR" ]; then
|
||||
COLUMNSTORE_INSTALL_DIR=/usr/local/mariadb/columnstore
|
||||
fi
|
||||
|
||||
export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR
|
||||
|
||||
PATH=$COLUMNSTORE_INSTALL_DIR/bin:$PATH
|
||||
export PATH
|
||||
|
||||
module_type()
|
||||
{
|
||||
(
|
||||
sed -r 's/[0-9]+$//' $COLUMNSTORE_INSTALL_DIR/local/module
|
||||
) 2>/dev/null
|
||||
}
|
||||
|
||||
firstboot()
|
||||
{
|
||||
dbrmroot="`getConfig SystemConfig DBRMRoot`"
|
||||
dbrmdir="`dirname $dbrmroot`"
|
||||
test ! -f $dbrmdir/BRM_saves_current
|
||||
}
|
||||
|
||||
oidbitmapfile()
|
||||
{
|
||||
oidfile="`getConfig OIDManager OIDBitmapFile`"
|
||||
test ! -f $oidfile
|
||||
}
|
||||
|
||||
module_name()
|
||||
{
|
||||
(
|
||||
cat $COLUMNSTORE_INSTALL_DIR/local/module
|
||||
) 2>/dev/null
|
||||
}
|
||||
|
||||
module_id()
|
||||
{
|
||||
(
|
||||
sed -r 's/[a-zA-Z]//g' $COLUMNSTORE_INSTALL_DIR/local/module
|
||||
) 2>/dev/null
|
||||
}
|
63
oam/post/mcstest-001.sh.in
Executable file
63
oam/post/mcstest-001.sh.in
Executable file
@ -0,0 +1,63 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# $Id: test-001.sh 3704 2013-08-07 03:33:20Z bwilkinson $
|
||||
|
||||
USER=`whoami 2>/dev/null`
|
||||
|
||||
# Source function library.
|
||||
if [ -f /etc/init.d/functions ]; then
|
||||
. /etc/init.d/functions
|
||||
fi
|
||||
|
||||
. @ENGINE_SUPPORTDIR@/functions
|
||||
|
||||
scrname=`basename $0`
|
||||
tname="check-syscat-oids"
|
||||
|
||||
mt=`module_type`
|
||||
|
||||
#These tests only for PM
|
||||
if [ "$mt" != "pm" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
#check for dbrm and data1, don't run if missing both
|
||||
if firstboot; then
|
||||
if [ -d /var/lib/columnstore/data1/000.dir ]; then
|
||||
cplogger -c 50 $scrname "$tname" "missing dbrm data with existing 000.dir"
|
||||
exit 1
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
else
|
||||
#check for oidbitmap file
|
||||
if oidbitmapfile; then
|
||||
cplogger -c 50 $scrname "$tname" "missing oidbitmapfile with existing current file"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
#check for both current file and OIDBITMAP file
|
||||
|
||||
#Make sure all syscat OIDs are present (N.B. only works for shared-everything)
|
||||
|
||||
cplogger -i 48 $scrname "$tname"
|
||||
|
||||
catoids=
|
||||
catoids="$catoids 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010"
|
||||
catoids="$catoids 2001 2004"
|
||||
catoids="$catoids 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040"
|
||||
catoids="$catoids 2061 2064 2067 2070 2073 2076"
|
||||
|
||||
# TODO-this doesn't work with HDFS file system
|
||||
#for oid in $catoids; do
|
||||
# if [ ! -s `oid2file $oid` ]; then
|
||||
# cplogger -c 50 $scrname "$tname" "could not find file for OID $oid"
|
||||
# exit 1
|
||||
# fi
|
||||
#done
|
||||
|
||||
cplogger -i 52 $scrname "$tname"
|
||||
|
||||
exit 0
|
||||
|
41
oam/post/mcstest-002.sh.in
Executable file
41
oam/post/mcstest-002.sh.in
Executable file
@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# $Id: test-002.sh 2937 2012-05-30 18:17:09Z rdempsey $
|
||||
|
||||
|
||||
USER=`whoami 2>/dev/null`
|
||||
|
||||
# Source function library.
|
||||
if [ -f /etc/init.d/functions ]; then
|
||||
. /etc/init.d/functions
|
||||
fi
|
||||
|
||||
. @ENGINE_SUPPORTDIR@/functions
|
||||
|
||||
scrname=`basename $0`
|
||||
tname="check-brm"
|
||||
|
||||
#Don't run on first boot
|
||||
if firstboot; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
#Make sure BRM is read-write
|
||||
|
||||
cplogger -i 48 $scrname "$tname"
|
||||
|
||||
#turn this test off for now...it doesn't if the DBRM isn't started, and these tests run too early
|
||||
# we need a way to run some tests at different stages of system startup...
|
||||
#dbrmctl status 2>&1 | egrep -qsi '^ok'
|
||||
/bin/true
|
||||
rc=$?
|
||||
|
||||
if [ $rc -ne 0 ]; then
|
||||
cplogger -c 50 $scrname "$tname" "the BRM is read only"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cplogger -i 52 $scrname "$tname"
|
||||
|
||||
exit 0
|
||||
|
42
oam/post/mcstest-003.sh.in
Executable file
42
oam/post/mcstest-003.sh.in
Executable file
@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# $Id: test-003.sh 2937 2012-05-30 18:17:09Z rdempsey $
|
||||
|
||||
USER=`whoami 2>/dev/null`
|
||||
|
||||
# Source function library.
|
||||
if [ -f /etc/init.d/functions ]; then
|
||||
. /etc/init.d/functions
|
||||
fi
|
||||
|
||||
. @ENGINE_SUPPORTDIR@/functions
|
||||
|
||||
scrname=`basename $0`
|
||||
tname="check-oid-bitmap"
|
||||
|
||||
#Don't run on first boot
|
||||
if firstboot; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
#Make sure there is an oid bitmap file if there are any EM entries
|
||||
|
||||
cplogger -i 48 $scrname "$tname"
|
||||
|
||||
obmfile=$(getConfig OIDManager OIDBitmapFile)
|
||||
emcnt=$(editem -o 2001 | wc -l)
|
||||
|
||||
rc=1
|
||||
if [ -f $obmfile -o $emcnt -eq 0 ]; then
|
||||
rc=0
|
||||
fi
|
||||
|
||||
if [ $rc -ne 0 ]; then
|
||||
cplogger -c 50 $scrname "$tname" "there is no OID bitmap file but there are Extent Map entires"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cplogger -i 52 $scrname "$tname"
|
||||
|
||||
exit 0
|
||||
|
45
oam/post/mcstest-004.sh.in
Executable file
45
oam/post/mcstest-004.sh.in
Executable file
@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# $Id: test-004.sh 1538 2009-07-22 18:57:04Z dhill $
|
||||
|
||||
#
|
||||
# Validates that FilesPerColumnPartition setting is not set lower than existing extents.
|
||||
#
|
||||
|
||||
USER=`whoami 2>/dev/null`
|
||||
|
||||
# Source function library.
|
||||
if [ -f /etc/init.d/functions ]; then
|
||||
. /etc/init.d/functions
|
||||
fi
|
||||
|
||||
. @ENGINE_SUPPORTDIR@/functions
|
||||
|
||||
scrname=`basename $0`
|
||||
tname="validate-partition-size"
|
||||
|
||||
#Don't run on first boot
|
||||
if firstboot; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
cplogger -i 48 $scrname "$tname"
|
||||
|
||||
# Get the FilesPerColumnPartition setting from Columnstore.xml.
|
||||
filesPer=$(getConfig ExtentMap FilesPerColumnPartition)
|
||||
|
||||
# Get the maximum segment number for all column files.
|
||||
maxSeg=$(editem -i | awk -F '|' -v max=0 '{if($7>max)max=$7}END{print max+1}')
|
||||
|
||||
# Error and out if the maximum existing segment number is higher than the FilesPerColumnPartition setting.
|
||||
if [ $maxSeg -gt $filesPer ]; then
|
||||
cplogger -c 50 $scrname "$tname" "One or more tables were populated with FilesPerColumnPartition higher than the current setting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cplogger -i 52 $scrname "$tname"
|
||||
|
||||
exit 0
|
||||
|
@ -110,7 +110,7 @@ int main(int argc, char** argv)
|
||||
{
|
||||
dbrm.setSystemSuspended(true);
|
||||
sleep(5);
|
||||
string cmd = startup::StartUp::installDir() + "/bin/save_brm > /var/log/mariadb/columnstore/save_brm.log1 2>&1";
|
||||
string cmd = "save_brm > /var/log/mariadb/columnstore/save_brm.log1 2>&1";
|
||||
int rtnCode = system(cmd.c_str());
|
||||
|
||||
if (rtnCode == 0)
|
||||
|
@ -14,7 +14,7 @@ target_link_libraries(columnstoreSupport ${ENGINE_LDFLAGS} readline ncurses ${M
|
||||
|
||||
install(TARGETS columnstoreSupport DESTINATION ${ENGINE_BINDIR} COMPONENT platform)
|
||||
|
||||
install(PROGRAMS alarmReport.sh bulklogReport.sh configReport.sh hadoopReport.sh
|
||||
install(PROGRAMS alarmReport.sh bulklogReport.sh configReport.sh
|
||||
hardwareReport.sh logReport.sh resourceReport.sh softwareReport.sh
|
||||
DESTINATION ${ENGINE_BINDIR} COMPONENT platform)
|
||||
|
||||
|
@ -15,7 +15,7 @@ else
|
||||
fi
|
||||
|
||||
#get temp directory
|
||||
tmpDir=`$INSTALLDIR/bin/getConfig SystemConfig SystemTempFileDir`
|
||||
tmpDir=`mcsGetConfig SystemConfig SystemTempFileDir`
|
||||
|
||||
rm -f ${tmpDir}/logReport.log
|
||||
|
||||
|
@ -9,7 +9,6 @@
|
||||
#
|
||||
|
||||
if [ -z "$MYSQLCMD" ]; then
|
||||
INSTALLDIR="/usr/local/mariadb/columnstore"
|
||||
MYSQLCMD="mysql -u root"
|
||||
fi
|
||||
|
||||
@ -50,7 +49,7 @@ colWidth=`$MYSQLCMD calpontsys --skip-column-names -e "$sql"`
|
||||
#
|
||||
# Use editem to count the extents.
|
||||
#
|
||||
extentCount=`/usr/local/mariadb/columnstore/bin/editem -o $objectid | wc -l`
|
||||
extentCount=`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;
|
||||
|
||||
|
@ -8,26 +8,20 @@ else
|
||||
MODULE="pm1"
|
||||
fi
|
||||
|
||||
if [ $2 ] ; then
|
||||
INSTALLDIR=$2
|
||||
else
|
||||
INSTALLDIR="/usr/local/mariadb/columnstore"
|
||||
fi
|
||||
|
||||
#get temp directory
|
||||
tmpDir=`$INSTALLDIR/bin/getConfig SystemConfig SystemTempFileDir`
|
||||
tmpDir=`mcsGetConfig SystemConfig SystemTempFileDir`
|
||||
|
||||
rm -f ${tmpDir}/${MODULE}_bulklogReport.txt
|
||||
|
||||
{
|
||||
|
||||
if test -d $INSTALLDIR/data/bulk ; then
|
||||
if test -d /var/lib/columnstore/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)' /var/lib/columnstore/data/bulk/log/*.err #################"
|
||||
echo " "
|
||||
egrep '(ERR|CRIT)' $INSTALLDIR/data/bulk/log/*.err 2>/dev/null
|
||||
egrep '(ERR|CRIT)' /var/lib/columnstore/data/bulk/log/*.err 2>/dev/null
|
||||
fi
|
||||
|
||||
} > ${tmpDir}/${MODULE}_bulklogReport.txt
|
||||
|
@ -93,8 +93,6 @@ void childReportThread(threadInfo_t& st)
|
||||
string remoteModuleIP = (*list).moduleIP;
|
||||
string remoteHostName = (*list).hostName;
|
||||
|
||||
string installDir(startup::StartUp::installDir());
|
||||
|
||||
pthread_mutex_lock( &mutex1 );
|
||||
runningThreads++;
|
||||
//cout << "++ " << runningThreads << endl;
|
||||
@ -106,10 +104,6 @@ void childReportThread(threadInfo_t& st)
|
||||
{
|
||||
outputFile = remoteModuleName + "_" + reportType + "Report.tar.gz";
|
||||
}
|
||||
else if (reportType == "hadoop")
|
||||
{
|
||||
outputFile = "hadoopReport.txt";
|
||||
}
|
||||
else
|
||||
{
|
||||
outputFile = remoteModuleName + "_" + reportType + "Report.txt";
|
||||
@ -124,16 +118,12 @@ void childReportThread(threadInfo_t& st)
|
||||
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 << "Get " + reportType + " report data for " + remoteModuleName + " " << endl;
|
||||
|
||||
cout.flush();
|
||||
|
||||
string cmd = installDir + "/bin/remote_command.sh " + remoteModuleIP + " " + rootPassword + " '. " + ProfileFile + ";" +
|
||||
installDir + "/bin/" + reportType + "Report.sh " + remoteModuleName + " " + installDir +
|
||||
string cmd = "remote_command.sh " + remoteModuleIP + " " + rootPassword + " '. " + ProfileFile + ";" +
|
||||
reportType + "Report.sh " + remoteModuleName +
|
||||
"' " + debug_flag + " - forcetty";
|
||||
|
||||
int rtnCode = system(cmd.c_str());
|
||||
@ -143,7 +133,7 @@ void childReportThread(threadInfo_t& st)
|
||||
cout << "Error with running remote_command.sh, exiting..." << endl;
|
||||
}
|
||||
|
||||
cmd = installDir + "/bin/remote_scp_get.sh " + remoteModuleIP + " " + rootPassword + " " + tmpDir + "/" + outputFile + " > /dev/null 2>&1";
|
||||
cmd = "remote_scp_get.sh " + remoteModuleIP + " " + rootPassword + " " + tmpDir + "/" + outputFile + " > /dev/null 2>&1";
|
||||
rtnCode = system(cmd.c_str());
|
||||
|
||||
if (WEXITSTATUS(rtnCode) != 0)
|
||||
@ -162,7 +152,6 @@ void reportThread(string reporttype)
|
||||
{
|
||||
string reportType = reporttype;
|
||||
|
||||
string installDir(startup::StartUp::installDir());
|
||||
Oam oam;
|
||||
|
||||
pthread_mutex_lock( &mutex1 );
|
||||
@ -199,7 +188,7 @@ void reportThread(string reporttype)
|
||||
|
||||
if (reportType == "log")
|
||||
{
|
||||
string cmd = installDir + "/bin/logReport.sh " + localModule + " " + installDir;
|
||||
string cmd = "logReport.sh " + localModule;
|
||||
system(cmd.c_str());
|
||||
|
||||
cmd = "mv -f " + tmpDir + "/" + localModule + "_logReport.tar.gz .";
|
||||
@ -221,7 +210,7 @@ void reportThread(string reporttype)
|
||||
system(cmd.c_str());
|
||||
cmd = "echo ' ' >> " + outputFile;
|
||||
system(cmd.c_str());
|
||||
cmd = installDir + "/bin/mcsadmin getLogConfig >> " + outputFile;
|
||||
cmd = "mcsadmin getLogConfig >> " + outputFile;
|
||||
system(cmd.c_str());
|
||||
}
|
||||
else
|
||||
@ -236,7 +225,7 @@ void reportThread(string reporttype)
|
||||
cmd = "echo '=======================================================================' >> " + outputFile;
|
||||
system(cmd.c_str());
|
||||
|
||||
cmd = installDir + "/bin/" + reportType + "Report.sh " + localModule + " " + installDir;
|
||||
cmd = reportType + "Report.sh " + localModule;
|
||||
system(cmd.c_str());
|
||||
cmd = " mv -f " + tmpDir + "/" + localModule + "_" + reportType + "Report.txt .";
|
||||
system(cmd.c_str());
|
||||
@ -253,7 +242,7 @@ void reportThread(string reporttype)
|
||||
system(cmd.c_str());
|
||||
cmd = "echo ' ' >> " + outputFile;
|
||||
system(cmd.c_str());
|
||||
cmd = installDir + "/bin/mcsadmin getSystemNetworkConfig >> " + outputFile;
|
||||
cmd = "mcsadmin getSystemNetworkConfig >> " + outputFile;
|
||||
system(cmd.c_str());
|
||||
|
||||
cmd = "echo ' ' >> " + outputFile;
|
||||
@ -266,7 +255,7 @@ void reportThread(string reporttype)
|
||||
system(cmd.c_str());
|
||||
cmd = "echo ' ' >> " + outputFile;
|
||||
system(cmd.c_str());
|
||||
cmd = installDir + "/bin/mcsadmin getModuleTypeConfig >> " + outputFile;
|
||||
cmd = "mcsadmin getModuleTypeConfig >> " + outputFile;
|
||||
system(cmd.c_str());
|
||||
|
||||
cmd = "echo ' ' >> " + outputFile;
|
||||
@ -279,7 +268,7 @@ void reportThread(string reporttype)
|
||||
system(cmd.c_str());
|
||||
cmd = "echo ' ' >> " + outputFile;
|
||||
system(cmd.c_str());
|
||||
cmd = installDir + "/bin/mcsadmin getStorageConfig >> " + outputFile;
|
||||
cmd = "mcsadmin getStorageConfig >> " + outputFile;
|
||||
system(cmd.c_str());
|
||||
|
||||
cmd = "echo ' ' >> " + outputFile;
|
||||
@ -292,7 +281,7 @@ void reportThread(string reporttype)
|
||||
system(cmd.c_str());
|
||||
cmd = "echo ' ' >> " + outputFile;
|
||||
system(cmd.c_str());
|
||||
cmd = installDir + "/bin/mcsadmin getStorageStatus >> " + outputFile;
|
||||
cmd = "mcsadmin getStorageStatus >> " + outputFile;
|
||||
system(cmd.c_str());
|
||||
|
||||
cmd = "echo ' ' >> " + outputFile;
|
||||
@ -305,7 +294,7 @@ void reportThread(string reporttype)
|
||||
system(cmd.c_str());
|
||||
cmd = "echo ' ' >> " + outputFile;
|
||||
system(cmd.c_str());
|
||||
cmd = installDir + "/bin/mcsadmin getSystemInfo >> " + outputFile;
|
||||
cmd = "mcsadmin getSystemInfo >> " + outputFile;
|
||||
system(cmd.c_str());
|
||||
|
||||
cmd = "echo ' ' >> " + outputFile;
|
||||
@ -318,7 +307,7 @@ void reportThread(string reporttype)
|
||||
system(cmd.c_str());
|
||||
cmd = "echo ' ' >> " + outputFile;
|
||||
system(cmd.c_str());
|
||||
cmd = installDir + "/bin/mcsadmin getSystemDirectories >> " + outputFile;
|
||||
cmd = "mcsadmin getSystemDirectories >> " + outputFile;
|
||||
system(cmd.c_str());
|
||||
|
||||
cmd = "echo ' ' >> " + outputFile;
|
||||
@ -343,7 +332,7 @@ void reportThread(string reporttype)
|
||||
system(cmd.c_str());
|
||||
cmd = "echo ' ' >> " + outputFile;
|
||||
system(cmd.c_str());
|
||||
string cmd = installDir + "/bin/mcsadmin getModuleResourceUsage " + localModule + " >> " + outputFile;
|
||||
string cmd = "mcsadmin getModuleResourceUsage " + localModule + " >> " + outputFile;
|
||||
system(cmd.c_str());
|
||||
}
|
||||
else
|
||||
@ -352,7 +341,7 @@ void reportThread(string reporttype)
|
||||
system(cmd.c_str());
|
||||
cmd = "echo ' ' >> " + outputFile;
|
||||
system(cmd.c_str());
|
||||
string cmd = installDir + "/bin/mcsadmin getSystemResourceUsage >> " + outputFile;
|
||||
string cmd = "mcsadmin getSystemResourceUsage >> " + outputFile;
|
||||
system(cmd.c_str());
|
||||
}
|
||||
}
|
||||
@ -370,7 +359,6 @@ void reportThread(string reporttype)
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
Oam oam;
|
||||
string installDir(startup::StartUp::installDir());
|
||||
|
||||
Config* sysConfig = Config::makeConfig();
|
||||
string SystemSection = "SystemConfig";
|
||||
@ -463,10 +451,6 @@ int main(int argc, char* argv[])
|
||||
cout << endl;
|
||||
cout << "Usage: columnstoreSupport [-h][-a][-hw][-s][-c][-db][-r][-l][-bl][-lc][-p '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;
|
||||
@ -481,10 +465,6 @@ int main(int argc, char* argv[])
|
||||
cout << " -p password (multi-server systems), root-password or 'ssh' to use 'ssh keys'" << 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
|
||||
@ -736,7 +716,6 @@ int main(int argc, char* argv[])
|
||||
system("rm -f *_bulklogReport.txt");
|
||||
system("rm -f *_resourceReport.txt");
|
||||
system("rm -f *_softwareReport.txt");
|
||||
system("rm -f hadoopReport.txt");
|
||||
|
||||
//
|
||||
// Software
|
||||
@ -888,7 +867,7 @@ int main(int argc, char* argv[])
|
||||
if ( mysqlpw == " " )
|
||||
{
|
||||
//go check columnstore.cnf
|
||||
string file = "/etc/my.cnf.d/columnstore.cnf";
|
||||
string file = std::string(MCSMYCNFDIR) + "/columnstore.cnf";
|
||||
ifstream oldFile (file.c_str());
|
||||
|
||||
vector <string> lines;
|
||||
@ -987,11 +966,11 @@ int main(int argc, char* argv[])
|
||||
system("echo ' ' >> columnstoreSupportReport.txt");
|
||||
system("echo '******************** DBMS Columnstore System Catalog Data ********************' >> columnstoreSupportReport.txt");
|
||||
system("echo ' ' >> columnstoreSupportReport.txt");
|
||||
cmd = "echo '################# " + columnstoreMysql + " calpontsys < " + installDir + "/mysql/dumpcat_mysql.sql ################# ' >> columnstoreSupportReport.txt";
|
||||
cmd = "echo '################# " + columnstoreMysql + " calpontsys < " + MCSSUPPORTDIR + "/dumpcat_mysql.sql ################# ' >> columnstoreSupportReport.txt";
|
||||
system(cmd.c_str());
|
||||
cmd = "echo ' ' >> columnstoreSupportReport.txt";
|
||||
system(cmd.c_str());
|
||||
cmd = columnstoreMysql + " calpontsys < " + installDir + "/mysql/dumpcat_mysql.sql >> columnstoreSupportReport.txt";
|
||||
cmd = columnstoreMysql + " calpontsys < " + MCSSUPPORTDIR + "/dumpcat_mysql.sql >> columnstoreSupportReport.txt";
|
||||
system(cmd.c_str());
|
||||
|
||||
system("echo ' ' >> columnstoreSupportReport.txt");
|
||||
@ -1031,7 +1010,7 @@ int main(int argc, char* argv[])
|
||||
system("echo '******************** Database Size Report ********************' >> columnstoreSupportReport.txt");
|
||||
system("echo ' ' >> columnstoreSupportReport.txt");
|
||||
|
||||
string file = installDir + "/bin/databaseSizeReport";
|
||||
string file = "databaseSizeReport";
|
||||
ifstream File (file.c_str());
|
||||
|
||||
if (File)
|
||||
@ -1041,18 +1020,18 @@ int main(int argc, char* argv[])
|
||||
system(cmd.c_str());
|
||||
cmd = "echo ' ' >> columnstoreSupportReport.txt";
|
||||
system(cmd.c_str());
|
||||
cmd = installDir + "/bin/databaseSizeReport >> columnstoreSupportReport.txt";
|
||||
cmd = "databaseSizeReport >> columnstoreSupportReport.txt";
|
||||
system(cmd.c_str());
|
||||
}
|
||||
|
||||
system("echo ' ' >> columnstoreSupportReport.txt");
|
||||
system("echo '******************** DBMS Columnstore config file ********************' >> columnstoreSupportReport.txt");
|
||||
system("echo ' ' >> columnstoreSupportReport.txt");
|
||||
string cmd = "echo '################# cat /etc/my.cnf.d/columnstore.cnf ################# ' >> columnstoreSupportReport.txt";
|
||||
string cmd = "echo '################# cat " + std::string(MCSMYCNFDIR) + "/columnstore.cnf ################# ' >> columnstoreSupportReport.txt";
|
||||
system(cmd.c_str());
|
||||
cmd = "echo ' ' >> columnstoreSupportReport.txt";
|
||||
system(cmd.c_str());
|
||||
cmd = "cat /etc/my.cnf.d/columnstore.cnf 2>/dev/null >> columnstoreSupportReport.txt";
|
||||
cmd = "cat " + std::string(MCSMYCNFDIR) + "/columnstore.cnf 2>/dev/null >> columnstoreSupportReport.txt";
|
||||
system(cmd.c_str());
|
||||
|
||||
system("echo ' ' >> columnstoreSupportReport.txt");
|
||||
@ -1062,54 +1041,13 @@ int main(int argc, char* argv[])
|
||||
system(cmd.c_str());
|
||||
cmd = "echo ' ' >> columnstoreSupportReport.txt";
|
||||
system(cmd.c_str());
|
||||
cmd = installDir + "/bin/mcsadmin getActiveSqlStatement >> columnstoreSupportReport.txt";
|
||||
cmd = "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 " + tmpDir + "/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)
|
||||
|
@ -8,14 +8,8 @@ else
|
||||
MODULE="pm1"
|
||||
fi
|
||||
|
||||
if [ $2 ] ; then
|
||||
INSTALLDIR=$2
|
||||
else
|
||||
INSTALLDIR="/usr/local/mariadb/columnstore"
|
||||
fi
|
||||
|
||||
#get temp directory
|
||||
tmpDir=`$INSTALLDIR/bin/getConfig SystemConfig SystemTempFileDir`
|
||||
tmpDir=`mcsGetConfig SystemConfig SystemTempFileDir`
|
||||
|
||||
rm -f ${tmpDir}/${MODULE}_configReport.txt
|
||||
|
||||
|
@ -1,40 +0,0 @@
|
||||
#!/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:/bin:/usr/bin
|
||||
export LD_LIBRARY_PATH=$COLUMNSTORE_INSTALL_DIR/lib
|
||||
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
|
@ -9,7 +9,6 @@
|
||||
#
|
||||
|
||||
if [ -z "$MYSQLCMD" ]; then
|
||||
INSTALLDIR="/usr/local/mariadb/columnstore"
|
||||
MYSQLCMD="mysql -u root"
|
||||
fi
|
||||
|
||||
@ -76,7 +75,7 @@ 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 '
|
||||
editem -o $objectid $parm | grep max | awk -v dataType=$dataType '
|
||||
BEGIN {
|
||||
allValid=1;
|
||||
foundValidExtent=0;
|
||||
|
@ -1,66 +0,0 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
|
||||
if [ $1 ] ; then
|
||||
MODULE=$1
|
||||
else
|
||||
MODULE="pm1"
|
||||
fi
|
||||
|
||||
if [ $2 ] ; then
|
||||
INSTALLDIR=$2
|
||||
else
|
||||
INSTALLDIR="/usr/local/mariadb/columnstore"
|
||||
fi
|
||||
|
||||
#get temp directory
|
||||
tmpDir=`$INSTALLDIR/bin/getConfig SystemConfig SystemTempFileDir`
|
||||
|
||||
rm -f ${tmpDir}/hdfsReport.txt
|
||||
|
||||
{
|
||||
echo
|
||||
echo "****************************** HDFS REPORT ********************************"
|
||||
echo
|
||||
echo "-- Hadoop version --"
|
||||
echo
|
||||
echo "################# hadoop version #################"
|
||||
echo
|
||||
hadoop version
|
||||
|
||||
echo
|
||||
echo "-- Data File Plugin --"
|
||||
echo
|
||||
echo "######### $INSTALLDIR/bin/getConfig SystemConfig DataFilePlugin ##########"
|
||||
echo
|
||||
$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
|
||||
hadoop dfsadmin -report 2>/dev/null
|
||||
|
||||
echo
|
||||
echo "-- HDFS check --"
|
||||
echo
|
||||
echo "################# hdfs fsck $INSTALLDIR #################"
|
||||
echo
|
||||
hadoop fsck $INSTALLDIR 2>/dev/null
|
||||
} > ${tmpDir}/hadoopReport.txt
|
||||
|
||||
exit 0
|
@ -8,14 +8,8 @@ else
|
||||
MODULE="pm1"
|
||||
fi
|
||||
|
||||
if [ $2 ] ; then
|
||||
INSTALLDIR=$2
|
||||
else
|
||||
INSTALLDIR="/usr/local/mariadb/columnstore"
|
||||
fi
|
||||
|
||||
#get temp directory
|
||||
tmpDir=`$INSTALLDIR/bin/getConfig SystemConfig SystemTempFileDir`
|
||||
tmpDir=`mcsGetConfig SystemConfig SystemTempFileDir`
|
||||
|
||||
rm -f ${tmpDir}/${MODULE}_hardwareReport.txt
|
||||
|
||||
@ -38,11 +32,11 @@ echo "################# cat /etc/issue #################"
|
||||
echo " "
|
||||
cat /etc/issue 2>/dev/null
|
||||
echo " "
|
||||
echo "run os_check.sh"
|
||||
echo "run columnstore_os_check.sh"
|
||||
echo " "
|
||||
echo "################# /bin/os_check.sh #################"
|
||||
echo "################# /bin/columnstore_os_check.sh #################"
|
||||
echo " "
|
||||
$INSTALLDIR/bin/os_check.sh 2>/dev/null
|
||||
columnstore_os_check.sh 2>/dev/null
|
||||
|
||||
echo " "
|
||||
echo "-- Server Uptime --"
|
||||
|
@ -8,14 +8,8 @@ else
|
||||
MODULE="pm1"
|
||||
fi
|
||||
|
||||
if [ $2 ] ; then
|
||||
INSTALLDIR=$2
|
||||
else
|
||||
INSTALLDIR="/usr/local/mariadb/columnstore"
|
||||
fi
|
||||
|
||||
#get temp directory
|
||||
tmpDir=`$INSTALLDIR/bin/getConfig SystemConfig SystemTempFileDir`
|
||||
tmpDir=`mcsGetConfig SystemConfig SystemTempFileDir`
|
||||
|
||||
rm -f ${tmpDir}/${MODULE}_logReport.tar.gz
|
||||
|
||||
|
@ -1,173 +0,0 @@
|
||||
#!/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 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 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 calpontsys -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="mysql -u root"
|
||||
fi
|
||||
|
||||
if [ -z "$INSTALLDIR" ]; then
|
||||
INSTALLDIR="/usr/local/mariadb/columnstore"
|
||||
fi
|
||||
|
||||
if [ -z "$PGMPATH" ]; then
|
||||
PGMPATH=$INSTALLDIR/bin
|
||||
fi
|
||||
|
||||
#get temp directory
|
||||
tmpDir=`$INSTALLDIR/bin/getConfig SystemConfig SystemTempFileDir`
|
||||
|
||||
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);" calpontsys --skip-column-names > ${tmpDir}/idb_mm_mon.cols
|
||||
cols=( $( cat${tmpDir}/idb_mm_mon.cols ) )
|
||||
rm -f ${tmpDir}/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';" calpontsys --skip-column-names > ${tmpDir}/idb_mm_mon.cols
|
||||
cols=( $( cat ${tmpDir}/idb_mm_mon.cols ) )
|
||||
rm -f ${tmpDir}/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';" calpontsys --skip-column-names > ${tmpDir}/idb_mm_mon.cols
|
||||
cols=( $( cat ${tmpDir}/idb_mm_mon.cols ) )
|
||||
rm -f ${tmpDir}/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';" calpontsys --skip-column-names > ${tmpDir}/idb_mm_mon.cols
|
||||
cols=( $( cat ${tmpDir}/idb_mm_mon.cols ) )
|
||||
rm -f ${tmpDir}/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';" calpontsys --skip-column-names > ${tmpDir}/idb_mm_mon.cols
|
||||
results=`wc -l ${tmpDir}/idb_mm_mon.cols | awk '{print $1}'`
|
||||
if [ $results -eq 0 ]; then
|
||||
oid=0
|
||||
else
|
||||
oid=`cat ${tmpDir}/idb_mm_mon.cols`
|
||||
fi
|
||||
fi
|
||||
|
||||
$PGMPATH/editem -o$oid | awk '{print $1, $6, $8, $12}' >${tmpDir}/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}' >${tmpDir}/idb_mm_mon.$oid.2.$$
|
||||
sdiff ${tmpDir}/idb_mm_mon.$oid.1.$$ ${tmpDir}/idb_mm_mon.$oid.2.$$ --suppress-common-lines | grep -n -v invalid > ${tmpDir}/idb_mm_mon.sdiff.$oid.$$
|
||||
count=`wc -l ${tmpDir}/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 ${tmpDir}/idb_mm_mon.sdiff.$oid.$$"
|
||||
else
|
||||
rm -f ${tmpDir}/idb_mm_mon.sdiff.$oid.$$
|
||||
fi
|
||||
rm -f ${tmpDir}/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 ${tmpDir}/idb_mm_mon.sdiff.*.$$"
|
||||
echo "min-max-monitor: some values were reset for oids" "$badoidlist"
|
||||
echo "min-max-monitor: log files are ${tmpDir}/idb_mm_mon.sdiff.*.$$"
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -8,14 +8,8 @@ else
|
||||
MODULE="pm1"
|
||||
fi
|
||||
|
||||
if [ $2 ] ; then
|
||||
INSTALLDIR=$2
|
||||
else
|
||||
INSTALLDIR="/usr/local/mariadb/columnstore"
|
||||
fi
|
||||
|
||||
#get temp directory
|
||||
tmpDir=`$INSTALLDIR/bin/getConfig SystemConfig SystemTempFileDir`
|
||||
tmpDir=`mcsGetConfig SystemConfig SystemTempFileDir`
|
||||
|
||||
rm -f ${tmpDir}/${MODULE}_resourceReport.txt
|
||||
|
||||
@ -31,9 +25,9 @@ echo "################# ipcs -l #################"
|
||||
echo " "
|
||||
ipcs -l
|
||||
|
||||
echo "################# $INSTALLDIR/bin/clearShm -n #################"
|
||||
echo "################# clearShm -n #################"
|
||||
echo " "
|
||||
$INSTALLDIR/bin/clearShm -n
|
||||
clearShm -n
|
||||
|
||||
echo " "
|
||||
echo "-- Disk Usage --"
|
||||
@ -45,26 +39,26 @@ 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
|
||||
ls -l /var/lib/columnstore/data1/systemFiles/dbrm 2> /dev/null
|
||||
ls -l /var/lib/columnstore/dbrm 2> /dev/null
|
||||
|
||||
echo "################# cat $INSTALLDIR/data1/systemFiles/dbrm/BRM_saves_current #################"
|
||||
echo "################# cat /var/lib/columnstore/data1/systemFiles/dbrm/BRM_saves_current #################"
|
||||
echo " "
|
||||
cat $INSTALLDIR/data1/systemFiles/dbrm/BRM_saves_current 2> /dev/null
|
||||
cat /var/lib/columnstore/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
|
||||
viewtablelock 2> /dev/null
|
||||
|
||||
echo " "
|
||||
echo "-- BRM Extent Map --"
|
||||
echo " "
|
||||
echo "################# bin/editem -i #################"
|
||||
echo " "
|
||||
$INSTALLDIR/bin/editem -i 2>/dev/null
|
||||
editem -i 2>/dev/null
|
||||
|
||||
} > ${tmpDir}/${MODULE}_resourceReport.txt
|
||||
|
||||
|
@ -8,14 +8,8 @@ else
|
||||
MODULE="pm1"
|
||||
fi
|
||||
|
||||
if [ $2 ] ; then
|
||||
INSTALLDIR=$2
|
||||
else
|
||||
INSTALLDIR="/usr/local/mariadb/columnstore"
|
||||
fi
|
||||
|
||||
#get temp directory
|
||||
tmpDir=`$INSTALLDIR/bin/getConfig SystemConfig SystemTempFileDir`
|
||||
tmpDir=`mcsGetConfig SystemConfig SystemTempFileDir`
|
||||
|
||||
rm -f ${tmpDir}/${MODULE}_softwareReport.txt
|
||||
|
||||
@ -29,14 +23,14 @@ echo "-- Columnstore Package Details --"
|
||||
echo " "
|
||||
echo "################# mcsadmin getcolumnstoresoftwareinfo #################"
|
||||
echo " "
|
||||
$INSTALLDIR/bin/mcsadmin getsoftwareinfo
|
||||
mcsadmin getsoftwareinfo
|
||||
|
||||
echo " "
|
||||
echo "-- Columnstore Storage Configuration --"
|
||||
echo " "
|
||||
echo "################# mcsadmin getStorageConfig #################"
|
||||
echo " "
|
||||
$INSTALLDIR/bin/mcsadmin getStorageConfig
|
||||
mcsadmin getStorageConfig
|
||||
|
||||
} > ${tmpDir}/${MODULE}_softwareReport.txt
|
||||
|
||||
|
@ -1,228 +0,0 @@
|
||||
#!/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:/bin:/usr/bin
|
||||
export LD_LIBRARY_PATH=$COLUMNSTORE_INSTALL_DIR/lib
|
||||
fi
|
||||
|
||||
|
||||
if [ -z "$MYSQLCMD" ]; then
|
||||
MYSQLCMD="mysql -u root"
|
||||
export MYSQLCMD
|
||||
fi
|
||||
|
||||
#get temp directory
|
||||
tmpDir=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig SystemConfig SystemTempFileDir`
|
||||
|
||||
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 > ${tmpDir}/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 '${tmpDir}/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 > ${tmpDir}/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 '${tmpDir}/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
|
@ -70,7 +70,6 @@ bool rootUser = true;
|
||||
string HOME = "/root";
|
||||
string SingleServerInstall;
|
||||
string tmpDir;
|
||||
string installDir;
|
||||
|
||||
bool repeatStop;
|
||||
|
||||
@ -200,7 +199,6 @@ int main(int argc, char* argv[])
|
||||
string ccHistoryFile = HOME + "/.cc_history";
|
||||
|
||||
tmpDir = startup::StartUp::tmpDir();
|
||||
installDir = startup::StartUp::installDir();
|
||||
|
||||
string cf = std::string(MCSSYSCONFDIR) + "/columnstore/" + ConsoleCmdsFile;
|
||||
fConfig = Config::makeConfig(cf);
|
||||
@ -2626,7 +2624,7 @@ int processCommand(string* arguments)
|
||||
{
|
||||
string logFile = tmpDir + "/cc-stop.pdsh";
|
||||
|
||||
cmd = "pdsh -a '/" + installDir + "/bin/columnstore stop' > " + logFile + " 2>&1";
|
||||
cmd = "pdsh -a 'columnstore stop' > " + logFile + " 2>&1";
|
||||
system(cmd.c_str());
|
||||
|
||||
if (oam.checkLogStatus(logFile, "exit") )
|
||||
@ -2636,7 +2634,7 @@ int processCommand(string* arguments)
|
||||
}
|
||||
else
|
||||
{
|
||||
cmd = installDir + "/bin/columnstore stop > " + tmpDir + "/status.log";
|
||||
cmd = "columnstore stop > " + tmpDir + "/status.log";
|
||||
system(cmd.c_str());
|
||||
}
|
||||
}
|
||||
@ -2646,7 +2644,7 @@ int processCommand(string* arguments)
|
||||
|
||||
if ( gracefulTemp == FORCEFUL )
|
||||
{
|
||||
cmd = installDir + "/bin/columnstore stop > " + tmpDir + "/status.log";
|
||||
cmd = "columnstore stop > " + tmpDir + "/status.log";
|
||||
system(cmd.c_str());
|
||||
cout << endl << " Successful shutdown of System (stopped local columnstore service) " << endl << endl;
|
||||
}
|
||||
@ -2654,7 +2652,7 @@ int processCommand(string* arguments)
|
||||
if (Failed.find("Connection refused") != string::npos)
|
||||
{
|
||||
cout << endl << "**** shutdownSystem Error : ProcessManager not Active, stopping columnstore service" << endl;
|
||||
cmd = installDir + "/bin/columnstore stop > " + tmpDir + "/status.log";
|
||||
cmd = "columnstore stop > " + tmpDir + "/status.log";
|
||||
system(cmd.c_str());
|
||||
cout << endl << " Successful stop of local columnstore service " << endl << endl;
|
||||
}
|
||||
@ -2676,7 +2674,7 @@ int processCommand(string* arguments)
|
||||
if ( DBRootStorageType == "hdfs")
|
||||
{
|
||||
string logFile = tmpDir + "cc-stop.pdsh";
|
||||
cmd = "pdsh -a '" + installDir + "/bin/columnstore stop' > " + logFile + " 2>&1";
|
||||
cmd = "pdsh -a 'columnstore stop' > " + logFile + " 2>&1";
|
||||
system(cmd.c_str());
|
||||
|
||||
if (oam.checkLogStatus(logFile, "exit") )
|
||||
@ -2783,7 +2781,7 @@ int processCommand(string* arguments)
|
||||
if ( DBRootStorageType == "hdfs")
|
||||
{
|
||||
string logFile = tmpDir + "/cc-restart.pdsh";
|
||||
cmd = "pdsh -a '" + installDir + "/bin/columnstore restart' > " + logFile + " 2>&1";
|
||||
cmd = "pdsh -a 'columnstore restart' > " + logFile + " 2>&1";
|
||||
system(cmd.c_str());
|
||||
|
||||
if (oam.checkLogStatus(logFile, "exit") )
|
||||
@ -2820,7 +2818,7 @@ int processCommand(string* arguments)
|
||||
|
||||
if ( modulename == localModule )
|
||||
{
|
||||
cmd = installDir + "/bin/columnstore restart > " + tmpDir + "/start.log 2>&1";
|
||||
cmd = "columnstore restart > " + tmpDir + "/start.log 2>&1";
|
||||
int rtnCode = system(cmd.c_str());
|
||||
|
||||
if (geteuid() == 0 && WEXITSTATUS(rtnCode) != 0)
|
||||
@ -2838,7 +2836,7 @@ int processCommand(string* arguments)
|
||||
for ( ; pt1 != (*pt).hostConfigList.end() ; pt1++)
|
||||
{
|
||||
//run remote command script
|
||||
cmd = installDir + "/bin/remote_command.sh " + (*pt1).IPAddr + " " + password + " '" + installDir + "/bin/columnstore restart' 0";
|
||||
cmd = "remote_command.sh " + (*pt1).IPAddr + " " + password + " 'columnstore restart' 0";
|
||||
int rtnCode = system(cmd.c_str());
|
||||
|
||||
if (WEXITSTATUS(rtnCode) < 0)
|
||||
@ -2847,7 +2845,7 @@ int processCommand(string* arguments)
|
||||
cout << endl << "**** startSystem Failed" << endl;
|
||||
|
||||
// stop local columnstore service
|
||||
cmd = installDir + "/bin/columnstore stop > " + tmpDir + "/stop.log 2>&1";
|
||||
cmd = "columnstore stop > " + tmpDir + "/stop.log 2>&1";
|
||||
system(cmd.c_str());
|
||||
|
||||
FAILED = true;
|
||||
@ -2861,7 +2859,7 @@ int processCommand(string* arguments)
|
||||
cout << endl << "**** startSystem Failed" << endl;
|
||||
|
||||
// stop local columnstore service
|
||||
cmd = installDir + "/bin/columnstore stop > " + tmpDir + "/stop.log 2>&1";
|
||||
cmd = "columnstore stop > " + tmpDir + "/stop.log 2>&1";
|
||||
system(cmd.c_str());
|
||||
|
||||
FAILED = true;
|
||||
@ -2887,7 +2885,7 @@ int processCommand(string* arguments)
|
||||
//just kick off local server
|
||||
cout << endl << " System being started, please wait...";
|
||||
cout.flush();
|
||||
cmd = installDir + "/bin/columnstore restart > " + tmpDir + "/start.log 2>&1";
|
||||
cmd = "columnstore restart > " + tmpDir + "/start.log 2>&1";
|
||||
int rtnCode = system(cmd.c_str());
|
||||
|
||||
if (geteuid() == 0 && WEXITSTATUS(rtnCode) != 0)
|
||||
@ -3025,7 +3023,7 @@ int processCommand(string* arguments)
|
||||
if ( DBRootStorageType == "hdfs")
|
||||
{
|
||||
string logFile = tmpDir + "/cc-restart.pdsh";
|
||||
cmd = "pdsh -a '" + installDir + "/bin/columnstore restart' > " + logFile + " 2>&1";
|
||||
cmd = "pdsh -a 'columnstore restart' > " + logFile + " 2>&1";
|
||||
system(cmd.c_str());
|
||||
|
||||
if (oam.checkLogStatus(logFile, "exit") )
|
||||
@ -3068,7 +3066,7 @@ int processCommand(string* arguments)
|
||||
for ( ; pt1 != (*pt).hostConfigList.end() ; pt1++)
|
||||
{
|
||||
//run remote command script
|
||||
cmd = installDir + "/bin/remote_command.sh " + (*pt1).IPAddr + " " + password + " '" + installDir + "/bin/columnstore restart' 0";
|
||||
cmd = "remote_command.sh " + (*pt1).IPAddr + " " + password + " 'columnstore restart' 0";
|
||||
|
||||
int rtnCode = system(cmd.c_str());
|
||||
|
||||
@ -3078,7 +3076,7 @@ int processCommand(string* arguments)
|
||||
cout << endl << "**** restartSystem Failed" << endl;
|
||||
|
||||
// stop local columnstore service
|
||||
cmd = installDir + "/bin/columnstore stop > " + tmpDir + "/stop.log 2>&1";
|
||||
cmd = "columnstore stop > " + tmpDir + "/stop.log 2>&1";
|
||||
system(cmd.c_str());
|
||||
|
||||
FAILED = true;
|
||||
@ -3093,7 +3091,7 @@ int processCommand(string* arguments)
|
||||
FAILED = true;
|
||||
|
||||
// stop local columnstore service
|
||||
cmd = installDir + "/bin/columnstore stop > " + tmpDir + "/stop.log 2>&1";
|
||||
cmd = "columnstore stop > " + tmpDir + "/stop.log 2>&1";
|
||||
system(cmd.c_str());
|
||||
|
||||
break;
|
||||
@ -3109,7 +3107,7 @@ int processCommand(string* arguments)
|
||||
break;
|
||||
|
||||
//RESTART LOCAL HOST
|
||||
cmd = installDir + "/bin/columnstore restart > " + tmpDir + "/start.log 2>&1";
|
||||
cmd = "columnstore restart > " + tmpDir + "/start.log 2>&1";
|
||||
int rtnCode = system(cmd.c_str());
|
||||
|
||||
if (geteuid() == 0 && WEXITSTATUS(rtnCode) != 0)
|
||||
@ -3129,7 +3127,7 @@ int processCommand(string* arguments)
|
||||
//just kick off local server
|
||||
cout << " System being restarted, please wait...";
|
||||
cout.flush();
|
||||
cmd = installDir + "/bin/columnstore restart > " + tmpDir + "/start.log 2>&1";
|
||||
cmd = "columnstore restart > " + tmpDir + "/start.log 2>&1";
|
||||
int rtnCode = system(cmd.c_str());
|
||||
|
||||
if (WEXITSTATUS(rtnCode) != 0)
|
||||
@ -4936,7 +4934,6 @@ int processCommand(string* arguments)
|
||||
{
|
||||
cout << endl << "System Installation and Temporary File Directories" << endl << endl;
|
||||
|
||||
cout << "System Installation Directory = " << installDir << endl;
|
||||
cout << "System Temporary File Directory = " << tmpDir << endl << endl;
|
||||
}
|
||||
break;
|
||||
@ -6182,13 +6179,13 @@ int processCommand(string* arguments)
|
||||
++it)
|
||||
{
|
||||
string deviceName = *it;
|
||||
string entry = deviceName + " " + installDir + "/gluster/brick" + oam.itoa(brickID) + " " + deviceType + " defaults 1 2";
|
||||
string entry = deviceName + " /var/lib/columnstore/gluster/brick" + oam.itoa(brickID) + " " + deviceType + " defaults 1 2";
|
||||
//send update pm
|
||||
oam.distributeFstabUpdates(entry, moduleName);
|
||||
}
|
||||
}
|
||||
|
||||
string command = installDir + "/bin/remote_command.sh " + (*hostConfigIter).IPAddr + " " + password + " 'mkdir -p " + installDir + "/gluster/brick" + oam.itoa(brickID) + "'";
|
||||
string command = "remote_command.sh " + (*hostConfigIter).IPAddr + " " + password + " 'mkdir -p /var/lib/columnstore/gluster/brick" + oam.itoa(brickID) + "'";
|
||||
system(command.c_str());
|
||||
brickID++;
|
||||
}
|
||||
@ -8225,7 +8222,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
|
||||
|
||||
//run remote command script
|
||||
HostConfigList::iterator pt1 = (*pt).hostConfigList.begin();
|
||||
cmd = installDir + "/bin/remote_command.sh " + (*pt1).IPAddr + " " + password + " reboot " ;
|
||||
cmd = "remote_command.sh " + (*pt1).IPAddr + " " + password + " reboot " ;
|
||||
int rtnCode = system(cmd.c_str());
|
||||
|
||||
if (WEXITSTATUS(rtnCode) != 0)
|
||||
@ -8344,7 +8341,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
|
||||
HostConfigList::iterator pt1 = (*pt).hostConfigList.begin();
|
||||
string ipAddr = (*pt1).IPAddr;
|
||||
//run remote command script
|
||||
cmd = installDir + "/bin/remote_command.sh " + ipAddr + " " + password + " reboot " ;
|
||||
cmd = "remote_command.sh " + ipAddr + " " + password + " reboot " ;
|
||||
int rtnCode = system(cmd.c_str());
|
||||
|
||||
if (WEXITSTATUS(rtnCode) != 0)
|
||||
|
@ -19,13 +19,13 @@ install(TARGETS postConfigure DESTINATION ${ENGINE_BINDIR} COMPONENT platform)
|
||||
|
||||
set(installer_SRCS installer.cpp helpers.cpp)
|
||||
|
||||
add_executable(installer ${installer_SRCS})
|
||||
add_executable(columnstore_installer ${installer_SRCS})
|
||||
|
||||
target_compile_options(installer PRIVATE -Wno-unused-result)
|
||||
target_compile_options(columnstore_installer PRIVATE -Wno-unused-result)
|
||||
|
||||
target_link_libraries(installer ${ENGINE_LDFLAGS} readline ncurses ${MARIADB_CLIENT_LIBS} ${ENGINE_EXEC_LIBS})
|
||||
target_link_libraries(columnstore_installer ${ENGINE_LDFLAGS} readline ncurses ${MARIADB_CLIENT_LIBS} ${ENGINE_EXEC_LIBS})
|
||||
|
||||
install(TARGETS installer DESTINATION ${ENGINE_BINDIR} COMPONENT platform)
|
||||
install(TARGETS columnstore_installer DESTINATION ${ENGINE_BINDIR} COMPONENT platform)
|
||||
|
||||
|
||||
########### next target ###############
|
||||
|
@ -1,111 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- $Id: amazonConfig.xml 2830 2012-04-08 17:38:58Z dhill $ -->
|
||||
<!-- Used with the amazonInstaller script-->
|
||||
<Calpont Version="V1.0.0">
|
||||
<SystemConfig>
|
||||
<!-- System Name-->
|
||||
<SystemName>calpont-1</SystemName>
|
||||
|
||||
<!-- System Type: combined (um and pm functionality on same instance)
|
||||
separate (um and pm functionality on separate instances) -->
|
||||
<SystemType>combined</SystemType>
|
||||
|
||||
<!--- VPC Configuration Setup -->
|
||||
<!--- -->
|
||||
<!--- subnet ID -->
|
||||
<!--- The ID of the Amazon VPC subnet in which to launch the instance(s) -->
|
||||
<SubNetID>unassigned</SubNetID>
|
||||
|
||||
<!-- VPC Starting Private IP Address -->
|
||||
<!-- Requires the SubNetID to be setup -->
|
||||
<!-- Use this if you want InfiniDB to assigned IP Addresses starting with this one -->
|
||||
<!-- Set value to 'autoassign' if you want Amazon to auto-assign IP Addresses within the subnet range -->
|
||||
<VPCStartPrivateIP>unassigned</VPCStartPrivateIP>
|
||||
|
||||
<!-- User Modules Private IP Address list, use when running on a Amazon VPC -->
|
||||
<!-- Requires the SubNetID to be setup -->
|
||||
<!-- This list would start with um1, list is seperated by commands. i.e 'ip1,ip2,ip3' -->
|
||||
<!-- IGNORED when VPCStartPrivateIP is set -->
|
||||
<UserModulePrivateIP>unassigned</UserModulePrivateIP>
|
||||
|
||||
<!-- Performance Modules Private IP Address list, use when running on a Amazon VPC -->
|
||||
<!-- Requires the SubNetID to be setup -->
|
||||
<!-- This list would start with pm2, list is seperated by commands. i.e 'ip1,ip2,ip3' -->
|
||||
<!-- IGNORED when VPCStartPrivateIP is set -->
|
||||
<PerformanceModulePrivateIP>unassigned</PerformanceModulePrivateIP>
|
||||
|
||||
<!-- Elastic IP to Module Assignment -->
|
||||
<!--- Example usages: x.x.x.x:um1 -->
|
||||
<!--- Example usages: x.x.x.x:um1,y.y.y.y:pm1 -->
|
||||
<ElasticIPs>unassigned</ElasticIPs>
|
||||
|
||||
<!-- Number of User Modules: n/a for combination system type -->
|
||||
<UserModuleCount>0</UserModuleCount>
|
||||
|
||||
<!-- User Modules Instances list, use existing instances instead of Launching new ones -->
|
||||
<!-- This list would start with um1, list is seperated by commands. i.e 'id1,id2,id3' -->
|
||||
<UserModuleInstances>unassigned</UserModuleInstances>
|
||||
|
||||
<!-- User Modules Instance Type, default to local Instance Type -->
|
||||
<UserModuleInstanceType>unassigned</UserModuleInstanceType>
|
||||
|
||||
<!-- User Modules Security Group, default to local Security Group -->
|
||||
<UserModuleSecurityGroup>unassigned</UserModuleSecurityGroup>
|
||||
|
||||
<!-- Use EBS Volumes for User Module data storage? -->
|
||||
<!-- Applicable for system type = 'separate' only -->
|
||||
<UseUMEBSVolumes>y</UseUMEBSVolumes>
|
||||
|
||||
<!-- Size of User Module EBS Volumes in gigibytes -->
|
||||
<!-- Applicable for system type = 'separate' only -->
|
||||
<UMEBSVolumeSize>10</UMEBSVolumeSize>
|
||||
|
||||
<!-- Number of Performance Modules -->
|
||||
<PerformanceModuleCount>1</PerformanceModuleCount>
|
||||
|
||||
<!-- Performance Modules Instances list, use existing instances instead of Launching new ones -->
|
||||
<!-- This list would start with pm2, list is seperated by commands. i.e 'id1,id2,id3' -->
|
||||
<PerformanceModuleInstances>unassigned</PerformanceModuleInstances>
|
||||
|
||||
<!-- Number of DBRoots assigned to each Performance Module -->
|
||||
<DBRootsPerPM>1</DBRootsPerPM>
|
||||
|
||||
<!-- Use EBS Volumes for (um/pm) data storage (system type = 'combined')? -->
|
||||
<!-- Use EBS Volumes for pm data storage (system type = 'separate')? -->
|
||||
<UsePMEBSVolumes>y</UsePMEBSVolumes>
|
||||
|
||||
<!-- Size of Back-End Data EBS Volumes in gigibytes -->
|
||||
<PMEBSVolumeSize>100</PMEBSVolumeSize>
|
||||
|
||||
<!-- Enable Pm EBS Failvoer Support, meaning the EBS storage will be remounted -->
|
||||
<!-- when a Non-OAM-Parent-PM fails -->
|
||||
<PMEBSFailoverSupport>y</PMEBSFailoverSupport>
|
||||
|
||||
<!-- SNMP Trap Receiver IP Address: 0.0.0.0 means no snmptraps will be forwarded -->
|
||||
<SNMPTrapIPAddr>0.0.0.0</SNMPTrapIPAddr>
|
||||
|
||||
<!-- Total UM Memory Size Percentage, default to postConfigure setting -->
|
||||
<TotalUmMemory>unassigned</TotalUmMemory>
|
||||
|
||||
<!-- Blocks Cache Size Percentage, default to postConfigure setting -->
|
||||
<NumBlocksPct>unassigned</NumBlocksPct>
|
||||
|
||||
<!-- Root Password or 'ssh' for ssh-key setup -->
|
||||
<RootPassword>Calpont1</RootPassword>
|
||||
|
||||
<!-- Enables Automatic Amazon Instance/Volume tagging -->
|
||||
<!-- When set 'y', Instance Name Tags will be set to 'system-name'-'module-name' -->
|
||||
<!-- DBRoot Volume Name Tags will be set to 'system-name'-'dbrootID' -->
|
||||
<!-- User Module Volume Name Tags will be set to 'system-name'-'module-name' -->
|
||||
<AutoTagging>y</AutoTagging>
|
||||
|
||||
<!-- Amazon EC2 region your running in, run ec2-describe-regions to get valid region names -->
|
||||
<Region>us-east-1</Region>
|
||||
|
||||
<!-- x.509 Certification File with directory location. i.e. /root/cert-xxxx -->
|
||||
<x509CertificationFile>unassigned</x509CertificationFile>
|
||||
|
||||
<!-- x.509 Private Key File with directory location. i.e. /root/pk-xxxx -->
|
||||
<x509PrivateFile>unassigned</x509PrivateFile>
|
||||
</SystemConfig>
|
||||
</Calpont>
|
@ -1,111 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- $Id: amazonConfig.xml 2830 2012-04-08 17:38:58Z dhill $ -->
|
||||
<!-- Used with the amazonInstaller script-->
|
||||
<Calpont Version="V1.0.0">
|
||||
<SystemConfig>
|
||||
<!-- System Name-->
|
||||
<SystemName>calpont-1</SystemName>
|
||||
|
||||
<!-- System Type: combined (um and pm functionality on same instance)
|
||||
separate (um and pm functionality on separate instances) -->
|
||||
<SystemType>separate</SystemType>
|
||||
|
||||
<!--- VPC Configuration Setup -->
|
||||
<!--- -->
|
||||
<!--- subnet ID -->
|
||||
<!--- The ID of the Amazon VPC subnet in which to launch the instance(s) -->
|
||||
<SubNetID>unassigned</SubNetID>
|
||||
|
||||
<!-- VPC Starting Private IP Address -->
|
||||
<!-- Requires the SubNetID to be setup -->
|
||||
<!-- Use this if you want InfiniDB to assigned IP Addresses starting with this one -->
|
||||
<!-- Set value to 'autoassign' if you want Amazon to auto-assign IP Addresses within the subnet range -->
|
||||
<VPCStartPrivateIP>unassigned</VPCStartPrivateIP>
|
||||
|
||||
<!-- User Modules Private IP Address list, use when running on a Amazon VPC -->
|
||||
<!-- Requires the SubNetID to be setup -->
|
||||
<!-- This list would start with um1, list is seperated by commands. i.e 'ip1,ip2,ip3' -->
|
||||
<!-- IGNORED when VPCStartPrivateIP is set -->
|
||||
<UserModulePrivateIP>unassigned</UserModulePrivateIP>
|
||||
|
||||
<!-- Performance Modules Private IP Address list, use when running on a Amazon VPC -->
|
||||
<!-- Requires the SubNetID to be setup -->
|
||||
<!-- This list would start with pm2, list is seperated by commands. i.e 'ip1,ip2,ip3' -->
|
||||
<!-- IGNORED when VPCStartPrivateIP is set -->
|
||||
<PerformanceModulePrivateIP>unassigned</PerformanceModulePrivateIP>
|
||||
|
||||
<!-- Elastic IP to Module Assignment -->
|
||||
<!--- Example usages: x.x.x.x:um1 -->
|
||||
<!--- Example usages: x.x.x.x:um1,y.y.y.y:pm1 -->
|
||||
<ElasticIPs>unassigned</ElasticIPs>
|
||||
|
||||
<!-- Number of User Modules: n/a for combination system type -->
|
||||
<UserModuleCount>1</UserModuleCount>
|
||||
|
||||
<!-- User Modules Instances list, use existing instances instead of Launching new ones -->
|
||||
<!-- This list would start with um1, list is seperated by commands. i.e 'id1,id2,id3' -->
|
||||
<UserModuleInstances>unassigned</UserModuleInstances>
|
||||
|
||||
<!-- User Modules Instance Type, default to local Instance Type -->
|
||||
<UserModuleInstanceType>unassigned</UserModuleInstanceType>
|
||||
|
||||
<!-- User Modules Security Group, default to local Security Group -->
|
||||
<UserModuleSecurityGroup>unassigned</UserModuleSecurityGroup>
|
||||
|
||||
<!-- Use EBS Volumes for User Module data storage? -->
|
||||
<!-- Applicable for system type = 'separate' only -->
|
||||
<UseUMEBSVolumes>y</UseUMEBSVolumes>
|
||||
|
||||
<!-- Size of User Module EBS Volumes in gigibytes -->
|
||||
<!-- Applicable for system type = 'separate' only -->
|
||||
<UMEBSVolumeSize>10</UMEBSVolumeSize>
|
||||
|
||||
<!-- Number of Performance Modules -->
|
||||
<PerformanceModuleCount>2</PerformanceModuleCount>
|
||||
|
||||
<!-- Performance Modules Instances list, use existing instances instead of Launching new ones -->
|
||||
<!-- This list would start with pm2, list is seperated by commands. i.e 'id1,id2,id3' -->
|
||||
<PerformanceModuleInstances>unassigned</PerformanceModuleInstances>
|
||||
|
||||
<!-- Number of DBRoots assigned to each Performance Module -->
|
||||
<DBRootsPerPM>1</DBRootsPerPM>
|
||||
|
||||
<!-- Use EBS Volumes for (um/pm) data storage (system type = 'combined')? -->
|
||||
<!-- Use EBS Volumes for pm data storage (system type = 'separate')? -->
|
||||
<UsePMEBSVolumes>y</UsePMEBSVolumes>
|
||||
|
||||
<!-- Size of Back-End Data EBS Volumes in gigibytes -->
|
||||
<PMEBSVolumeSize>100</PMEBSVolumeSize>
|
||||
|
||||
<!-- Enable Pm EBS Failvoer Support, meaning the EBS storage will be remounted -->
|
||||
<!-- when a Non-OAM-Parent-PM fails -->
|
||||
<PMEBSFailoverSupport>n</PMEBSFailoverSupport>
|
||||
|
||||
<!-- SNMP Trap Receiver IP Address: 0.0.0.0 means no snmptraps will be forwarded -->
|
||||
<SNMPTrapIPAddr>0.0.0.0</SNMPTrapIPAddr>
|
||||
|
||||
<!-- Total UM Memory Size Percentage, default to postConfigure setting -->
|
||||
<TotalUmMemory>unassigned</TotalUmMemory>
|
||||
|
||||
<!-- Blocks Cache Size Percentage, default to postConfigure setting -->
|
||||
<NumBlocksPct>unassigned</NumBlocksPct>
|
||||
|
||||
<!-- Root Password or 'ssh' for ssh-key setup -->
|
||||
<RootPassword>Calpont1</RootPassword>
|
||||
|
||||
<!-- Enables Automatic Amazon Instance/Volume tagging -->
|
||||
<!-- When set 'y', Instance Name Tags will be set to 'system-name'-'module-name' -->
|
||||
<!-- DBRoot Volume Name Tags will be set to 'system-name'-'dbrootID' -->
|
||||
<!-- User Module Volume Name Tags will be set to 'system-name'-'module-name' -->
|
||||
<AutoTagging>y</AutoTagging>
|
||||
|
||||
<!-- Amazon EC2 region your running in, run ec2-describe-regions to get valid region names -->
|
||||
<Region>us-east-1</Region>
|
||||
|
||||
<!-- x.509 Certification File with directory location. i.e. /root/cert-xxxx -->
|
||||
<x509CertificationFile>unassigned</x509CertificationFile>
|
||||
|
||||
<!-- x.509 Private Key File with directory location. i.e. /root/pk-xxxx -->
|
||||
<x509PrivateFile>unassigned</x509PrivateFile>
|
||||
</SystemConfig>
|
||||
</Calpont>
|
File diff suppressed because it is too large
Load Diff
@ -48,8 +48,6 @@ string prompt;
|
||||
|
||||
const char* pcommand = 0;
|
||||
|
||||
extern string installDir;
|
||||
|
||||
extern bool noPrompting;
|
||||
|
||||
namespace installer
|
||||
@ -242,7 +240,7 @@ void dbrmDirCheck()
|
||||
}
|
||||
}
|
||||
|
||||
cmd = "chmod 755 -R " + installDir + "/data1/systemFiles/dbrm > /dev/null 2>&1";
|
||||
cmd = "chmod 755 -R /var/lib/columnstore/data1/systemFiles/dbrm > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
|
||||
return;
|
||||
@ -261,7 +259,7 @@ void mysqlSetup()
|
||||
if ( mysqlpw != oam::UnassignedName )
|
||||
passwordOption = " --password=" + mysqlpw;
|
||||
|
||||
cmd = installDir + "/bin/post-mysqld-install --installdir=" + installDir + " " + passwordOption + " --tmpdir=" + tmpDir + " > " + tmpDir + "/post-mysqld-install.log 2>&1";
|
||||
cmd = "post-mysqld-install " + passwordOption + " --tmpdir=" + tmpDir + " > " + tmpDir + "/post-mysqld-install.log 2>&1";
|
||||
int rtnCode = system(cmd.c_str());
|
||||
|
||||
if (WEXITSTATUS(rtnCode) != 0)
|
||||
@ -290,7 +288,7 @@ void mysqlSetup()
|
||||
HOME = p;
|
||||
}
|
||||
|
||||
cmd = installDir + "/bin/post-mysql-install --installdir=" + installDir + " --tmpdir=" + tmpDir + " > " + tmpDir + "/post-mysql-install.log";
|
||||
cmd = "post-mysql-install --tmpdir=" + tmpDir + " > " + tmpDir + "/post-mysql-install.log";
|
||||
rtnCode = system(cmd.c_str());
|
||||
|
||||
if (WEXITSTATUS(rtnCode) == 2)
|
||||
@ -593,7 +591,7 @@ void checkFilesPerPartion(int DBRootCount, Config* sysConfig)
|
||||
Oam oam;
|
||||
string SystemSection = "SystemConfig";
|
||||
|
||||
string dbRoot = installDir + "/data1";
|
||||
string dbRoot = "/var/lib/columnstore/data1";
|
||||
|
||||
try
|
||||
{
|
||||
@ -792,7 +790,7 @@ void checkSystemMySQLPort(std::string& mysqlPort, Config* sysConfig, std::string
|
||||
(remoteModuleType == "pm" && pmwithum) )
|
||||
{
|
||||
|
||||
string cmd = installDir + "/bin/remote_command_verify.sh " + remoteModuleIP + " " + " " + USER + " " + password + " '" + remotenetstat + "' tcp error 5 0 > /dev/null 2>&1";
|
||||
string cmd = "remote_command_verify.sh " + remoteModuleIP + " " + " " + USER + " " + password + " '" + remotenetstat + "' tcp error 5 0 > /dev/null 2>&1";
|
||||
int rtnCode = system(cmd.c_str());
|
||||
|
||||
if (WEXITSTATUS(rtnCode) == 0)
|
||||
|
@ -78,7 +78,6 @@ bool uncommentCalpontXml( string entry);
|
||||
|
||||
extern string pwprompt;
|
||||
|
||||
string installDir;
|
||||
bool noPrompting;
|
||||
string mysqlpw = " ";
|
||||
|
||||
@ -130,20 +129,16 @@ int main(int argc, char* argv[])
|
||||
|
||||
string numBlocksPctParam = "";
|
||||
string totalUmMemoryParam = "";
|
||||
if (argc >= 13) {
|
||||
installDir = argv[12];
|
||||
if (argc >= 15) {
|
||||
if (string(argv[13]) != "-") {
|
||||
if (argc >= 12) {
|
||||
if (argc >= 14) {
|
||||
if (string(argv[12]) != "-") {
|
||||
numBlocksPctParam = argv[13];
|
||||
}
|
||||
if (string(argv[14]) != "-") {
|
||||
if (string(argv[13]) != "-") {
|
||||
totalUmMemoryParam = argv[14];
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
installDir = "/usr/local/mariadb/columnstore";
|
||||
}
|
||||
|
||||
ofstream file("/dev/null");
|
||||
|
||||
@ -164,7 +159,6 @@ int main(int argc, char* argv[])
|
||||
cout << nodeps << endl;
|
||||
cout << mysqlpw << endl;
|
||||
cout << installer_debug << endl;
|
||||
cout << installDir << endl;
|
||||
if (!numBlocksPctParam.empty()) {
|
||||
cout << numBlocksPctParam << endl;
|
||||
}
|
||||
@ -542,13 +536,13 @@ int main(int argc, char* argv[])
|
||||
if ( installType == "initial" )
|
||||
{
|
||||
//cleanup/create /local/etc directories
|
||||
cmd = "rm -rf " + installDir + "/local/etc > /dev/null 2>&1";
|
||||
cmd = "rm -rf /var/lib/columnstore/local/etc > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
cmd = "mkdir " + installDir + "/local/etc > /dev/null 2>&1";
|
||||
cmd = "mkdir /var/lib/columnstore/local/etc > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
|
||||
//create associated /local/etc directory for parentOAMModuleName
|
||||
cmd = "mkdir " + installDir + "/local/etc/" + parentOAMModuleName + " > /dev/null 2>&1";
|
||||
cmd = "mkdir /var/lib/columnstore/local/etc/" + parentOAMModuleName + " > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
}
|
||||
|
||||
@ -626,7 +620,7 @@ int main(int argc, char* argv[])
|
||||
if ( installType == "initial" )
|
||||
{
|
||||
//create associated /local/etc directory for module
|
||||
cmd = "mkdir " + installDir + "/local/etc/" + moduleName + " > /dev/null 2>&1";
|
||||
cmd = "mkdir /var/lib/columnstore/local/etc/" + moduleName + " > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
}
|
||||
}
|
||||
@ -644,7 +638,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
for (; list1 != directormodulelist.end() ; list1++)
|
||||
{
|
||||
cmd = "mkdir " + installDir + "/local/etc/" + (*list1).moduleName + " > /dev/null 2>&1";
|
||||
cmd = "mkdir /var/lib/columnstore/local/etc/" + (*list1).moduleName + " > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
|
||||
//make module file in /local/etc/"modulename"
|
||||
@ -660,7 +654,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
for (; list1 != usermodulelist.end() ; list1++)
|
||||
{
|
||||
cmd = "mkdir " + installDir + "/local/etc/" + (*list1).moduleName + " > /dev/null 2>&1";
|
||||
cmd = "mkdir /var/lib/columnstore/local/etc/" + (*list1).moduleName + " > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
|
||||
//make module file in /local/etc/"modulename"
|
||||
@ -676,7 +670,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
for (; list1 != performancemodulelist.end() ; list1++)
|
||||
{
|
||||
cmd = "mkdir " + installDir + "/local/etc/" + (*list1).moduleName + " > /dev/null 2>&1";
|
||||
cmd = "mkdir /var/lib/columnstore/local/etc/" + (*list1).moduleName + " > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
|
||||
//make module file in /local/etc/"modulename"
|
||||
@ -689,99 +683,6 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
}
|
||||
|
||||
//perform uninstall option
|
||||
if ( installType == "uninstall" )
|
||||
{
|
||||
ModuleList::iterator list1 = childmodulelist.begin();
|
||||
|
||||
for (; list1 != childmodulelist.end() ; list1++)
|
||||
{
|
||||
string remoteModuleName = (*list1).moduleName;
|
||||
string remoteModuleIP = (*list1).moduleIP;
|
||||
string remoteHostName = (*list1).hostName;
|
||||
string remoteModuleType = remoteModuleName.substr(0, MAX_MODULE_TYPE_SIZE);
|
||||
|
||||
if ( remoteModuleType == "um" ||
|
||||
(remoteModuleType == "pm" && IserverTypeInstall == oam::INSTALL_COMBINE_DM_UM_PM) )
|
||||
{
|
||||
//run remote installer script
|
||||
if ( packageType != "binary" )
|
||||
{
|
||||
string temppwprompt = pwprompt;
|
||||
|
||||
if ( pwprompt == " " )
|
||||
temppwprompt = "none";
|
||||
|
||||
cout << endl << "----- Performing Uninstall on Module '" + remoteModuleName + "' -----" << endl << endl;
|
||||
cmd = installDir + "/bin/package_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " + password + " " + calpont_rpm1 + " " + calpont_rpm2 + " " + calpont_rpm3 + " " + mysql_rpm + " " + mysqld_rpm + " " + installType + " " + packageType + " " + nodeps + " " + temppwprompt + " " + installer_debug;
|
||||
int rtnCode = system(cmd.c_str());
|
||||
|
||||
if (WEXITSTATUS(rtnCode) != 0)
|
||||
{
|
||||
cout << endl << "ERROR: returned from package_installer.sh" << endl;
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// do a binary package install
|
||||
cmd = installDir + "/bin/binary_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " +
|
||||
password + " " + calpont_rpm1 + " " + remoteModuleType + " " + installType + " " +
|
||||
serverTypeInstall + " " + installer_debug + " " + installDir;
|
||||
int rtnCode = system(cmd.c_str());
|
||||
|
||||
if (WEXITSTATUS(rtnCode) != 0)
|
||||
{
|
||||
cout << endl << "ERROR: returned from binary_installer.sh" << endl;
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (remoteModuleType == "pm")
|
||||
{
|
||||
if ( packageType != "binary" )
|
||||
{
|
||||
//run remote installer script
|
||||
cout << endl << "----- Performing Uninstall on Module '" + remoteModuleName + "' -----" << endl << endl;
|
||||
cmd = installDir + "/bin/package_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " + password + " " + calpont_rpm1 + " " + calpont_rpm2 + " " + calpont_rpm3 + " " + mysql_rpm + " " + mysqld_rpm + " " + installType + " " + packageType + " " + nodeps + " " + installer_debug;
|
||||
int rtnCode = system(cmd.c_str());
|
||||
|
||||
if (WEXITSTATUS(rtnCode) != 0)
|
||||
{
|
||||
cout << endl << "ERROR returned from package_installer.sh" << endl;
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// do a binary package install
|
||||
cmd = installDir + "/bin/binary_installer.sh " + remoteModuleName + " " + remoteModuleIP +
|
||||
" " + password + " " + calpont_rpm1 + " " + remoteModuleType + " " + installType + " " +
|
||||
serverTypeInstall + " " + installer_debug + " " + installDir;
|
||||
int rtnCode = system(cmd.c_str());
|
||||
|
||||
if (WEXITSTATUS(rtnCode) != 0)
|
||||
{
|
||||
cout << endl << "ERROR returned from binary_installer.sh" << endl;
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//unmount child module
|
||||
cmd = "umount -fl /mnt/" + remoteModuleName + " > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
cmd = "rm -fr /mnt/" + remoteModuleName;
|
||||
system(cmd.c_str());
|
||||
}
|
||||
|
||||
cout << "uninstall request successful" << endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ( installType == "initial" )
|
||||
{
|
||||
//setup local OS Files
|
||||
@ -792,139 +693,12 @@ int main(int argc, char* argv[])
|
||||
exit(1);
|
||||
}
|
||||
|
||||
cmd = "chmod 755 -R " + installDir + "/data1/systemFiles/dbrm > /dev/null 2>&1";
|
||||
cmd = "chmod 755 -R /var/lib/columnstore/data1/systemFiles/dbrm > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
}
|
||||
|
||||
string idbstartcmd = installDir + "/bin/columnstore start";
|
||||
string idbstartcmd = "columnstore start";
|
||||
|
||||
if ( IserverTypeInstall != oam::INSTALL_COMBINE_DM_UM_PM ||
|
||||
performancemodulelist.size() > 1 )
|
||||
{
|
||||
//
|
||||
// perform multi-server install
|
||||
//
|
||||
|
||||
// perform remote install of servers in the system
|
||||
ModuleList::iterator list1 = childmodulelist.begin();
|
||||
|
||||
for (; list1 != childmodulelist.end() ; list1++)
|
||||
{
|
||||
string remoteModuleName = (*list1).moduleName;
|
||||
string remoteModuleIP = (*list1).moduleIP;
|
||||
string remoteHostName = (*list1).hostName;
|
||||
string remoteModuleType = remoteModuleName.substr(0, MAX_MODULE_TYPE_SIZE);
|
||||
|
||||
if ( remoteModuleType == "um" ||
|
||||
(remoteModuleType == "pm" && IserverTypeInstall == oam::INSTALL_COMBINE_DM_UM_PM) )
|
||||
{
|
||||
//run remote installer script
|
||||
if ( packageType != "binary" )
|
||||
{
|
||||
string temppwprompt = pwprompt;
|
||||
|
||||
if ( pwprompt == " " )
|
||||
temppwprompt = "none";
|
||||
|
||||
cout << endl << "----- Performing Install on Module '" + remoteModuleName + "' -----" << endl << endl;
|
||||
cmd = installDir + "/bin/package_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " + password + " " + calpont_rpm1 + " " + calpont_rpm2 + " " + calpont_rpm3 + " " + mysql_rpm + " " + mysqld_rpm + " " + installType + " " + packageType + " " + nodeps + " " + temppwprompt + " " + installer_debug;
|
||||
int rtnCode = system(cmd.c_str());
|
||||
|
||||
if (WEXITSTATUS(rtnCode) != 0)
|
||||
{
|
||||
cout << endl << "ERROR returned from package_installer.sh" << endl;
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// do a binary package install
|
||||
cmd = installDir + "/bin/binary_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " +
|
||||
password + " " + calpont_rpm1 + " " + remoteModuleType + " " + installType + " " +
|
||||
serverTypeInstall + " " + installer_debug + " " + installDir;
|
||||
int rtnCode = system(cmd.c_str());
|
||||
|
||||
if (WEXITSTATUS(rtnCode) != 0)
|
||||
{
|
||||
cout << endl << "ERROR returned from binary_installer.sh" << endl;
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (remoteModuleType == "pm" && IserverTypeInstall != oam::INSTALL_COMBINE_DM_UM_PM)
|
||||
{
|
||||
//run remote installer script
|
||||
if ( packageType != "binary" )
|
||||
{
|
||||
cout << endl << "----- Performing Install on Module '" + remoteModuleName + "' -----" << endl << endl;
|
||||
cmd = installDir + "/bin/package_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " + password + " " + calpont_rpm1 + " " + calpont_rpm2 + " " + calpont_rpm3 + " " + mysql_rpm + " " + mysqld_rpm + " " + installType + " " + packageType + " " + nodeps + " " + installer_debug;
|
||||
int rtnCode = system(cmd.c_str());
|
||||
|
||||
if (WEXITSTATUS(rtnCode) != 0)
|
||||
{
|
||||
cout << endl << "ERROR returned from package_installer.sh" << endl;
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// do a binary package install
|
||||
cmd = installDir + "/bin/binary_installer.sh " + remoteModuleName + " " + remoteModuleIP +
|
||||
" " + password + " " + calpont_rpm1 + " " + remoteModuleType + " " + installType +
|
||||
" " + serverTypeInstall + " " + installer_debug + " " + installDir;
|
||||
int rtnCode = system(cmd.c_str());
|
||||
|
||||
if (WEXITSTATUS(rtnCode) != 0)
|
||||
{
|
||||
cout << endl << "ERROR returned from binary_installer.sh" << endl;
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( IserverTypeInstall == oam::INSTALL_COMBINE_DM_UM_PM )
|
||||
{
|
||||
//run the mysql / mysqld setup scripts
|
||||
cout << endl << "Running the MariaDB ColumnStore setup scripts" << endl << endl;
|
||||
|
||||
// call the mysql setup scripts
|
||||
mysqlSetup();
|
||||
sleep(5);
|
||||
}
|
||||
|
||||
//
|
||||
// perform start of MariaDB ColumnStore of other servers in the system
|
||||
//
|
||||
list1 = childmodulelist.begin();
|
||||
|
||||
for (; list1 != childmodulelist.end() ; list1++)
|
||||
{
|
||||
string remoteModuleName = (*list1).moduleName;
|
||||
string remoteModuleIP = (*list1).moduleIP;
|
||||
string remoteHostName = (*list1).hostName;
|
||||
|
||||
if ( remoteModuleName == parentOAMModuleName )
|
||||
continue;
|
||||
|
||||
//run remote command script
|
||||
cmd = installDir + "/bin/remote_command.sh " + remoteModuleIP + " " + password + " '" + idbstartcmd + "' " + installer_debug;
|
||||
int rtnCode = system(cmd.c_str());
|
||||
|
||||
if (WEXITSTATUS(rtnCode) != 0)
|
||||
cout << "error with running remote_command.sh" << endl;
|
||||
}
|
||||
|
||||
//start on local module
|
||||
int rtnCode = system(idbstartcmd.c_str());
|
||||
|
||||
if (rtnCode != 0)
|
||||
cout << "Error starting MariaDB ColumnStore local module" << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
// perform single-server install from auto-installer
|
||||
@ -962,7 +736,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
//startup mysqld and infinidb processes
|
||||
cout << endl;
|
||||
cmd = installDir + "/bin/clearShm > /dev/null 2>&1";
|
||||
cmd = "clearShm > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
system(idbstartcmd.c_str());
|
||||
}
|
||||
@ -986,7 +760,7 @@ int main(int argc, char* argv[])
|
||||
cout << " DONE" << endl;
|
||||
|
||||
string logFile = tmpDir + "/dbbuilder.log";
|
||||
cmd = installDir + "/bin/dbbuilder 7 > " + logFile;
|
||||
cmd = "dbbuilder 7 > " + logFile;
|
||||
system(cmd.c_str());
|
||||
|
||||
if (oam.checkLogStatus(logFile, "System Catalog created") )
|
||||
@ -1072,14 +846,14 @@ bool setOSFiles(string parentOAMModuleName, int serverTypeInstall)
|
||||
cmd = "cp " + fileName + " " + fileName + ".columnstoreSave > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
|
||||
cmd = "cat " + installDir + "/local/etc/" + parentOAMModuleName + "/" + files[i] + ".calpont >> " + fileName;
|
||||
cmd = "cat /var/lib/columnstore/local/etc/" + parentOAMModuleName + "/" + files[i] + ".calpont >> " + fileName;
|
||||
|
||||
if (geteuid() == 0) system(cmd.c_str());
|
||||
|
||||
cmd = "rm -f " + installDir + "/local/ " + files[i] + "*.calpont > /dev/null 2>&1";
|
||||
cmd = "rm -f /var/lib/columnstore/local/ " + files[i] + "*.calpont > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
|
||||
cmd = "cp " + installDir + "/local/etc/" + parentOAMModuleName + "/" + files[i] + ".calpont " + installDir + "/local/. > /dev/null 2>&1";
|
||||
cmd = "cp /var/lib/columnstore/local/etc/" + parentOAMModuleName + "/" + files[i] + ".calpont /var/lib/columnstore/local/. > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
}
|
||||
|
||||
@ -1095,9 +869,9 @@ bool makeModuleFile(string moduleName, string parentOAMModuleName)
|
||||
string fileName;
|
||||
|
||||
if ( moduleName == parentOAMModuleName )
|
||||
fileName = installDir + "/local/module";
|
||||
fileName = "/var/lib/columnstore/local/module";
|
||||
else
|
||||
fileName = installDir + "/local/etc/" + moduleName + "/module";
|
||||
fileName = "/var/lib/columnstore/local/etc/" + moduleName + "/module";
|
||||
|
||||
unlink (fileName.c_str());
|
||||
ofstream newFile (fileName.c_str());
|
||||
|
@ -51,6 +51,7 @@
|
||||
#include <boost/regex.hpp>
|
||||
#include "liboamcpp.h"
|
||||
#include "installdir.h"
|
||||
#include "config.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace oam;
|
||||
@ -69,8 +70,8 @@ string rtrim(const string &in) {
|
||||
|
||||
void mergeMycnfIncludeArgs()
|
||||
{
|
||||
string userArgsFilename = startup::StartUp::installDir() + "/bin/myCnf-include-args.text.rpmsave";
|
||||
string packagedArgsFilename = startup::StartUp::installDir() + "/bin/myCnf-include-args.text";
|
||||
string userArgsFilename = std::string(MCSSUPPORTDIR) + "/myCnf-include-args.text.rpmsave";
|
||||
string packagedArgsFilename = std::string(MCSSUPPORTDIR) + "/myCnf-include-args.text";
|
||||
ifstream userArgs(userArgsFilename.c_str());
|
||||
fstream packagedArgs(packagedArgsFilename.c_str(), ios::in);
|
||||
|
||||
@ -125,7 +126,7 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
|
||||
//my.cnf file
|
||||
string mycnfFile = "/etc/my.cnf.d/columnstore.cnf";
|
||||
string mycnfFile = std::string(MCSMYCNFDIR) + "/columnstore.cnf";
|
||||
ifstream mycnffile (mycnfFile.c_str());
|
||||
|
||||
if (!mycnffile)
|
||||
@ -149,7 +150,7 @@ int main(int argc, char* argv[])
|
||||
mergeMycnfIncludeArgs();
|
||||
|
||||
//include arguments file
|
||||
string includeFile = startup::StartUp::installDir() + "/bin/myCnf-include-args.text";
|
||||
string includeFile = std::string(MCSSUPPORTDIR) + "/myCnf-include-args.text";
|
||||
ifstream includefile (includeFile.c_str());
|
||||
|
||||
if (!includefile)
|
||||
@ -159,7 +160,7 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
|
||||
//exclude arguments file
|
||||
string excludeFile = startup::StartUp::installDir() + "/bin/myCnf-exclude-args.text";
|
||||
string excludeFile = std::string(MCSSUPPORTDIR) + "/myCnf-exclude-args.text";
|
||||
ifstream excludefile (excludeFile.c_str());
|
||||
|
||||
if (!excludefile)
|
||||
|
@ -1,190 +0,0 @@
|
||||
/* Copyright (C) 2014 InfiniDB, Inc.
|
||||
Copyright (C) 2016 MariaDB Corporation
|
||||
|
||||
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: patchInstaller.cpp 64 2006-10-12 22:21:51Z dhill $
|
||||
*
|
||||
*
|
||||
* Installs Calpont Software Patches on Calpont System
|
||||
*
|
||||
******************************************************************************************/
|
||||
/**
|
||||
* @file
|
||||
*/
|
||||
|
||||
#include <iterator>
|
||||
#include <numeric>
|
||||
#include <deque>
|
||||
#include <iostream>
|
||||
#include <ostream>
|
||||
#include <fstream>
|
||||
#include <cstdlib>
|
||||
#include <string>
|
||||
#include <limits.h>
|
||||
#include <sstream>
|
||||
#include <exception>
|
||||
#include <stdexcept>
|
||||
#include <vector>
|
||||
#include "stdio.h"
|
||||
#include "ctype.h"
|
||||
#include <netdb.h>
|
||||
|
||||
#include "liboamcpp.h"
|
||||
#include "configcpp.h"
|
||||
#include "alarmmanager.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace oam;
|
||||
using namespace config;
|
||||
|
||||
bool installParentOAM( string patchLocation, string installLocation, string softwareFile );
|
||||
|
||||
typedef std::vector<string> Devices;
|
||||
|
||||
typedef struct Child_Module_struct
|
||||
{
|
||||
std::string moduleName;
|
||||
std::string moduleIP;
|
||||
std::string hostName;
|
||||
} ChildModule;
|
||||
|
||||
typedef std::vector<ChildModule> ChildModuleList;
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
Oam oam;
|
||||
string parentOAMModuleIPAddr;
|
||||
ChildModuleList childmodulelist;
|
||||
ChildModule childmodule;
|
||||
string prompt;
|
||||
string installer_debug = "0";
|
||||
|
||||
Config* sysConfig = Config::makeConfig();
|
||||
string SystemSection = "SystemConfig";
|
||||
|
||||
string patchLocation = argv[1];
|
||||
string installLocation = argv[2];
|
||||
string softwareFile = argv[3];
|
||||
string password = argv[4];
|
||||
installer_debug = argv[5];
|
||||
|
||||
//get Parent OAM Module Name
|
||||
string parentOAMModuleName;
|
||||
|
||||
try
|
||||
{
|
||||
parentOAMModuleName = sysConfig->getConfig(SystemSection, "ParentOAMModuleName");
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
cout << "ERROR: Problem getting Parent OAM Module Name" << endl;
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
//install patch on Parent OAM Module
|
||||
cout << endl << "----- Performing Patch installation on Controller OAM Module -----" << endl;
|
||||
|
||||
if ( !installParentOAM( patchLocation, installLocation, softwareFile ) )
|
||||
cout << "Install Patch on Parent OAM Module error" << endl;
|
||||
else
|
||||
cout << "!!!Patch Installation on Controller OAM Module Successfully Completed" << endl;
|
||||
|
||||
//Get list of configured system modules
|
||||
SystemModuleTypeConfig sysModuleTypeConfig;
|
||||
|
||||
try
|
||||
{
|
||||
oam.getSystemConfig(sysModuleTypeConfig);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
cout << "ERROR: Problem reading the Calpont System Configuration file" << endl;
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
string ModuleSection = "SystemModuleConfig";
|
||||
|
||||
for ( unsigned int i = 0 ; i < sysModuleTypeConfig.moduletypeconfig.size(); i++)
|
||||
{
|
||||
int moduleCount = sysModuleTypeConfig.moduletypeconfig[i].ModuleCount;
|
||||
|
||||
if ( moduleCount == 0 )
|
||||
//no modules equipped for this Module Type, skip
|
||||
continue;
|
||||
|
||||
//get IP addresses and Host Names
|
||||
for ( int k = 0 ; k < moduleCount ; k++ )
|
||||
{
|
||||
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;
|
||||
|
||||
if ( (*pt1).IPAddr == oam::UnassignedIpAddr)
|
||||
// skip, unassigned server
|
||||
continue;
|
||||
|
||||
//Install Software Patch on non Parent OAM Modules
|
||||
if ( moduleName != parentOAMModuleName )
|
||||
{
|
||||
//run remote patch installer script
|
||||
cout << endl << "----- Performing Patch installation of Module '" + moduleName + "' -----" << endl << endl;
|
||||
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)
|
||||
cout << "Error with running patch_installer.sh" << endl;
|
||||
}
|
||||
}
|
||||
} // end of k loop
|
||||
} //end of i for loop
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Install Software File patch on local Parent OAM Module
|
||||
*/
|
||||
|
||||
bool installParentOAM( string patchLocation, string installLocation, string softwareFile )
|
||||
{
|
||||
// Rename current file
|
||||
string cmd = "mv " + installLocation + softwareFile + " " + installLocation + softwareFile + ".patchSave";
|
||||
int rtnCode = system(cmd.c_str());
|
||||
|
||||
if (rtnCode != 0)
|
||||
{
|
||||
cout << "Error save current file" << endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Install patch file
|
||||
cmd = "cp " + patchLocation + softwareFile + " " + installLocation + softwareFile;
|
||||
rtnCode = system(cmd.c_str());
|
||||
|
||||
if (rtnCode != 0)
|
||||
{
|
||||
cout << "Error copying patch file" << endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
@ -191,9 +191,6 @@ bool amazon_quick_install = false;
|
||||
bool doNotResolveHostNames = false;
|
||||
bool resolveHostNamesToReverseDNSNames = false;
|
||||
|
||||
string DataFileEnvFile;
|
||||
|
||||
string installDir;
|
||||
string tmpDir;
|
||||
string HOME = "/root";
|
||||
string SUDO = "";
|
||||
@ -237,37 +234,6 @@ int main(int argc, char* argv[])
|
||||
// -f for force use nodeps on rpm install
|
||||
// -o to prompt for process to start offline
|
||||
|
||||
//default
|
||||
installDir = installDir + "";
|
||||
//see if we can determine our own location
|
||||
ostringstream oss;
|
||||
oss << "/proc/" << getpid() << "/exe";
|
||||
ssize_t rlrc;
|
||||
const size_t psz = PATH_MAX;
|
||||
char thisexepath[psz + 1];
|
||||
memset(thisexepath, 0, psz + 1);
|
||||
rlrc = readlink(oss.str().c_str(), thisexepath, psz);
|
||||
|
||||
if (rlrc > 0)
|
||||
{
|
||||
thisexepath[rlrc] = 0;
|
||||
//should look something like '/usr/local/mariadb/columnstore/bin/postConfigure'
|
||||
char* ptr;
|
||||
ptr = strrchr(thisexepath, '/');
|
||||
|
||||
if (ptr)
|
||||
{
|
||||
*ptr = 0;
|
||||
ptr = strrchr(thisexepath, '/');
|
||||
|
||||
if (ptr)
|
||||
{
|
||||
*ptr = 0;
|
||||
installDir = thisexepath;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//check if root-user
|
||||
int user;
|
||||
user = getuid();
|
||||
@ -320,7 +286,6 @@ int main(int argc, char* argv[])
|
||||
cout << " -qs Quick Install - Single Server" << endl;
|
||||
cout << " -qm Quick Install - Multi Server" << endl;
|
||||
cout << " -port MariaDB ColumnStore Port Address" << endl;
|
||||
cout << " -i Non-root Install directory, Only use for non-root installs" << endl;
|
||||
cout << " -sn System Name" << endl;
|
||||
cout << " -pm-ip-addrs Performance Module IP Addresses xxx.xxx.xxx.xxx,xxx.xxx.xxx.xxx" << endl;
|
||||
cout << " -um-ip-addrs User Module IP Addresses xxx.xxx.xxx.xxx,xxx.xxx.xxx.xxx" << endl;
|
||||
@ -411,17 +376,6 @@ int main(int argc, char* argv[])
|
||||
exit (1);
|
||||
}
|
||||
}
|
||||
else if( string("-i") == argv[i] )
|
||||
{
|
||||
i++;
|
||||
if (i >= argc )
|
||||
{
|
||||
cout << " ERROR: Path not provided" << endl;
|
||||
exit (1);
|
||||
}
|
||||
|
||||
installDir = argv[i];
|
||||
}
|
||||
else if( string("-sn") == argv[i] )
|
||||
{
|
||||
i++;
|
||||
@ -532,12 +486,6 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
}
|
||||
|
||||
if (installDir[0] != '/')
|
||||
{
|
||||
cout << " ERROR: Install dir '" << installDir << "' is not absolute" << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ( oldFileName == oam::UnassignedName )
|
||||
oldFileName = std::string(MCSSYSCONFDIR) + "/columnstore/Columnstore.xml.rpmsave";
|
||||
|
||||
@ -745,7 +693,7 @@ int main(int argc, char* argv[])
|
||||
// run columnstore.cnf upgrade script
|
||||
if ( reuseConfig == "y" )
|
||||
{
|
||||
cmd = installDir + "/bin/mycnfUpgrade > " + tmpDir + "/mycnfUpgrade.log 2>&1";
|
||||
cmd = "mycnfUpgrade > " + tmpDir + "/mycnfUpgrade.log 2>&1";
|
||||
int rtnCode = system(cmd.c_str());
|
||||
|
||||
if (WEXITSTATUS(rtnCode) != 0)
|
||||
@ -970,7 +918,7 @@ int main(int argc, char* argv[])
|
||||
totalUmMemoryParam = "-";
|
||||
}
|
||||
|
||||
cmd = installDir + "/bin/installer dummy.rpm dummy.rpm dummy.rpm dummy.rpm dummy.rpm initial dummy " + reuseConfig + " --nodeps ' ' 1 " + installDir + " " + numBlocksPctParam + " " + totalUmMemoryParam;
|
||||
cmd = "columnstore_installer dummy.rpm dummy.rpm dummy.rpm dummy.rpm dummy.rpm initial dummy " + reuseConfig + " --nodeps ' ' 1 " + numBlocksPctParam + " " + totalUmMemoryParam;
|
||||
system(cmd.c_str());
|
||||
exit(0);
|
||||
}
|
||||
@ -1105,9 +1053,9 @@ int main(int argc, char* argv[])
|
||||
|
||||
cout << endl;
|
||||
//cleanup/create local/etc directory
|
||||
cmd = "rm -rf " + installDir + "/local/etc > /dev/null 2>&1";
|
||||
cmd = "rm -rf /var/lib/columnstore/local/etc > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
cmd = "mkdir " + installDir + "/local/etc > /dev/null 2>&1";
|
||||
cmd = "mkdir /var/lib/columnstore/local/etc > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
|
||||
cout << endl << "===== Setup System Module Type Configuration =====" << endl << endl;
|
||||
@ -1471,7 +1419,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
if ( amazonInstall )
|
||||
{
|
||||
string cmd = installDir + "/bin/MCSgetCredentials.sh >/dev/null 2>&1";
|
||||
string cmd = "MCSgetCredentials.sh >/dev/null 2>&1";
|
||||
int rtnCode = system(cmd.c_str());
|
||||
|
||||
if ( WEXITSTATUS(rtnCode) != 0 )
|
||||
@ -1567,7 +1515,7 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
|
||||
//create associated local/etc directory for parentOAMModuleName
|
||||
cmd = "mkdir " + installDir + "/local/etc/" + parentOAMModuleName + " > /dev/null 2>&1";
|
||||
cmd = "mkdir /var/lib/columnstore/local/etc/" + parentOAMModuleName + " > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
|
||||
//setup local module file name
|
||||
@ -2821,7 +2769,7 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
|
||||
//create associated local/etc directory for module
|
||||
string cmd = "mkdir " + installDir + "/local/etc/" + newModuleName + " > /dev/null 2>&1";
|
||||
string cmd = "mkdir /var/lib/columnstore/local/etc/" + newModuleName + " > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
|
||||
if ( newModuleName != parentOAMModuleName)
|
||||
@ -3231,7 +3179,7 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
|
||||
string DBrootID = "DBRoot" + *it;
|
||||
string pathID = installDir + "/data" + *it;
|
||||
string pathID = "/var/lib/columnstore/data" + *it;
|
||||
|
||||
try
|
||||
{
|
||||
@ -3729,7 +3677,7 @@ int main(int argc, char* argv[])
|
||||
//check if local MariaDB ColumnStore system logging is working
|
||||
cout << endl << "===== Checking MariaDB ColumnStore System Logging Functionality =====" << endl << endl;
|
||||
|
||||
cmd = installDir + "/bin/syslogSetup.sh status > /dev/null 2>&1";
|
||||
cmd = "columnstoreSyslogSetup.sh status > /dev/null 2>&1";
|
||||
|
||||
int ret = system(cmd.c_str());
|
||||
|
||||
@ -3762,7 +3710,7 @@ int main(int argc, char* argv[])
|
||||
{
|
||||
//start MariaDB ColumnStore on local server
|
||||
cout << endl << "----- Starting MariaDB ColumnStore on local server -----" << endl << endl;
|
||||
cmd = installDir + "/bin/columnstore restart > /dev/null 2>&1";
|
||||
cmd = "columnstore restart > /dev/null 2>&1";
|
||||
int rtnCode = system(cmd.c_str());
|
||||
|
||||
if (WEXITSTATUS(rtnCode) != 0)
|
||||
@ -3784,7 +3732,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
//start MariaDB ColumnStore on local server
|
||||
cout << endl << "----- Starting MariaDB ColumnStore on local Server '" + parentOAMModuleName + "' -----" << endl << endl;
|
||||
string cmd = installDir + "/bin/columnstore restart > /dev/null 2>&1";
|
||||
string cmd = "columnstore restart > /dev/null 2>&1";
|
||||
int rtnCode = system(cmd.c_str());
|
||||
|
||||
if (WEXITSTATUS(rtnCode) != 0)
|
||||
@ -3832,7 +3780,7 @@ int main(int argc, char* argv[])
|
||||
string ModuleDBRootID = "ModuleDBRootID" + oam.itoa(pm + 1) + "-" + oam.itoa(i + 1) + "-3";
|
||||
string dbr = sysConfig->getConfig("SystemModuleConfig", ModuleDBRootID);
|
||||
string command = "" + moduleIPAddr +
|
||||
":/dbroot" + dbr + " " + installDir + "/data" + dbr +
|
||||
":/dbroot" + dbr + " /var/lib/columnstore/data" + dbr +
|
||||
" glusterfs defaults,direct-io-mode=enable 00";
|
||||
string toPM = "pm" + oam.itoa(pm + 1);
|
||||
oam.distributeFstabUpdates(command, toPM);
|
||||
@ -3842,10 +3790,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
string dbbuilderLog = tmpDir + "/dbbuilder.log";
|
||||
|
||||
if (hdfs)
|
||||
cmd = "bash -c '. " + installDir + "/bin/" + DataFileEnvFile + ";" + installDir + "/bin/dbbuilder 7 > " + dbbuilderLog;
|
||||
else
|
||||
cmd = installDir + "/bin/dbbuilder 7 > " + dbbuilderLog;
|
||||
cmd = "dbbuilder 7 > " + dbbuilderLog;
|
||||
|
||||
system(cmd.c_str());
|
||||
|
||||
@ -4076,7 +4021,7 @@ bool checkSaveConfigFile()
|
||||
return false;
|
||||
}
|
||||
|
||||
cmd = "cd " + std::string(MCSSYSCONFDIR) + "/columnstore;" + installDir + "/bin/autoConfigure " + extentMapCheckOnly;
|
||||
cmd = "cd " + std::string(MCSSYSCONFDIR) + "/columnstore;autoConfigure " + extentMapCheckOnly;
|
||||
rtnCode = system(cmd.c_str());
|
||||
|
||||
if (WEXITSTATUS(rtnCode) != 0)
|
||||
@ -4174,17 +4119,17 @@ bool setOSFiles(string parentOAMModuleName, int serverTypeInstall)
|
||||
|
||||
system(cmd.c_str());
|
||||
|
||||
cmd = "cat " + installDir + "/local/etc/" + parentOAMModuleName + "/" + files[i] + ".calpont >> " + fileName;
|
||||
cmd = "cat /var/lib/columnstore/local/etc/" + parentOAMModuleName + "/" + files[i] + ".calpont >> " + fileName;
|
||||
|
||||
int rtnCode = system(cmd.c_str());
|
||||
|
||||
if (WEXITSTATUS(rtnCode) != 0)
|
||||
cout << "Error Updating " + files[i] << endl;
|
||||
|
||||
cmd = "rm -f " + installDir + "/local/ " + files[i] + "*.calpont > /dev/null 2>&1";
|
||||
cmd = "rm -f /var/lib/columnstore/local/ " + files[i] + "*.calpont > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
|
||||
cmd = "cp " + installDir + "/local/etc/" + parentOAMModuleName + "/" + files[i] + ".calpont " + installDir + "/local/. > /dev/null 2>&1";
|
||||
cmd = "cp /var/lib/columnstore/local/etc/" + parentOAMModuleName + "/" + files[i] + ".calpont /var/lib/columnstore/local/. > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
}
|
||||
|
||||
@ -4195,7 +4140,7 @@ bool setOSFiles(string parentOAMModuleName, int serverTypeInstall)
|
||||
if (!oldFile)
|
||||
return allfound;
|
||||
|
||||
string cmd = "cp " + fileName + " " + installDir + "/local/etc/. > /dev/null 2>&1";
|
||||
string cmd = "cp " + fileName + " /var/lib/columnstore/local/etc/. > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
return allfound;
|
||||
}
|
||||
@ -4450,7 +4395,7 @@ bool createDbrootDirs(string DBRootStorageType, bool amazonInstall)
|
||||
// mount data1 and create directories if configured with storage
|
||||
if ( DBRootStorageType == "external" )
|
||||
{
|
||||
string cmd = "mount " + installDir + "/data1 > " + tmpDir + "/mount.log 2>&1";
|
||||
string cmd = "mount /var/lib/columnstore/data1 > " + tmpDir + "/mount.log 2>&1";
|
||||
system(cmd.c_str());
|
||||
|
||||
if ( !rootUser)
|
||||
@ -4460,12 +4405,12 @@ bool createDbrootDirs(string DBRootStorageType, bool amazonInstall)
|
||||
if ( amazonInstall )
|
||||
SUDO = "sudo ";
|
||||
|
||||
cmd = SUDO + "chown -R " + USER + ":" + USER + " " + installDir + "/data1 > /dev/null";
|
||||
cmd = SUDO + "chown -R " + USER + ":" + USER + " /var/lib/columnstore/data1 > /dev/null";
|
||||
system(cmd.c_str());
|
||||
}
|
||||
|
||||
// create system file directories
|
||||
cmd = "mkdir -p " + installDir + "/data1/systemFiles/dbrm > /dev/null 2>&1";
|
||||
cmd = "mkdir -p /var/lib/columnstore/data1/systemFiles/dbrm > /dev/null 2>&1";
|
||||
rtnCode = system(cmd.c_str());
|
||||
|
||||
if (WEXITSTATUS(rtnCode) != 0)
|
||||
@ -4475,7 +4420,7 @@ bool createDbrootDirs(string DBRootStorageType, bool amazonInstall)
|
||||
}
|
||||
}
|
||||
|
||||
cmd = "chmod 755 -R " + installDir + "/data1/systemFiles/dbrm > /dev/null 2>&1";
|
||||
cmd = "chmod 755 -R /var/lib/columnstore/data1/systemFiles/dbrm > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
|
||||
return true;
|
||||
@ -4578,105 +4523,7 @@ bool storageSetup(bool amazonInstall)
|
||||
{
|
||||
hdfs = false;
|
||||
sysConfig->setConfig("StorageManager", "Enabled", "Y");
|
||||
sysConfig->setConfig("SystemConfig", "DataFilePlugin", "$INSTALLDIR/lib/libcloudio.so");
|
||||
sysConfig->setConfig("SystemConfig", "DataFileEnvFile", "");
|
||||
}
|
||||
else if (hdfs)
|
||||
{
|
||||
//default
|
||||
DataFileEnvFile = "setenv-hdfs-20";
|
||||
|
||||
try
|
||||
{
|
||||
DataFileEnvFile = sysConfig->getConfig("SystemConfig", "DataFileEnvFile");
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
DataFileEnvFile = "setenv-hdfs-20";
|
||||
}
|
||||
|
||||
string DataFilePlugin = installDir + "/lib/hdfs-20.so";
|
||||
|
||||
try
|
||||
{
|
||||
DataFilePlugin = sysConfig->getConfig("SystemConfig", "DataFilePlugin");
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
DataFilePlugin = installDir + "/lib/hdfs-20.so";
|
||||
}
|
||||
|
||||
while (true)
|
||||
{
|
||||
cout << " Running HDFS Sanity Test (please wait): ";
|
||||
cout.flush();
|
||||
string logdir("/var/log/mariadb/columnstore");
|
||||
|
||||
if (access(logdir.c_str(), W_OK) != 0) logdir = tmpDir;
|
||||
|
||||
string hdfslog = logdir + "/hdfsCheck.log1";
|
||||
|
||||
string cmd = ". " + installDir + "/bin/" + DataFileEnvFile + ";" + installDir + "/bin/hdfsCheck " + DataFilePlugin + " > " + hdfslog + " 2>&1";
|
||||
system(cmd.c_str());
|
||||
|
||||
if (oam.checkLogStatus(hdfslog, "All HDFS checks passed!"))
|
||||
{
|
||||
cout << " PASSED" << endl;
|
||||
|
||||
try
|
||||
{
|
||||
sysConfig->setConfig("SystemConfig", "DataFilePlugin", DataFilePlugin);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
cout << "ERROR: Problem setting DataFilePlugin in the MariaDB ColumnStore System Configuration file" << endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
sysConfig->setConfig("SystemConfig", "DataFileEnvFile", DataFileEnvFile);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
cout << "ERROR: Problem setting DataFileEnvFile in the MariaDB ColumnStore System Configuration file" << endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( !writeConfig(sysConfig) )
|
||||
{
|
||||
cout << "ERROR: Failed trying to update MariaDB ColumnStore System Configuration file" << endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << " FAILED (Tested with Hadoop Datafile Plugin File (" + DataFilePlugin + "), please re-enter or enter 'exit' to Investigate)" << endl << endl;
|
||||
|
||||
if ( noPrompting )
|
||||
exit(1);
|
||||
|
||||
prompt = "Enter the Hadoop Datafile Plugin File (" + DataFilePlugin + ") > ";
|
||||
pcommand = callReadline(prompt.c_str());
|
||||
|
||||
if (pcommand)
|
||||
{
|
||||
if (strlen(pcommand) > 0) DataFilePlugin = pcommand;
|
||||
|
||||
callFree(pcommand);
|
||||
}
|
||||
|
||||
if ( DataFilePlugin == "exit" )
|
||||
exit (1);
|
||||
|
||||
if ( DataFilePlugin != installDir + "/lib/hdfs-20.so" )
|
||||
DataFileEnvFile = "setenv-hdfs-12";
|
||||
else
|
||||
DataFileEnvFile = "setenv-hdfs-20";
|
||||
}
|
||||
}
|
||||
sysConfig->setConfig("SystemConfig", "DataFilePlugin", "libcloudio.so");
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -5416,136 +5263,11 @@ bool storageSetup(bool amazonInstall)
|
||||
sysConfig->setConfig("PrimitiveServers", "DirectIO", "y");
|
||||
}
|
||||
|
||||
// if hadoop / hdfs
|
||||
#if 0
|
||||
We are not supporting HDFS anymore. Leaving this here for future use.
|
||||
if ( storageType == "4" )
|
||||
{
|
||||
hdfs = true;
|
||||
string DataFilePlugin = installDir + "/lib/hdfs-20.so";
|
||||
|
||||
try
|
||||
{
|
||||
DataFilePlugin = sysConfig->getConfig("SystemConfig", "DataFilePlugin");
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
DataFilePlugin = installDir + "/lib/hdfs-20.so";
|
||||
}
|
||||
|
||||
if (DataFilePlugin.empty() || DataFilePlugin == "")
|
||||
DataFilePlugin = installDir + "/lib/hdfs-20.so";
|
||||
|
||||
DataFileEnvFile = "setenv-hdfs-20";
|
||||
|
||||
try
|
||||
{
|
||||
DataFileEnvFile = sysConfig->getConfig("SystemConfig", "DataFileEnvFile");
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
DataFileEnvFile = "setenv-hdfs-20";
|
||||
}
|
||||
|
||||
if (DataFileEnvFile.empty() || DataFileEnvFile == "" || DataFileEnvFile == oam::UnassignedName)
|
||||
DataFileEnvFile = "setenv-hdfs-20";
|
||||
|
||||
cout << endl;
|
||||
|
||||
while (true)
|
||||
{
|
||||
prompt = "Enter the Hadoop Datafile Plugin File (" + DataFilePlugin + ") > ";
|
||||
pcommand = callReadline(prompt.c_str());
|
||||
|
||||
if (pcommand)
|
||||
{
|
||||
if (strlen(pcommand) > 0) DataFilePlugin = pcommand;
|
||||
|
||||
callFree(pcommand);
|
||||
}
|
||||
|
||||
if ( DataFilePlugin == "exit" )
|
||||
exit (1);
|
||||
|
||||
if ( DataFilePlugin != installDir + "/lib/hdfs-20.so" )
|
||||
DataFileEnvFile = "setenv-hdfs-12";
|
||||
|
||||
ifstream File (DataFilePlugin.c_str());
|
||||
|
||||
if (!File)
|
||||
cout << "Error: Hadoop Datafile Plugin File (" + DataFilePlugin + ") doesn't exist, please re-enter" << endl;
|
||||
else
|
||||
{
|
||||
cout << endl << " Running HDFS Sanity Test (please wait): ";
|
||||
cout.flush();
|
||||
string logdir("/var/log/mariadb/columnstore");
|
||||
|
||||
if (access(logdir.c_str(), W_OK) != 0) logdir = tmpDir;
|
||||
|
||||
string hdfslog = logdir + "/hdfsCheck.log1";
|
||||
|
||||
string cmd = installDir + "/bin/hdfsCheck " + DataFilePlugin + " > " + hdfslog + " 2>&1";
|
||||
system(cmd.c_str());
|
||||
|
||||
if (oam.checkLogStatus(hdfslog, "All HDFS checks passed!"))
|
||||
{
|
||||
cout << " PASSED" << endl;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << " FAILED (Tested with Hadoop Datafile Plugin File (" + DataFilePlugin + "), please re-enter or enter 'exit' to Investigate)" << endl << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
sysConfig->setConfig("SystemConfig", "DataFilePlugin", DataFilePlugin);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
cout << "ERROR: Problem setting DataFilePlugin in the MariaDB ColumnStore System Configuration file" << endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
sysConfig->setConfig("SystemConfig", "DataFileEnvFile", DataFileEnvFile);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
cout << "ERROR: Problem setting DataFileEnvFile in the MariaDB ColumnStore System Configuration file" << endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
sysConfig->setConfig("SystemConfig", "DataFileLog", "OFF");
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
cout << "ERROR: Problem setting DataFileLog in the MariaDB ColumnStore System Configuration file" << endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
sysConfig->setConfig("ExtentMap", "ExtentsPerSegmentFile", "1");
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
cout << "ERROR: Problem setting ExtentsPerSegmentFile in the MariaDB ColumnStore System Configuration file" << endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (storageType == "4")
|
||||
{
|
||||
hdfs = false;
|
||||
sysConfig->setConfig("StorageManager", "Enabled", "Y");
|
||||
sysConfig->setConfig("SystemConfig", "DataFilePlugin", "$INSTALLDIR/lib/libcloudio.so");
|
||||
sysConfig->setConfig("SystemConfig", "DataFileEnvFile", "");
|
||||
sysConfig->setConfig("SystemConfig", "DataFilePlugin", "libcloudio.so");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -5561,16 +5283,6 @@ bool storageSetup(bool amazonInstall)
|
||||
return false;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
sysConfig->setConfig("SystemConfig", "DataFileEnvFile", "");
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
cout << "ERROR: Problem setting DataFileEnvFile in the MariaDB ColumnStore System Configuration file" << endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( !writeConfig(sysConfig) )
|
||||
{
|
||||
cout << "ERROR: Failed trying to update MariaDB ColumnStore System Configuration file" << endl;
|
||||
@ -5645,7 +5357,7 @@ void setSystemName()
|
||||
bool copyFstab(string moduleName)
|
||||
{
|
||||
string cmd;
|
||||
cmd = "/bin/cp -f /etc/fstab " + installDir + "/local/etc/" + moduleName + "/. > /dev/null 2>&1";
|
||||
cmd = "/bin/cp -f /etc/fstab /var/lib/columnstore/local/etc/" + moduleName + "/. > /dev/null 2>&1";
|
||||
|
||||
system(cmd.c_str());
|
||||
|
||||
@ -5661,9 +5373,9 @@ bool makeModuleFile(string moduleName, string parentOAMModuleName)
|
||||
string fileName;
|
||||
|
||||
if ( moduleName == parentOAMModuleName)
|
||||
fileName = installDir + "/local/module";
|
||||
fileName = "/var/lib/columnstore/local/module";
|
||||
else
|
||||
fileName = installDir + "/local/etc/" + moduleName + "/module";
|
||||
fileName = "/var/lib/columnstore/local/etc/" + moduleName + "/module";
|
||||
|
||||
unlink (fileName.c_str());
|
||||
ofstream newFile (fileName.c_str());
|
||||
@ -5685,16 +5397,6 @@ bool updateBash()
|
||||
|
||||
ifstream newFile (fileName.c_str());
|
||||
|
||||
if ( hdfs )
|
||||
{
|
||||
string cmd = "echo . " + installDir + "/bin/" + DataFileEnvFile + " >> " + fileName;
|
||||
system(cmd.c_str());
|
||||
|
||||
cmd = "su - hdfs -c 'hadoop fs -mkdir -p " + installDir + ";hadoop fs -chown root:root " + installDir + "' >/dev/null 2>&1";
|
||||
|
||||
system(cmd.c_str());
|
||||
}
|
||||
|
||||
newFile.close();
|
||||
|
||||
return true;
|
||||
@ -5963,7 +5665,7 @@ bool singleServerDBrootSetup()
|
||||
}
|
||||
|
||||
string DBrootID = "DBRoot" + *it;
|
||||
string pathID = installDir + "/data" + *it;
|
||||
string pathID = "/var/lib/columnstore/data" + *it;
|
||||
|
||||
try
|
||||
{
|
||||
@ -6146,7 +5848,7 @@ bool glusterSetup(string password, bool doNotResolveHostNames)
|
||||
std::vector<int> dbrootPms[DBRootCount];
|
||||
DataRedundancySetup DataRedundancyConfigs[pmNumber];
|
||||
string command = "";
|
||||
string remoteCommand = installDir + "/bin/remote_command.sh ";
|
||||
string remoteCommand = "remote_command.sh ";
|
||||
|
||||
// how many copies?
|
||||
if (pmNumber > 2)
|
||||
@ -6584,7 +6286,7 @@ bool glusterSetup(string password, bool doNotResolveHostNames)
|
||||
{
|
||||
for ( int brick = 1; brick <= numberBricksPM; brick++)
|
||||
{
|
||||
command = remoteCommand + DataRedundancyConfigs[pm].pmIpAddr + " " + password + " 'mkdir -p " + installDir + "/gluster/brick" + oam.itoa(brick) + "'";
|
||||
command = remoteCommand + DataRedundancyConfigs[pm].pmIpAddr + " " + password + " 'mkdir -p /var/lib/columnstore/gluster/brick" + oam.itoa(brick) + "'";
|
||||
status = system(command.c_str());
|
||||
|
||||
if (WEXITSTATUS(status) != 0 )
|
||||
@ -6712,7 +6414,7 @@ bool glusterSetup(string password, bool doNotResolveHostNames)
|
||||
for (; dbrootPmIter < dbrootPms[db].end(); dbrootPmIter++ )
|
||||
{
|
||||
int pm = (*dbrootPmIter) - 1;
|
||||
command += DataRedundancyConfigs[pm].pmIpAddr + ":" + installDir + "/gluster/brick" + oam.itoa(pmnextbrick[pm]) + " ";
|
||||
command += DataRedundancyConfigs[pm].pmIpAddr + ":/var/lib/columnstore/gluster/brick" + oam.itoa(pmnextbrick[pm]) + " ";
|
||||
pmnextbrick[pm]++;
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user