1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

more changes for names

This commit is contained in:
david hill
2016-05-12 14:14:24 -05:00
parent b78043dc8a
commit 0dbd823c00
185 changed files with 15440 additions and 16894 deletions

View File

@ -298,7 +298,7 @@ Bug # Short Description
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/Calpont
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.

445
ChangeLog~ Normal file
View File

@ -0,0 +1,445 @@
/***********************************************************************
*
* 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 Calpont.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 Calpont.xml and Calpont.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/Calpont
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 doesnt 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 Calpont.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

View File

@ -43,10 +43,10 @@ the entire Calpont directory tree there.
After untaring the sofware or installing the RPM's, setup the software
to run (this script needs to run with root privileges). Check the Installation
Guide for addition details on using postConfigure:
/usr/local/Calpont/bin/postConfigure
/usr/local/MariaDB/Columnstore/bin/postConfigure
Setup some aliases:
. /usr/local/Calpont/bin/calpontAlias
. /usr/local/MariaDB/Columnstore/bin/calpontAlias
Connect to MySQL:
idbmysql
@ -70,7 +70,7 @@ To use bulk load:
200|2002|
2. Save/place this file in a directory.
3. From that same directory, import the rows:
/usr/local/Calpont/bin/cpimport calpont caltest caltest.tbl
/usr/local/MariaDB/Columnstore/bin/cpimport calpont caltest caltest.tbl
And check the import:
calpontmysql calpont

306
INSTALL~ Normal file
View File

@ -0,0 +1,306 @@
Installation Instructions
*************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
Software Foundation, Inc.
Copyright (C) 2014 InfiniDB, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
InfiniDB, Inc. also gives unlimited permission to copy, distribute and
modify it.
Basic Installation from source
==============================
**** InfiniDB source build instructions ****
Consult the generic installation instructions
that follow for detailed information. The short version is:
cd $HOME
git clone http://github.com/infinidb/mysql
git clone http://github.com/infinidb/infinidb
-- or --
tar -zxf <srcfile>
cd mysql
./configure --prefix=$HOME
make
make install
cd ../infinidb
./configure --prefix=$HOME
make
make install
This will create a directory called Calpont in $HOME which conatins
all the software you need.
Install the InfiniDB software into /usr/local (for example) by copying
the entire Calpont directory tree there.
After untaring the sofware or installing the RPM's, setup the software
to run (this script needs to run with root privileges). Check the Installation
Guide for addition details on using postConfigure:
/usr/local/Calpont/bin/postConfigure
Setup some aliases:
. /usr/local/Calpont/bin/calpontAlias
Connect to MySQL:
idbmysql
A suggested test scenario:
create database calpont;
use calpont;
create table caltest (col1 int, col2 int) engine=infinidb;
show create table caltest;
set autocommit=0;
insert into caltest values (1, 2);
insert into caltest values (3, 4);
commit;
select * from caltest;
To use bulk load:
1. A delimited import file should be created to match the table that
you want to import data to similar to the following. In this
example, the file will be saved as idbtest.tbl:
100|1001|
200|2002|
2. Save/place this file in a directory.
3. From that same directory, import the rows:
/usr/local/Calpont/bin/cpimport calpont caltest caltest.tbl
And check the import:
calpontmysql calpont
select * from caltest;
That's it. Enjoy.
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. (Caching is
disabled by default to prevent problems with accidental use of stale
cache files.)
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You only need
`configure.ac' if you want to change it or regenerate `configure' using
a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that the
`configure' script does not know about. Run `./configure --help' for
details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not support the `VPATH'
variable, you have to compile the package for one architecture at a
time in the source code directory. After you have installed the
package for one architecture, use `make distclean' before reconfiguring
for another architecture.
Installation Names
==================
By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' cannot figure out automatically,
but needs to determine by the type of machine the package will run on.
Usually, assuming the package is built to be run on the _same_
architectures, `configure' can figure that out, but if it prints a
message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the option `--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share, you
can create a site shell script called `config.site' that gives default
values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script). Here is a another example:
/bin/bash ./configure CONFIG_SHELL=/bin/bash
Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
configuration-related scripts to be executed by `/bin/bash'.
`configure' Invocation
======================
`configure' recognizes the following options to control how it operates.
`--help'
`-h'
Print a summary of the options to `configure', and exit.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.

Binary file not shown.

16
README
View File

@ -3,8 +3,8 @@ To build the software from source, consult the file INSTALL.
Brief Install Instructions:
1. Install the 3 Calpont InfiniDB RPMs.
2. Install and start the software, run: /usr/local/Calpont/bin/postConfigure
3. Setup some aliases: . /usr/local/Calpont/bin/calpontAlias
2. Install and start the software, run: /usr/local/MariaDB/Columnstore/bin/postConfigure
3. Setup some aliases: . /usr/local/MariaDB/Columnstore/bin/calpontAlias
4. Connect to MySQL: idbmysql
5. Try the test in step 12 below
@ -21,7 +21,7 @@ Detailed Installation Instructions:
tar xvf calpont-2.2.0-2.x86_64.rpm.tar.gz
4. Install the 3 RPMs in this order, the Calpont InfiniDB software will be installed in
/usr/local/Calpont.
/usr/local/MariaDB/Columnstore.
rpm -ivh infinidb-libs-2.2.0-2.x86_64.rpm
rpm -ivh infinidb-platform-2.2.0-2.x86_64.rpm
@ -31,19 +31,19 @@ Detailed Installation Instructions:
5a.To configure and run on a single server system utilizing local disk storage,
run install script:
/usr/local/Calpont/bin/postConfigure
/usr/local/MariaDB/Columnstore/bin/postConfigure
5b.To configure and run on a multi-server system and/or to utilize a SAN storage
system, follow the instructions in the Calpont InfiniDB Installation Guide.
/usr/local/Calpont/bin/postConfigure
/usr/local/MariaDB/Columnstore/bin/postConfigure
6. Ports utilized by the Calpont InfiniDB Software
The Calpont MySQL daemon utilizes port 3306. To use a different port, update
the 2 locations in the following file:
/usr/local/Calpont/mysql/my.cnf
/usr/local/MariaDB/Columnstore/mysql/my.cnf
port = 3306
port = 3306
@ -53,7 +53,7 @@ Detailed Installation Instructions:
8600 - 8622, 8700, and 8800
7. Setup some aliases:
. /usr/local/Calpont/bin/calpontAlias
. /usr/local/MariaDB/Columnstore/bin/calpontAlias
8. To manually start and stop the Calpont InfiniDB Software as the root user run:
@ -127,7 +127,7 @@ Detailed Installation Instructions:
mysql>
12. Run the following upgrade script to create calponsys schema and upgrade the syscolumn table: /usr/local/Calpont/bin/upgrade-infinidb.sh
12. Run the following upgrade script to create calponsys schema and upgrade the syscolumn table: /usr/local/MariaDB/Columnstore/bin/upgrade-infinidb.sh
13. As an example to get you started, try this:

145
README~ Normal file
View File

@ -0,0 +1,145 @@
To build the software from source, consult the file INSTALL.
Brief Install Instructions:
1. Install the 3 Calpont InfiniDB RPMs.
2. Install and start the software, run: /usr/local/Calpont/bin/postConfigure
3. Setup some aliases: . /usr/local/Calpont/bin/calpontAlias
4. Connect to MySQL: idbmysql
5. Try the test in step 12 below
Detailed Installation Instructions:
1. Download the package calpont-2.2.0-2.x86_64.rpm.tar.gz (RHEL5 64-BIT)
to the server where you are installing Calpont.
2. Obtain root user access.
3. Unpack the tarball, which will generate 4 RPMs.
tar xvf calpont-2.2.0-2.x86_64.rpm.tar.gz
4. Install the 3 RPMs in this order, the Calpont InfiniDB software will be installed in
/usr/local/Calpont.
rpm -ivh infinidb-libs-2.2.0-2.x86_64.rpm
rpm -ivh infinidb-platform-2.2.0-2.x86_64.rpm
rpm -ivh infinidb-mysql-2.2.0-2.x86_64.rpm
rpm -ivh infinidb-storage-engine-2.2.0-2.x86_64.rpm
5a.To configure and run on a single server system utilizing local disk storage,
run install script:
/usr/local/Calpont/bin/postConfigure
5b.To configure and run on a multi-server system and/or to utilize a SAN storage
system, follow the instructions in the Calpont InfiniDB Installation Guide.
/usr/local/Calpont/bin/postConfigure
6. Ports utilized by the Calpont InfiniDB Software
The Calpont MySQL daemon utilizes port 3306. To use a different port, update
the 2 locations in the following file:
/usr/local/Calpont/mysql/my.cnf
port = 3306
port = 3306
You must reserve the following ports to run the Calpont InfiniDB Software:
8600 - 8622, 8700, and 8800
7. Setup some aliases:
. /usr/local/Calpont/bin/calpontAlias
8. To manually start and stop the Calpont InfiniDB Software as the root user run:
cc startSystem
To stop the Calpont Software, run:
cc stopSystem
9. To start/stop the Calpont InfiniDB Software during system boot/shutdown use the
chkconfig command
/sbin/chkconfig --add infinidb
/sbin/chkconfig infinidb on
10. After the Calpont InfiniDB Software has been started, use the following command to
connect to the Calpont OAM Console and watch for the System to go to the
ACTIVE status. The follow will repeatedly run the OAM command getsysteminfo
every 5 seconds.
calpontOAMconsole getsysteminfo -r
Here is an example display from a Single Server Install:
System and Module statuses
Component Status Last Status Change
------------ ---------------------- ------------------------
System ACTIVE Mon Apr 6 18:07:14 2009
Module dm1 ACTIVE Mon Apr 6 18:07:12 2009
Calpont Process statuses
Process Module Status Last Status Change Process ID
------------------ ------ ------------ ------------------------ ----------
ProcessMonitor dm1 ACTIVE Mon Apr 6 18:06:41 2009 12753
ProcessManager dm1 ACTIVE Mon Apr 6 18:06:46 2009 12954
SNMPTrapDaemon dm1 ACTIVE Mon Apr 6 18:06:41 2009 12963
SNMPAgent dm1 ACTIVE Mon Apr 6 18:06:50 2009 13565
ServerMonitor dm1 ACTIVE Mon Apr 6 18:06:55 2009 13635
DBRMWorkerNode dm1 ACTIVE Mon Apr 6 18:06:51 2009 13640
DBRMControllerNode dm1 ACTIVE Mon Apr 6 18:06:52 2009 13645
ExeMgr dm1 ACTIVE Mon Apr 6 18:07:05 2009 14578
PrimProc dm1 ACTIVE Mon Apr 6 18:07:03 2009 13842
DDLProc dm1 ACTIVE Mon Apr 6 18:07:10 2009 14936
DMLProc dm1 ACTIVE Mon Apr 6 18:07:13 2009 15114
Active Alarm Counts: Critical = 0, Major = 0, Minor = 0, Warning = 0, Info = 0
Once the System status is ACTIVE, enter the following to exit back to the
UNIX prompt:
CNTR<C>
Or to get back Calpont OAM Console Prompt,enter the following:
CNTR<D>
11. Use the following command to access the Calpont InfiniDB MySQL console:
idbmysql
Example output:
Welcome to the Mysql monitor. Commands end with ; or \g.
Your Mysql connection id is 1
Server version: 5.1.26-Calpont-log Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
12. Run the following upgrade script to create calponsys schema and upgrade the syscolumn table: /usr/local/Calpont/bin/upgrade-infinidb.sh
13. As an example to get you started, try this:
create database calpont;
use calpont;
create table caltest (col1 int, col2 int) engine=infinidb;
show create table caltest;
insert into caltest values (1, 2);
insert into caltest values (3, 4);
commit;
select * from caltest;
14. Consult the Admin Guide and Syntax Guide for additional information on how
to get started.

View File

@ -18,7 +18,7 @@ cp build/libstdc++.so.6.0.14 export/lib
cp build/files.lst $HOME/MariaDB_InfiniDB/export/mysql/.
cp dbcon/mysql/install_calpont_mysql.sh $HOME/MariaDB_InfiniDB/export/mysql/.
cp dbcon/mysql/my.cnf $HOME/MariaDB_InfiniDB/export/mysql/.
cp dbcon/mysql/mysql-Calpont $HOME/MariaDB_InfiniDB/export/mysql/.
cp dbcon/mysql/mysql-Columnstore $HOME/MariaDB_InfiniDB/export/mysql/.
if [ ! $$ ]; then
exit 1

62
build/bootstrap~ Executable file
View File

@ -0,0 +1,62 @@
#!/bin/bash
#
# $Id: bootstrap 1333 2011-01-18 17:25:26Z rdempsey $
#
# This script is responsible for setting up a fresh development tree
# following a git checkout. It copies static files and shared include
# files to the export tree prior to building the software.
mkdir -p export/{include,lib,etc,share,bin,sbin,post}
if [ ! $$ ]; then
exit 1
fi
cp build/gdb export/bin
cp build/libgcc_s.so.1 export/lib
cp build/libstdc++.so.6.0.14 export/lib
cp build/files.lst $HOME/MariaDB_InfiniDB/export/mysql/.
cp dbcon/mysql/install_calpont_mysql.sh $HOME/MariaDB_InfiniDB/export/mysql/.
cp dbcon/mysql/my.cnf $HOME/MariaDB_InfiniDB/export/mysql/.
cp dbcon/mysql/mysql-Calpont $HOME/MariaDB_InfiniDB/export/mysql/.
if [ ! $$ ]; then
exit 1
fi
cp -p -r utils/net-snmp export/include
if [ `uname -m` == "x86_64" ]; then
cp -p utils/net-snmp-built-libs/lib64/* export/lib
cp -p utils/net-snmp-built-libs/bin64/* export/sbin
else
egrep -qs Constantine /etc/redhat-release
if [ $? -eq 0 ]; then
cp -p utils/net-snmp-built-libs/fc12lib/libnetsnmp*.so.* export/lib
cp -p utils/net-snmp-built-libs/fc12bin/* export/sbin
else
cp -p utils/net-snmp-built-libs/fc6lib/libnetsnmp*.so.* export/lib
cp -p utils/net-snmp-built-libs/fc6bin/* export/sbin
fi
fi
pushd export/lib >/dev/null
for lib in libnetsnmpagent.so libnetsnmphelpers.so libnetsnmpmibs.so libnetsnmp.so libnetsnmptrapd.so; do
rm -f ${lib} ${lib}.5
ln -s ${lib}.5.2.1 ${lib}.5
ln -s ${lib}.5.2.1 ${lib}
done
popd >/dev/null
./build/genVersion.sh
for x in \
$(find . -name '[mM]akefile' \
| xargs grep -l ^bootstrap: \
| cut -f 2 -d / \
| sort -u)
do
echo bootstrapping $x
make BOOTSTRAP=1 -C $x bootstrap
done

View File

@ -1,22 +1,22 @@
<?xml version="1.0"?>
<?xml version = '1.0'?>
<kdevelop>
<general>
<author></author>
<author/>
<email>dhill@srvhill04.calpont.com</email>
<version>$VERSION$</version>
<projectmanagement>KDevCustomProject</projectmanagement>
<primarylanguage>C</primarylanguage>
<ignoreparts>
</ignoreparts>
<ignoreparts/>
</general>
<kdevcustomproject>
<run>
<mainprogram>build</mainprogram>
<directoryradio>executable</directoryradio>
</run>
</kdevcustomproject>
<kdevdebugger>
<general>
<dbgshell></dbgshell>
<dbgshell/>
</general>
</kdevdebugger>
<kdevdoctreeview>
@ -74,4 +74,29 @@
<type ext="h" />
</useglobaltypes>
</kdevfilecreate>
<kdevcppsupport>
<references/>
<codecompletion>
<includeGlobalFunctions>true</includeGlobalFunctions>
<includeTypes>true</includeTypes>
<includeEnums>true</includeEnums>
<includeTypedefs>false</includeTypedefs>
<automaticCodeCompletion>true</automaticCodeCompletion>
<automaticArgumentsHint>true</automaticArgumentsHint>
<automaticHeaderCompletion>true</automaticHeaderCompletion>
<codeCompletionDelay>250</codeCompletionDelay>
<argumentsHintDelay>400</argumentsHintDelay>
<headerCompletionDelay>250</headerCompletionDelay>
</codecompletion>
</kdevcppsupport>
<kdevfileview>
<groups>
<hidenonprojectfiles>false</hidenonprojectfiles>
<hidenonlocation>false</hidenonlocation>
</groups>
<tree>
<hidepatterns>*.o,*.lo,CVS</hidepatterns>
<hidenonprojectfiles>false</hidenonprojectfiles>
</tree>
</kdevfileview>
</kdevelop>

View File

@ -0,0 +1 @@
# KDevelop Custom Project File List

BIN
build/build.kdevelop.pcs Normal file

Binary file not shown.

170
build/build.kdevses Normal file
View File

@ -0,0 +1,170 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE KDevPrjSession>
<KDevPrjSession>
<DocsAndViews NumberOfDocuments="50" >
<Doc0 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/build/files.lst" >
<View0 line="0" Type="Source" />
</Doc0>
<Doc1 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/oam/install_scripts/calpontAlias" >
<View0 line="5" Type="Source" />
</Doc1>
<Doc2 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/oam/install_scripts/calpontSyslog7" >
<View0 line="1" Type="Source" />
</Doc2>
<Doc3 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/oam/install_scripts/calpontLogRotate" >
<View0 line="5" Type="Source" />
</Doc3>
<Doc4 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/oam/install_scripts/calpontSyslog" >
<View0 line="1" Type="Source" />
</Doc4>
<Doc5 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/oam/install_scripts/calpontSyslog-ng" >
<View0 line="0" Type="Source" />
</Doc5>
<Doc6 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/oam/install_scripts/columnstoreSyslog-ng" >
<View0 line="23" Type="Source" />
</Doc6>
<Doc7 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/oam/install_scripts/infinidb" >
<View0 line="109" Type="Source" />
</Doc7>
<Doc8 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/oam/install_scripts/columnstoreSyslog7" >
<View0 line="0" Type="Source" />
</Doc8>
<Doc9 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/oam/install_scripts/columnstore" >
<View0 line="36" Type="Source" />
</Doc9>
<Doc10 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/oam/install_scripts/columnstoreSyslog" >
<View0 line="1" Type="Source" />
</Doc10>
<Doc11 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/oam/install_scripts/columnstoreAlias" >
<View0 line="2" Type="Source" />
</Doc11>
<Doc12 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/oam/install_scripts/columnstoreLogRotate" >
<View0 line="21" Type="Source" />
</Doc12>
<Doc13 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/oam/etc/ProcessConfig.xml.singleserver" >
<View0 line="6" Type="Source" />
</Doc13>
<Doc14 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/utils/infinidb_hadoop/src/infinidb/hadoop/example/InfiniDBOutputDriver.java" >
<View0 line="65" Type="Source" />
</Doc14>
<Doc15 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/utils/autoconf/INSTALL" >
<View0 line="45" Type="Source" />
</Doc15>
<Doc16 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/utils/autoconf/README" >
<View0 line="0" Type="Source" />
</Doc16>
<Doc17 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/utils/scenarios/perf/source/pf/fm/getsql.orig" >
<View0 line="43" Type="Source" />
</Doc17>
<Doc18 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/utils/scenarios/common/sql/load_TestStats.sql" >
<View0 line="6" Type="Source" />
</Doc18>
<Doc19 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/utils/scenarios/common/sql/load_TestTime.sql" >
<View0 line="6" Type="Source" />
</Doc19>
<Doc20 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/utils/scenarios/common/sql/load_TestSummary.sql" >
<View0 line="6" Type="Source" />
</Doc20>
<Doc21 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/utils/idbhdfs/hdfs-20/setenv-hdfs-20" >
<View0 line="2" Type="Source" />
</Doc21>
<Doc22 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/utils/idbhdfs/hdfs-12/setenv-hdfs-12" >
<View0 line="0" Type="Source" />
</Doc22>
<Doc23 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/INSTALL" >
<View0 line="45" Type="Source" />
</Doc23>
<Doc24 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/config.log" >
<View0 line="29" Type="Source" />
</Doc24>
<Doc25 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/writeengine/bulk/qa-bulkload.py" >
<View0 line="55" Type="Source" />
</Doc25>
<Doc26 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/writeengine/bulk/checkidx.py" >
<View0 line="11" Type="Source" />
</Doc26>
<Doc27 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/writeengine/bulk/bulkload.py" >
<View0 line="58" Type="Source" />
</Doc27>
<Doc28 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/oam/install_scripts/columnstore.def" >
<View0 line="0" Type="Source" />
</Doc28>
<Doc29 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/oam/install_scripts/transactionLog" >
<View0 line="10" Type="Source" />
</Doc29>
<Doc30 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/oam/install_scripts/columnstore.conf" >
<View0 line="0" Type="Source" />
</Doc30>
<Doc31 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/oam/install_scripts/crontab" >
<View0 line="16" Type="Source" />
</Doc31>
<Doc32 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/oam/install_scripts/columnstore.upstart" >
<View0 line="14" Type="Source" />
</Doc32>
<Doc33 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/oam/post/functions" >
<View0 line="9" Type="Source" />
</Doc33>
<Doc34 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/versioning/BRM/Calpont.xml" >
<View0 line="253" Type="Source" />
</Doc34>
<Doc35 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/dbcon/joblist/config-dec.xml" >
<View0 line="409" Type="Source" />
</Doc35>
<Doc36 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/dbcon/joblist/fdtests.pl" >
<View0 line="8" Type="Source" />
</Doc36>
<Doc37 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/dbcon/mysql/my.cnf" >
<View0 line="22" Type="Source" />
</Doc37>
<Doc38 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/dbcon/mysql/schemaSync.pl" >
<View0 line="9" Type="Source" />
</Doc38>
<Doc39 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/dbcon/mysql/dumpcat.pl" >
<View0 line="7" Type="Source" />
</Doc39>
<Doc40 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/README" >
<View0 line="5" Type="Source" />
</Doc40>
<Doc41 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/libtool" >
<View0 line="333" Type="Source" />
</Doc41>
<Doc42 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/tools/reserveStacks/stack" >
<View0 line="39" Type="Source" />
</Doc42>
<Doc43 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/tools/evalidx/checkidx.py" >
<View0 line="11" Type="Source" />
</Doc43>
<Doc44 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/snmpd/etc/snmpdx.conf" >
<View0 line="484" Type="Source" />
</Doc44>
<Doc45 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/snmpd/etc/snmptrapd.conf" >
<View0 line="8" Type="Source" />
</Doc45>
<Doc46 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/snmpd/etc/snmpdx.conf.singleserver" >
<View0 line="484" Type="Source" />
</Doc46>
<Doc47 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/snmpd/etc/snmptrapd.conf.singleserver" >
<View0 line="8" Type="Source" />
</Doc47>
<Doc48 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/ChangeLog" >
<View0 line="300" Type="Source" />
</Doc48>
<Doc49 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/build/README" >
<View0 line="66" Type="Source" />
</Doc49>
</DocsAndViews>
<pluginList>
<kdevdebugger>
<breakpointList/>
</kdevdebugger>
<kdevbookmarks>
<bookmarks/>
</kdevbookmarks>
<kdevvalgrind>
<executable path="" params="" />
<valgrind path="" params="" />
<calltree path="" params="" />
<kcachegrind path="" />
</kdevvalgrind>
</pluginList>
</KDevPrjSession>

View File

@ -43,6 +43,7 @@ InfiniDB Enterprise binary files
%package storage-engine
Summary: MariaDB-Columnstore software MariaDB connector
Group: Applications
Obsoletes: columnstore-mysql
Requires: columnstore-libs
%description storage-engine
@ -341,7 +342,7 @@ rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/%{name}-%{version}-%{release}
/usr/local/MariaDB/Columnstore/lib/libcalmysql.so.1.0.0
/usr/local/MariaDB/Columnstore/lib/libudf_mysql.so.1.0.0
/usr/local/MariaDB/Columnstore/mysql/mysql-Calpont
/usr/local/MariaDB/Columnstore/mysql/mysql-Columnstore
/usr/local/MariaDB/Columnstore/mysql/install_calpont_mysql.sh
/usr/local/MariaDB/Columnstore/mysql/syscatalog_mysql.sql
/usr/local/MariaDB/Columnstore/mysql/dumpcat_mysql.sql

View File

@ -1,8 +1,8 @@
#
# $Id$
#
Summary: InfiniDB-MariaDB software
Name: infinidb
Summary: MariaDB-Columnstore software
Name: columnstore
@@VERSION@@
@@RELEASE@@
Vendor: MariaDB, Inc.
@ -13,44 +13,41 @@ License: Copyright (c) 2016 MariaDB, Inc., all rights reserved; redistributable
BuildRoot: %{_tmppath}/%{name}-%{release}-buildroot
%description
InfiniDB-MariaDB software meta-package
MariaDB-Columnstore software meta-package
%package platform
Summary: InfiniDB-MariaDB software binaries
Summary: MariaDB-Columnstore software binaries
Group: Applications
Obsoletes: calpont
Requires: expect, infinidb-libs
Requires: expect, columnstore-libs
%description platform
InfiniDB-MariaDB binary files
MariaDB-Columnstore binary files
@@BUILDINFO@@
%package libs
Summary: InfiniDB-MariaDB software libraries
Summary: MariaDB-Columnstore software libraries
Group: Applications
Obsoletes: calpont
%description libs
InfiniDB-MariaDB libraries
MariaDB-Columnstore libraries
%package enterprise
Summary: InfiniDB Enterprise software binaries
Group: Applications
Obsoletes: calpont
Requires: infinidb-libs, infinidb-platform
License: Proprietary; Copyright (c) 2014 InfiniDB, Inc., all rights reserved
Requires: columnstore-libs, columnstore-platform
License: Proprietary; Copyright (c) 2016 MariaDB, Inc., all rights reserved
%description enterprise
InfiniDB Enterprise binary files
%package storage-engine
Summary: InfiniDB-MariaDB software MariaDB connector
Summary: MariaDB-Columnstore software MariaDB connector
Group: Applications
Obsoletes: calpont-mysql
Requires: infinidb-libs
Obsoletes: columnstore-mysql
Requires: columnstore-libs
%description storage-engine
InfiniDB MariaDB connector binary files
MariaDB Columnstore connector binary files
%prep
%define _use_internal_dependency_generator 0
@ -85,15 +82,15 @@ rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/%{name}-%{version}-%{release}
/usr/local/MariaDB/Columnstore/bin/pre-uninstall
/usr/local/MariaDB/Columnstore/bin/PrimProc
/usr/local/MariaDB/Columnstore/bin/DecomSvr
/usr/local/MariaDB/Columnstore/bin/upgrade-infinidb.sh
/usr/local/MariaDB/Columnstore/bin/upgrade-columnstore.sh
/usr/local/MariaDB/Columnstore/bin/run.sh
/usr/local/MariaDB/Columnstore/bin/infinidb
/usr/local/MariaDB/Columnstore/bin/calpontSyslog
/usr/local/MariaDB/Columnstore/bin/calpontSyslog7
/usr/local/MariaDB/Columnstore/bin/calpontSyslog-ng
/usr/local/MariaDB/Columnstore/bin/columnstore
/usr/local/MariaDB/Columnstore/bin/columnstoreSyslog
/usr/local/MariaDB/Columnstore/bin/columnstoreSyslog7
/usr/local/MariaDB/Columnstore/bin/columnstoreSyslog-ng
/usr/local/MariaDB/Columnstore/bin/syslogSetup.sh
/usr/local/MariaDB/Columnstore/bin/cplogger
/usr/local/MariaDB/Columnstore/bin/infinidb.def
/usr/local/MariaDB/Columnstore/bin/columnstore.def
/usr/local/MariaDB/Columnstore/bin/dbbuilder
/usr/local/MariaDB/Columnstore/bin/cpimport.bin
/usr/local/MariaDB/Columnstore/bin/load_brm
@ -110,18 +107,14 @@ rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/%{name}-%{version}-%{release}
/usr/local/MariaDB/Columnstore/bin/trapHandler
/usr/local/MariaDB/Columnstore/bin/remote_command.sh
/usr/local/MariaDB/Columnstore/bin/postConfigure
/usr/local/MariaDB/Columnstore/bin/calpontLogRotate
/usr/local/MariaDB/Columnstore/bin/columnstoreLogRotate
/usr/local/MariaDB/Columnstore/bin/transactionLog
/usr/local/MariaDB/Columnstore/bin/calpontDBWrite
/usr/local/MariaDB/Columnstore/bin/columnstoreDBWrite
/usr/local/MariaDB/Columnstore/bin/transactionLogArchiver.sh
/usr/local/MariaDB/Columnstore/bin/system_installer.sh
/usr/local/MariaDB/Columnstore/bin/installer
/usr/local/MariaDB/Columnstore/bin/module_installer.sh
/usr/local/MariaDB/Columnstore/bin/patchInstaller
/usr/local/MariaDB/Columnstore/bin/patch_installer.sh
/usr/local/MariaDB/Columnstore/bin/xm_installer.sh
/usr/local/MariaDB/Columnstore/bin/calpontUninstall.sh
/usr/local/MariaDB/Columnstore/bin/director_installer.sh
/usr/local/MariaDB/Columnstore/bin/user_installer.sh
/usr/local/MariaDB/Columnstore/bin/performance_installer.sh
/usr/local/MariaDB/Columnstore/bin/startupTests.sh
@ -130,10 +123,10 @@ rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/%{name}-%{version}-%{release}
/usr/local/MariaDB/Columnstore/bin/remote_scp_put.sh
/usr/local/MariaDB/Columnstore/bin/remotessh.exp
/usr/local/MariaDB/Columnstore/bin/ServerMonitor
/usr/local/MariaDB/Columnstore/bin/master-rep-infinidb.sh
/usr/local/MariaDB/Columnstore/bin/slave-rep-infinidb.sh
/usr/local/MariaDB/Columnstore/bin/master-rep-columnstore.sh
/usr/local/MariaDB/Columnstore/bin/slave-rep-columnstore.sh
/usr/local/MariaDB/Columnstore/bin/rsync.sh
/usr/local/MariaDB/Columnstore/bin/calpontSupport
/usr/local/MariaDB/Columnstore/bin/columnstoreSupport
/usr/local/MariaDB/Columnstore/bin/hardwareReport.sh
/usr/local/MariaDB/Columnstore/bin/softwareReport.sh
/usr/local/MariaDB/Columnstore/bin/configReport.sh
@ -144,7 +137,7 @@ rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/%{name}-%{version}-%{release}
/usr/local/MariaDB/Columnstore/bin/alarmReport.sh
/usr/local/MariaDB/Columnstore/bin/amazonInstaller
/usr/local/MariaDB/Columnstore/bin/remote_command_verify.sh
/usr/local/MariaDB/Columnstore/bin/disable-rep-infinidb.sh
/usr/local/MariaDB/Columnstore/bin/disable-rep-columnstore.sh
#
@ -175,7 +168,7 @@ rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/%{name}-%{version}-%{release}
/usr/local/MariaDB/Columnstore/bin/hdfsCheck
/usr/local/MariaDB/Columnstore/bin/configxml.sh
/usr/local/MariaDB/Columnstore/bin/remote_scp_get.sh
/usr/local/MariaDB/Columnstore/bin/calpontAlias
/usr/local/MariaDB/Columnstore/bin/columnstoreAlias
/usr/local/MariaDB/Columnstore/bin/autoConfigure
/usr/local/MariaDB/Columnstore/bin/ddlcleanup
/usr/local/MariaDB/Columnstore/bin/idbmeminfo
@ -186,7 +179,7 @@ rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/%{name}-%{version}-%{release}
/usr/local/MariaDB/Columnstore/bin/myCnf-exclude-args.text
/usr/local/MariaDB/Columnstore/bin/mycnfUpgrade
/usr/local/MariaDB/Columnstore/bin/getMySQLpw
/usr/local/MariaDB/Columnstore/bin/infinidb.conf
/usr/local/MariaDB/Columnstore/bin/columnstore.conf
/usr/local/MariaDB/Columnstore/sbin/snmpd
/usr/local/MariaDB/Columnstore/sbin/snmptrapd

View File

@ -27,9 +27,9 @@ hostinfo = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /usr/local/Calpont/bin
PATH: /usr/local/MariaDB/Columnstore/bin
PATH: /home/calpont/bin
PATH: /usr/local/Calpont/bin
PATH: /usr/local/MariaDB/Columnstore/bin
PATH: /home/calpont/bin
PATH: /usr/lib64/qt-3.3/bin
PATH: /usr/local/bin

5068
config.log~ Normal file

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,7 @@ use DBI;
use DBD::mysql;
$databasename='calpont';
$cnffile='/usr/local/Calpont/mysql/my.cnf';
$cnffile='/usr/local/MariaDB/Columnstore/mysql/my.cnf';
$data_source = 'DBI:mysql:database=' . $databasename . ':mysql_read_default_file=' . $cnffile . '';
$username = 'root';

View File

@ -42,7 +42,7 @@ namespace
void logDiskIoInfo(uint64_t stepId, const AnyDataListSPtr& spdl)
{
boost::mutex::scoped_lock lk(fileLock_g);
ofstream umDiskIoFile("/var/log/Calpont/trace/umdiskio.log", ios_base::app);
ofstream umDiskIoFile("/var/log/Columnstore/trace/umdiskio.log", ios_base::app);
CalpontSystemCatalog::OID oid;
uint64_t maxBuckets = 0;
@ -106,7 +106,7 @@ void logDiskIoInfo(uint64_t stepId, const AnyDataListSPtr& spdl)
// move the current file to bak when size above .5 G, so total log is 1 G
if (curPos > 0x20000000)
{
(void)system("/bin/mv /var/log/Calpont/trace/umdiskio.log /var/log/Calpont/trace/umdiskio.bak");
(void)system("/bin/mv /var/log/Columnstore/trace/umdiskio.log /var/log/Columnstore/trace/umdiskio.bak");
}
}

View File

@ -25,7 +25,7 @@ libcalmysql_la_CPPFLAGS = -I/usr/include/libxml2 -I../../../mysql/include -I../.
include_HEADERS = idb_mysql.h
dist_mysql_DATA = syscatalog_mysql.sql dumpcat_mysql.sql calsetuserpriority.sql calremoveuserpriority.sql calshowprocesslist.sql my.cnf
dist_mysql_SCRIPTS = install_calpont_mysql.sh mysql-Calpont dumpcat.pl
mysql-Columnstore = install_calpont_mysql.sh mysql-Calpont dumpcat.pl
test:

View File

@ -40,7 +40,7 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = dbcon/mysql
DIST_COMMON = $(dist_mysql_DATA) $(dist_mysql_SCRIPTS) \
DIST_COMMON = $(dist_mysql_DATA) $(mysql-Columnstore) \
$(include_HEADERS) $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/compilerflags.m4 \
@ -75,7 +75,7 @@ am_libcalmysql_la_OBJECTS = libcalmysql_la-ha_calpont.lo \
libcalmysql_la-ha_pseudocolumn.lo
libcalmysql_la_OBJECTS = $(am_libcalmysql_la_OBJECTS)
dist_mysqlSCRIPT_INSTALL = $(INSTALL_SCRIPT)
SCRIPTS = $(dist_mysql_SCRIPTS)
SCRIPTS = $(mysql-Columnstore)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@ -255,7 +255,7 @@ libcalmysql_la_LDFLAGS = -version-info 1:0:0 $(idb_common_ldflags) $(idb_common_
libcalmysql_la_CPPFLAGS = -I/usr/include/libxml2 -I../../../mysql/include -I../../../mysql/sql -I../../../mysql/regex -DMYSQL_DYNAMIC_PLUGIN $(AM_CPPFLAGS)
include_HEADERS = idb_mysql.h
dist_mysql_DATA = syscatalog_mysql.sql dumpcat_mysql.sql calsetuserpriority.sql calremoveuserpriority.sql calshowprocesslist.sql my.cnf
dist_mysql_SCRIPTS = install_calpont_mysql.sh mysql-Calpont dumpcat.pl
mysql-Columnstore = install_calpont_mysql.sh mysql-Calpont dumpcat.pl
all: all-am
.SUFFIXES:
@ -318,10 +318,10 @@ clean-libLTLIBRARIES:
done
libcalmysql.la: $(libcalmysql_la_OBJECTS) $(libcalmysql_la_DEPENDENCIES)
$(CXXLINK) -rpath $(libdir) $(libcalmysql_la_LDFLAGS) $(libcalmysql_la_OBJECTS) $(libcalmysql_la_LIBADD) $(LIBS)
install-dist_mysqlSCRIPTS: $(dist_mysql_SCRIPTS)
install-dist_mysqlSCRIPTS: $(mysql-Columnstore)
@$(NORMAL_INSTALL)
test -z "$(mysqldir)" || $(mkdir_p) "$(DESTDIR)$(mysqldir)"
@list='$(dist_mysql_SCRIPTS)'; for p in $$list; do \
@list='$(mysql-Columnstore)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f $$d$$p; then \
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
@ -332,7 +332,7 @@ install-dist_mysqlSCRIPTS: $(dist_mysql_SCRIPTS)
uninstall-dist_mysqlSCRIPTS:
@$(NORMAL_UNINSTALL)
@list='$(dist_mysql_SCRIPTS)'; for p in $$list; do \
@list='$(mysql-Columnstore)'; for p in $$list; do \
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
echo " rm -f '$(DESTDIR)$(mysqldir)/$$f'"; \
rm -f "$(DESTDIR)$(mysqldir)/$$f"; \

View File

@ -5,7 +5,7 @@
use DBI;
use DBD::mysql;
$data_source = 'DBI:mysql:database=calpontsys:mysql_read_default_file=/usr/local/Calpont/mysql/my.cnf';
$data_source = 'DBI:mysql:database=calpontsys:mysql_read_default_file=/usr/local/MariaDB/Columnstore/mysql/my.cnf';
$username = 'root';
$auth = '';
%attr = ();

View File

@ -1,3 +1,3 @@
./my.cnf
./mysql-Calpont
./mysql-Columnstore
./install_calpont_mysql.sh

View File

@ -20,15 +20,15 @@
[client]
#password = your_password
port = 3306
socket = /usr/local/Calpont/mysql/lib/mysql/mysql.sock
socket = /usr/local/MariaDB/Columnstore/mysql/lib/mysql/mysql.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
port = 3306
socket = /usr/local/Calpont/mysql/lib/mysql/mysql.sock
datadir = /usr/local/Calpont/mysql/db
socket = /usr/local/MariaDB/Columnstore/mysql/lib/mysql/mysql.sock
datadir = /usr/local/MariaDB/Columnstore/mysql/db
skip-external-locking
key_buffer_size = 512M
max_allowed_packet = 1M
@ -62,10 +62,10 @@ infinidb_um_mem_limit=0
infinidb_use_import_for_batchinsert=1
infinidb_import_for_batchinsert_delimiter=7
basedir = /usr/local/Calpont/mysql/
character-sets-dir = /usr/local/Calpont/mysql/share/mysql/charsets/
language = /usr/local/Calpont/mysql/share/mysql/english/
plugin_dir = /usr/local/Calpont/mysql/lib64/mysql/plugin
basedir = /usr/local/MariaDB/Columnstore/mysql/
character-sets-dir = /usr/local/MariaDB/Columnstore/mysql/share/mysql/charsets/
language = /usr/local/MariaDB/Columnstore/mysql/share/mysql/english/
plugin_dir = /usr/local/MariaDB/Columnstore/mysql/lib64/mysql/plugin
# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
@ -134,20 +134,20 @@ slave-skip-errors=all
#master-port = <port>
#
# binary logging - not required for slaves, but recommended
log-bin=/usr/local/Calpont/mysql/db/mysql-bin
relay-log=/usr/local/Calpont/mysql/db/relay-bin
relay-log-index = /usr/local/Calpont/mysql/db/relay-bin.index
relay-log-info-file = /usr/local/Calpont/mysql/db/relay-bin.info
log-bin=/usr/local/MariaDB/Columnstore/mysql/db/mysql-bin
relay-log=/usr/local/MariaDB/Columnstore/mysql/db/relay-bin
relay-log-index = /usr/local/MariaDB/Columnstore/mysql/db/relay-bin.index
relay-log-info-file = /usr/local/MariaDB/Columnstore/mysql/db/relay-bin.info
# Point the following paths to different dedicated disks
#tmpdir = /tmp/
#log-update = /path-to-dedicated-directory/hostname
# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /usr/local/Calpont/mysql/lib/mysql/
#innodb_data_home_dir = /usr/local/MariaDB/Columnstore/mysql/lib/mysql/
#innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend
#innodb_log_group_home_dir = /usr/local/Calpont/mysql/lib/mysql/
#innodb_log_arch_dir = /usr/local/Calpont/mysql/lib/mysql/
#innodb_log_group_home_dir = /usr/local/MariaDB/Columnstore/mysql/lib/mysql/
#innodb_log_arch_dir = /usr/local/MariaDB/Columnstore/mysql/lib/mysql/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 384M

View File

@ -55,7 +55,7 @@ service_startup_timeout=30
# Lock directory for RedHat / SuSE.
lockdir='/var/lock/subsys'
lock_file_path="$lockdir/mysql-Calpont"
lock_file_path="$lockdir/mysql-Columnstore"
# The following variables are only set for letting mysql.server find things.

View File

@ -7,7 +7,7 @@ use DBD::mysql;
$| = 1;
$cfgfile='/usr/local/Calpont/mysql/my.cnf';
$cfgfile='/usr/local/MariaDB/Columnstore/mysql/my.cnf';
$username = 'root';
$auth = '';

View File

@ -1,330 +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 5 - Module type?
# Argument 6 - Install Type, "initial" or "upgrade"
# Argument 7 - Server type?
# Argument 8 - Debug flag 1 for on, 0 for off
# Argument 9 - install dir (optional)
# Argument 10 - user name (optional)
set USERNAME root
set MODULE [lindex $argv 0]
set SERVER [lindex $argv 1]
set PASSWORD [lindex $argv 2]
set CALPONTPKG [lindex $argv 3]
set MODULETYPE [lindex $argv 4]
set INSTALLTYPE [lindex $argv 5]
set PKGTYPE "binary"
set SERVERTYPE [lindex $argv 6]
set MYSQLPORT [lindex $argv 7]
set DEBUG [lindex $argv 8]
set INSTALLDIR "/usr/local/MariaDB/Columnstore"
set IDIR [lindex $argv 9]
if { $IDIR != "" } {
set INSTALLDIR $IDIR
}
set env(INFINIDB_INSTALL_DIR) $INSTALLDIR
set PREFIX [file dirname $INSTALLDIR]
set USERNAME $env(USER)
set UNM [lindex $argv 10]
if { $UNM != "" } {
set USERNAME $UNM
}
set BASH "/bin/bash "
if { $DEBUG == "1" } {
set BASH "/bin/bash -x "
}
log_user $DEBUG
spawn -noecho /bin/bash
#
if { $INSTALLTYPE == "initial" || $INSTALLTYPE == "uninstall" } {
#
# remove Calpont files
#
send_user "Uninstall Calpont Package "
send " \n"
send date\n
send "ssh $USERNAME@$SERVER 'rm -f /etc/init.d/infinidb /etc/init.d/mysql-Calpont $INSTALLDIR/releasenum >/dev/null 2>&1'\n"
set timeout 20
expect {
"Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit 1}
"service not known" { send_user "FAILED: Invalid Host\n" ; exit 1}
"authenticity" { send "yes\n"
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
}
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
"Calpont uninstall completed" { send_user "DONE" }
}
set timeout 30
expect {
"Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1}
"Calpont uninstall completed" { send_user "DONE" }
}
send_user "\n"
}
if { $INSTALLTYPE == "uninstall" } {
exit 0
}
sleep 10
#
# send the Calpont package
#
send_user "Copy New Calpont Package to Module "
send " \n"
send date\n
send "scp $CALPONTPKG $USERNAME@$SERVER:$CALPONTPKG\n"
set timeout 10
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
set timeout 120
expect {
"100%" { send_user "DONE" }
"scp:" { send_user "ERROR\n" ;
send_user "\n*** Installation ERROR\n" ;
exit 1 }
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
"No such file or directory" { send_user "ERROR: Invalid package\n" ; exit 1 }
"Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1}
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
timeout { send_user "ERROR: Timeout\n" ; exit 1 }
}
send_user "\n"
#sleep to make sure it's finished
sleep 5
#
# install package
#
send_user "Install Calpont Package on Module "
send " \n"
send date\n
send "ssh $USERNAME@$SERVER 'tar -C $PREFIX --exclude db -zxf $CALPONTPKG;cat $INSTALLDIR/releasenum'\n"
set timeout 10
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
set timeout 120
expect {
"release=" { send_user "DONE" }
"No such file" { send_user "ERROR: Binary Install Failed, binary/releasenum not found\n" ; exit 1 }
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
"Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1}
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
timeout { send_user "ERROR: Timeout\n" ; exit 1 }
}
#sleep to give time for cat Calpont/releasenum to complete
sleep 5
send_user "\n"
send_user "Run post-install script "
send " \n"
send date\n
send "ssh $USERNAME@$SERVER '$INSTALLDIR/bin/post-install --installdir=$INSTALLDIR'\n"
set timeout 10
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
set timeout 60
# check return
expect {
"InfiniDB syslog logging not working" { send_user "ERROR: InfiniDB System logging not setup\n" ; exit 1 }
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
"Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1}
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
"postConfigure" { send_user "DONE" }
}
send_user "\n"
sleep 10
#
if { $INSTALLTYPE == "initial"} {
#
# copy over calpont config file
#
send_user "Copy Calpont Config file to Module "
send " \n"
send date\n
send "scp $INSTALLDIR/etc/* $USERNAME@$SERVER:$INSTALLDIR/etc\n"
set timeout 10
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
set timeout 30
expect {
-re {[$#] } { send_user "DONE" }
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
"Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1}
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
}
send_user "\n"
#
# copy over custom OS tmp files
#
send_user "Copy Custom OS files to Module "
send " \n"
send date\n
send "scp -r $INSTALLDIR/local/etc $USERNAME@$SERVER:$INSTALLDIR/local\n"
set timeout 10
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
set timeout 60
expect {
-re {[$#] } { send_user "DONE" }
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
"Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1}
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
}
send_user "\n"
#
# copy over calpont OS files
#
send_user "Copy Calpont OS files to Module "
send " \n"
send date\n
send "scp $INSTALLDIR/local/etc/$MODULE/* $USERNAME@$SERVER:$INSTALLDIR/local\n"
set timeout 10
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
"Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1}
}
set timeout 60
expect {
-re {[$#] } { send_user "DONE" }
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
}
send_user "\n"
#
# Start module installer to setup Customer OS files
#
send_user "Run Module Installer "
send " \n"
send date\n
send "ssh $USERNAME@$SERVER '$INSTALLDIR/bin/module_installer.sh --module=$MODULETYPE --port=$MYSQLPORT --installdir=$INSTALLDIR $MODULETYPE'\n"
set timeout 10
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
set timeout 60
expect {
"!!!Module" { send_user "DONE" }
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
"FAILED" { send_user "ERROR: missing module file\n" ; exit 1 }
"Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1}
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
"No such file" { send_user "ERROR: File Not Found\n" ; exit 1 }
}
send_user "\n"
sleep 10
if { $MODULETYPE == "um" || $SERVERTYPE == "2" || $SERVERTYPE == "pmwithum" } {
#
# run mysql setup scripts
#
send_user "Run MySQL Setup Scripts on Module "
send " \n"
send date\n
send "ssh $USERNAME@$SERVER '$INSTALLDIR/bin/post-mysqld-install --installdir=$INSTALLDIR'\n"
set timeout 10
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
set timeout 60
expect {
"ERROR" { send_user "ERROR: Daemon failed to run";
exit 1 }
"FAILED" { send_user "ERROR: Daemon failed to run";
exit 1 }
"Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1}
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
}
send " \n"
send date\n
send "ssh $USERNAME@$SERVER '$INSTALLDIR/bin/post-mysql-install --installdir=$INSTALLDIR'\n"
set timeout 10
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
set timeout 60
expect {
"Shutting down mysql." { send_user "DONE" }
timeout { send_user "DONE" }
"ERROR" { send_user "ERROR: Daemon failed to run";
exit 1 }
"FAILED" { send_user "ERROR: Daemon failed to run";
exit 1 }
"Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1}
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
}
send_user "\n"
}
}
#
# check InfiniDB syslog functionality
#
send_user "Check InfiniDB system logging functionality "
send " \n"
send date\n
send "ssh $USERNAME@$SERVER '$INSTALLDIR/bin/syslogSetup.sh check'\n"
set timeout 10
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
set timeout 30
expect {
"Logging working" { send_user "DONE" }
timeout { send_user "DONE" }
"not working" { send_user "WARNING: InfiniDB system logging functionality not working" }
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
}
send_user "\n"
send_user "\nInstallation Successfully Completed on '$MODULE'\n"
exit 0

View File

@ -1,184 +0,0 @@
#!/bin/bash
#
# $Id: columnstore 3704 2013-08-07 03:33:20Z bwilkinson $
#
# columnstore Starts MariaDB Columnstore database platform
#
#
# chkconfig: 2345 99 99
# description: MariaDB Columnstore is a database platform that utilizes Mysql
#
### BEGIN INIT INFO
# Provides: columnstore
# Required-Start: $local_fs $remote_fs $network $syslog $all
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start/stop InfiniDB DW DBMS
### END INIT INFO
# Source function library.
if [ -f /etc/init.d/functions ]; then
. /etc/init.d/functions
fi
if [ -z "$INFINIDB_INSTALL_DIR" ]; then
test -f /etc/default/columnstore && . /etc/default/columnstore
fi
if [ -z "$INFINIDB_INSTALL_DIR" ]; then
INFINIDB_INSTALL_DIR=/usr/local/MariaDB/Columnstore
fi
export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR
InstallDir=$INFINIDB_INSTALL_DIR
if [ $InstallDir != "/usr/local/Calpont" ]; then
export PATH=$InstallDir/bin:$InstallDir/mysql/bin:/bin:/usr/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$InstallDir/lib:$InstallDir/mysql/lib/mysql
fi
#hadoop
plugin=`$INFINIDB_INSTALL_DIR/bin/getConfig SystemConfig DataFilePlugin`
if [ -n "$plugin" ]; then
setenv=`$InstallDir/bin/getConfig SystemConfig DataFileEnvFile`
. $InstallDir/bin/$setenv >/dev/null 2>&1
fi
if [ -e $InstallDir/lib/libjemalloc.so ]; then
export LD_PRELOAD=$InstallDir/lib/libjemalloc.so
elif [ -e $InstallDir/lib/libjemalloc.so.1 ]; then
export LD_PRELOAD=$InstallDir/lib/libjemalloc.so.1
fi
test -f $InstallDir/post/functions && . $InstallDir/post/functions
mt=`module_type`
mid=`module_id`
has_um=`$InstallDir/bin/getConfig SystemModuleConfig ModuleCount2`
if [ "x$has_um" = x ]; then
has_um=0
fi
user=$USER
if [ -z "$user" ]; then
user=root
fi
checkInstallSetup() {
InitialInstallFlag=`$InstallDir/bin/getConfig -c $InstallDir/etc/Calpont.xml Installation InitialInstallFlag`
if [ $InitialInstallFlag != "y" ]; then
echo "Please run the postConfigure install script, check the Installation Guide"
echo "for additional details"
rm -f /var/lock/subsys/columnstore
exit 1
fi
}
[ -f $InstallDir/bin/ProcMon ] || exit 0
start() {
if [ -f /var/lock/subsys/columnstore ]; then
echo "MariaDB Columnstore Database Platform already running"
exit 0
fi
(mkdir -p /var/lock/subsys && touch /var/lock/subsys/columnstore) >/dev/null 2>&1
if [ -x $InstallDir/bin/columnstore.pre-start ]; then
$InstallDir/bin/columnstore.pre-start
if [ $? -ne 0 ]; then
echo "Error running MariaDB Columnstore pre-start script, not starting MariaDB Columnstore"
rm -f /var/lock/subsys/columnstore
exit 1
fi
fi
checkInstallSetup
CoreFileFlag=`$InstallDir/bin/getConfig -c $InstallDir/etc/Calpont.xml Installation CoreFileFlag`
if [ $CoreFileFlag = "y" ]; then
SUDO=
if [ "$user" != "root" ]; then
SUDO="sudo"
fi
#columnstore core files
$SUDO ulimit -c unlimited > /dev/null 2>&1
$SUDO sysctl -q -w kernel.core_uses_pid=1 > /dev/null 2>&1
$SUDO sysctl -q -w kernel.core_pattern=/var/log/Calpont/corefiles/core.%e.%p > /dev/null 2>&1
fi
RETVAL=0
echo "Starting MariaDB Columnstore Database Platform"
rm -f /tmp/StopCalpont
exec $InstallDir/bin/run.sh $InstallDir/bin/ProcMon > /dev/null 2>&1 &
return $RETVAL
}
stop() {
echo "Shutting down MariaDB Columnstore Database Platform"
touch /tmp/StopCalpont
pkill -9 ProcMon
pkill -9 ProcMgr
pkill -9 snmptrapd
sleep 1
$InstallDir/bin/clearShm
RETVAL=$?
rm -f /var/lock/subsys/columnstore
fuser -k 8604/tcp > /dev/null 2>&1
test -f $InstallDir/mysql/mysql-Calpont || return $RETVAL
$InstallDir/mysql/mysql-Calpont stop > /dev/null 2>&1
if [ -x $InstallDir/bin/columnstore.post-stop ]; then
$InstallDir/bin/columnstore.post-stop
fi
return $RETVAL
}
restart() {
stop
start
}
status() {
isrunning=0
if [ $EUID -eq 0 ]; then
if [ -f /var/lock/subsys/columnstore ]; then
isrunning=1
fi
else
pgrep ProcMon >/dev/null 2>&1
if [ $? -eq 0 ]; then
isrunning=1
fi
fi
if [ $isrunning -ne 0 ]; then
echo "MariaDB Columnstore is running"
else
echo "MariaDB Columnstore is not running"
exit 3
fi
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
condrestart)
[ -f /var/lock/subsys/columnstore ] && restart || :
;;
status)
status
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
exit 1
esac
exit $?

View File

@ -1,2 +0,0 @@
/usr/local/Calpont/lib

View File

@ -1,9 +0,0 @@
#!/bin/bash
# Copy this file to /etc/default and rename it to 'infinidb'.
# Change this line to your InfiniDB installation directory
INFINIDB_INSTALL_DIR=/usr/local/Calpont
LD_LIBRARY_PATH=$INFINIDB_INSTALL_DIR/lib:$INFINIDB_INSTALL_DIR/mysql/lib/mysql
export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH

View File

@ -1,13 +0,0 @@
# InfiniDB Alias Commands
#
alias mcsmysql='/usr/local/Calpont/mysql/bin/mysql --defaults-file=/usr/local/Calpont/mysql/my.cnf -u root'
alias ma=/usr/local/Calpont/bin/mcsadmin
alias mcsadmin=/usr/local/Calpont/bin/mcsadmin
alias home='cd /usr/local/Calpont/'
alias log='cd /var/log/Calpont/'
alias core='cd /var/log/Calpont/corefiles'
alias tmsg='tail -f /var/log/messages'
alias tdebug='tail -f /var/log/Calpont/debug.log'
alias tinfo='tail -f /var/log/Calpont/info.log'
alias dbrm='cd /usr/local/Calpont/data1/systemFiles/dbrm'
alias module='cat /usr/local/Calpont/local/module'

View File

@ -1,35 +0,0 @@
#
# Calpont Log Rotate file that gets installed in /etc/logrotate.d
# as part of the RPM installation
#
/var/log/Calpont/*.log {
missingok
rotate 7
daily
dateext
copytruncate
olddir /var/log/Calpont/archive
}
/var/log/Calpont/*.log1 {
missingok
rotate 7
daily
nocreate
compress
olddir /var/log/Calpont/archive
}
/usr/local/Calpont/etc/Calpont.xml {
daily
dateext
copy
olddir /usr/local/Calpont/etc/
}
/usr/local/Calpont/mysql/db/*.err {
missingok
rotate 7
daily
dateext
copytruncate
olddir /usr/local/Calpont/mysql/db
}

View File

@ -1,7 +0,0 @@
# Calpont Database Platform Logging
local1.=crit -/var/log/Calpont/crit.log
local1.=err -/var/log/Calpont/err.log
local1.=warning -/var/log/Calpont/warning.log
local1.=info -/var/log/Calpont/info.log
local1.=debug -/var/log/Calpont/debug.log
local2.=crit -/var/log/Calpont/data/data_mods.log

View File

@ -1,78 +0,0 @@
# Calpont Database Platform Logging
source s_infinidb {
# message generated by Syslog-NG
internal();
# standard Linux log source (this is the default place for the syslog()
# function to send logs to)
unix-stream("/dev/log");
# messages from the kernel
file("/proc/kmsg" log_prefix("kernel: "));
# use the following line if you want to receive remote UDP logging messages
# (this is equivalent to the "-r" syslogd flag)
# udp();
};
filter f_local1crit { facility(local1) and level(crit); };
filter f_local1err { facility(local1) and level(err); };
filter f_local1warning { facility(local1) and level(warning); };
filter f_local1info { facility(local1) and level(info); };
filter f_local1debug { facility(local1) and level(debug); };
filter f_local2crit { facility(local2) and level(crit); };
destination d_crit{
file("/var/log/Calpont/crit.log");
};
destination d_err{
file("/var/log/Calpont/err.log");
};
destination d_warning{
file("/var/log/Calpont/warning.log");
};
destination d_info{
file("/var/log/Calpont/info.log");
};
destination d_debug{
file("/var/log/Calpont/debug.log");
};
destination d_data_mods{
file("/var/log/Calpont/data/data_mods.log");
};
log{
source(s_infinidb);
filter(f_local1crit);
destination(d_crit);
};
log{
source(s_infinidb);
filter(f_local1err);
destination(d_err);
};
log{
source(s_infinidb);
filter(f_local1warning);
destination(d_warning);
};
log{
source(s_infinidb);
filter(f_local1info);
destination(d_info);
};
log{
source(s_infinidb);
filter(f_local1debug);
destination(d_debug);
};
log{
source(s_infinidb);
filter(f_local2crit);
destination(d_data_mods);
};

View File

@ -1,8 +0,0 @@
# Calpont Database Platform Logging
local1.crit -/var/log/Calpont/crit.log
local1.err -/var/log/Calpont/err.log
local1.warning -/var/log/Calpont/warning.log
local1.info -/var/log/Calpont/info.log
local1.debug -/var/log/Calpont/debug.log
local2.crit -/var/log/Calpont/data/data_mods.log

View File

@ -1,118 +0,0 @@
#!/usr/bin/expect
#
# $Id$
#
# Uninstall Package from system
set INFINIDB_INSTALL_DIR "/usr/local/MariaDB/Columnstore"
set env(INFINIDB_INSTALL_DIR) $INFINIDB_INSTALL_DIR
set USERNAME $env(USER)
set PASSWORD " "
set DEBUG 0
set INFINIDBRPM1 "infinidb-libs"
set INFINIDBRPM2 "infinidb-platform"
set INFINIDBRPM3 "infinidb-enterprise"
set CONNECTORRPM1 "infinidb-mysql"
set CONNECTORRPM2 "infinidb-storage-engine"
spawn -noecho /bin/bash
for {set i 0} {$i<[llength $argv]} {incr i} {
set arg($i) [lindex $argv $i]
}
set i 0
while true {
if { $i == [llength $argv] } { break }
if { $arg($i) == "-h" } {
send_user "\n"
send_user "'calpontUninstall.sh' performs a system uninstall of the Calpont InfiniDB Packages.\n"
send_user "It will perform a shutdown of the InfiniDB software and the \n"
send_user "remove the Packages from all configured servers of the InfiniDB System.\n"
send_user "\n"
send_user "Usage: calpontUninstall.sh -p 'password' -d\n"
send_user " password - root password of the remote servers being un-installed'\n"
send_user " -d - Debug flag, output verbose information\n"
exit
} elseif { $arg($i) == "-p" } {
incr i
set PASSWORD $arg($i)
} elseif { $arg($i) == "-d" } {
set DEBUG 1
} elseif { $arg($i) == "-i" } {
incr i
set INSTALLDIR $arg($i)
} elseif { $arg($i) == "-u" } {
incr i
set USERNAME $arg($i)
}
incr i
}
log_user $DEBUG
set timeout 2
set INSTALL 2
send "$INFINIDB_INSTALL_DIR/bin/getConfig DBRM_Controller NumWorkers\n"
expect {
1 { set INSTALL 1 }
}
set PACKAGE "rpm"
send "$INFINIDB_INSTALL_DIR/bin/getConfig Installation EEPackageType\n"
expect {
rpm { set PACKAGE rpm }
deb { set PACKAGE deb }
binary { set PACKAGE binary }
}
set timeout 60
log_user $DEBUG
if { $INSTALL == "2" && $PASSWORD == " "} {puts "please enter the remote server root password, enter ./calpontUninstall.sh -h for additional info"; exit -1}
send_user "\nPerforming InfiniDB System Uninstall\n\n"
#
# shutdownSystem
#
send_user "Shutdown InfiniDB System "
expect -re {[$#] }
send "$INFINIDB_INSTALL_DIR/bin/mcsadmin shutdownsystem y\n"
expect {
"shutdownSystem " { send_user "DONE" }
}
send_user "\n"
if { $INSTALL == "2"} {
set timeout 600
#
# Run installer
#
send_user "Run System Uninstaller "
send "$INFINIDB_INSTALL_DIR/bin/installer $INFINIDBRPM1 $INFINIDBRPM2 $INFINIDBRPM3 $CONNECTORRPM1 $CONNECTORRPM2 uninstall $PASSWORD n --nodeps dummymysqlpw $DEBUG\n"
expect {
"uninstall request successful" { send_user "DONE" }
"ERROR" { send_user "FAILED" ; exit -1 }
}
send_user "\n"
}
if { $PACKAGE == "binary" } {
send "$INFINIDB_INSTALL_DIR/bin/pre-uninstall\n"
expect {
-re {[$#] } { }
}
send_user "\n"
send_user "\nCalpont Package System Uninstall Completed\n\n"
exit 0
}
send_user "\nCalpont Package System Uninstall Completed\n\n"
exit 0

View File

@ -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

View File

@ -1,74 +0,0 @@
#!/bin/bash
#
# $Id$
#
# generic InfiniDB Disable Replication script.
#
# Notes: This script gets run by ProcMon:
# check log for error
checkForError() {
grep ERROR /tmp/disable-rep-status.log > /tmp/error.check
if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then
echo "ERROR: check log file: /tmp/disable-rep-status.log"
rm -f /tmp/error.check
exit 1
fi
rm -f /tmp/error.check
}
prefix=/usr/local
installdir=$prefix/MariaDB/Columnstore
pwprompt=
for arg in "$@"; do
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
prefix="`echo $arg | awk -F= '{print $2}'`"
installdir=$prefix/MariaDB/Columnstore
elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then
password="`echo $arg | awk -F= '{print $2}'`"
pwprompt="--password=$password"
elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then
installdir="`echo $arg | awk -F= '{print $2}'`"
prefix=`dirname $installdir`
fi
done
test -f $installdir/post/functions && . $installdir/post/functions
>/tmp/disable-rep-status.log
#
# Run stop slave command
#
echo "Run stop slave command" >>/tmp/disable-rep-status.log
cat >/tmp/idb_disable-rep.sql <<EOD
stop slave;
EOD
cat /tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
checkForError
#
# Run reset slave command
#
echo "Run start slave command" >>/tmp/disable-rep-status.log
cat >/tmp/idb_disable-rep.sql <<EOD
reset slave;
EOD
cat /tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
checkForError
#alls good, 'OK' for success
echo "OK"
exit 0

View File

@ -1,74 +0,0 @@
#!/bin/bash
#
# $Id$
#
# generic InfiniDB Disable Replication script.
#
# Notes: This script gets run by ProcMon:
# check log for error
checkForError() {
grep ERROR /tmp/disable-rep-status.log > /tmp/error.check
if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then
echo "ERROR: check log file: /tmp/disable-rep-status.log"
rm -f /tmp/error.check
exit 1
fi
rm -f /tmp/error.check
}
prefix=/usr/local
installdir=$prefix/MariaDB/Columnstore
pwprompt=
for arg in "$@"; do
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
prefix="`echo $arg | awk -F= '{print $2}'`"
installdir=$prefix/MariaDB/Columnstore
elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then
password="`echo $arg | awk -F= '{print $2}'`"
pwprompt="--password=$password"
elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then
installdir="`echo $arg | awk -F= '{print $2}'`"
prefix=`dirname $installdir`
fi
done
test -f $installdir/post/functions && . $installdir/post/functions
>/tmp/disable-rep-status.log
#
# Run stop slave command
#
echo "Run stop slave command" >>/tmp/disable-rep-status.log
cat >/tmp/idb_disable-rep.sql <<EOD
stop slave;
EOD
cat /tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
checkForError
#
# Run reset slave command
#
echo "Run start slave command" >>/tmp/disable-rep-status.log
cat >/tmp/idb_disable-rep.sql <<EOD
reset slave;
EOD
cat /tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
checkForError
#alls good, 'OK' for success
echo "OK"
exit 0

View File

@ -1,184 +0,0 @@
#!/bin/bash
#
# $Id: infinidb 3704 2013-08-07 03:33:20Z bwilkinson $
#
# infinidb Starts Calpont InfiniDB database platform
#
#
# chkconfig: 2345 99 99
# description: Calpont InfiniDB is a database platform that utilizes Mysql
#
### BEGIN INIT INFO
# Provides: infinidb
# Required-Start: $local_fs $remote_fs $network $syslog $all
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start/stop InfiniDB DW DBMS
### END INIT INFO
# Source function library.
if [ -f /etc/init.d/functions ]; then
. /etc/init.d/functions
fi
if [ -z "$INFINIDB_INSTALL_DIR" ]; then
test -f /etc/default/infinidb && . /etc/default/infinidb
fi
if [ -z "$INFINIDB_INSTALL_DIR" ]; then
INFINIDB_INSTALL_DIR=/usr/local/Calpont
fi
export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR
InstallDir=$INFINIDB_INSTALL_DIR
if [ $InstallDir != "/usr/local/Calpont" ]; then
export PATH=$InstallDir/bin:$InstallDir/mysql/bin:/bin:/usr/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$InstallDir/lib:$InstallDir/mysql/lib/mysql
fi
#hadoop
plugin=`$INFINIDB_INSTALL_DIR/bin/getConfig SystemConfig DataFilePlugin`
if [ -n "$plugin" ]; then
setenv=`$InstallDir/bin/getConfig SystemConfig DataFileEnvFile`
. $InstallDir/bin/$setenv >/dev/null 2>&1
fi
if [ -e $InstallDir/lib/libjemalloc.so ]; then
export LD_PRELOAD=$InstallDir/lib/libjemalloc.so
elif [ -e $InstallDir/lib/libjemalloc.so.1 ]; then
export LD_PRELOAD=$InstallDir/lib/libjemalloc.so.1
fi
test -f $InstallDir/post/functions && . $InstallDir/post/functions
mt=`module_type`
mid=`module_id`
has_um=`$InstallDir/bin/getConfig SystemModuleConfig ModuleCount2`
if [ "x$has_um" = x ]; then
has_um=0
fi
user=$USER
if [ -z "$user" ]; then
user=root
fi
checkInstallSetup() {
InitialInstallFlag=`$InstallDir/bin/getConfig -c $InstallDir/etc/Calpont.xml Installation InitialInstallFlag`
if [ $InitialInstallFlag != "y" ]; then
echo "Please run the postConfigure install script, check the Installation Guide"
echo "for additional details"
rm -f /var/lock/subsys/infinidb
exit 1
fi
}
[ -f $InstallDir/bin/ProcMon ] || exit 0
start() {
if [ -f /var/lock/subsys/infinidb ]; then
echo "InfiniDB Database Platform already running"
exit 0
fi
(mkdir -p /var/lock/subsys && touch /var/lock/subsys/infinidb) >/dev/null 2>&1
if [ -x $InstallDir/bin/infinidb.pre-start ]; then
$InstallDir/bin/infinidb.pre-start
if [ $? -ne 0 ]; then
echo "Error running InfiniDB pre-start script, not starting InfiniDB"
rm -f /var/lock/subsys/infinidb
exit 1
fi
fi
checkInstallSetup
CoreFileFlag=`$InstallDir/bin/getConfig -c $InstallDir/etc/Calpont.xml Installation CoreFileFlag`
if [ $CoreFileFlag = "y" ]; then
SUDO=
if [ "$user" != "root" ]; then
SUDO="sudo"
fi
#infinidb core files
$SUDO ulimit -c unlimited > /dev/null 2>&1
$SUDO sysctl -q -w kernel.core_uses_pid=1 > /dev/null 2>&1
$SUDO sysctl -q -w kernel.core_pattern=/var/log/Calpont/corefiles/core.%e.%p > /dev/null 2>&1
fi
RETVAL=0
echo "Starting InfiniDB Database Platform"
rm -f /tmp/StopCalpont
exec $InstallDir/bin/run.sh $InstallDir/bin/ProcMon > /dev/null 2>&1 &
return $RETVAL
}
stop() {
echo "Shutting down InfiniDB Database Platform"
touch /tmp/StopCalpont
pkill -9 ProcMon
pkill -9 ProcMgr
pkill -9 snmptrapd
sleep 1
$InstallDir/bin/clearShm
RETVAL=$?
rm -f /var/lock/subsys/infinidb
fuser -k 8604/tcp > /dev/null 2>&1
test -f $InstallDir/mysql/mysql-Calpont || return $RETVAL
$InstallDir/mysql/mysql-Calpont stop > /dev/null 2>&1
if [ -x $InstallDir/bin/infinidb.post-stop ]; then
$InstallDir/bin/infinidb.post-stop
fi
return $RETVAL
}
restart() {
stop
start
}
status() {
isrunning=0
if [ $EUID -eq 0 ]; then
if [ -f /var/lock/subsys/infinidb ]; then
isrunning=1
fi
else
pgrep ProcMon >/dev/null 2>&1
if [ $? -eq 0 ]; then
isrunning=1
fi
fi
if [ $isrunning -ne 0 ]; then
echo "InfiniDB is running"
else
echo "InfiniDB is not running"
exit 3
fi
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
condrestart)
[ -f /var/lock/subsys/infinidb ] && restart || :
;;
status)
status
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
exit 1
esac
exit $?

View File

@ -1,2 +0,0 @@
/usr/local/Calpont/lib

View File

@ -1,9 +0,0 @@
#!/bin/bash
# Copy this file to /etc/default and rename it to 'infinidb'.
# Change this line to your InfiniDB installation directory
INFINIDB_INSTALL_DIR=/usr/local/Calpont
LD_LIBRARY_PATH=$INFINIDB_INSTALL_DIR/lib:$INFINIDB_INSTALL_DIR/mysql/lib/mysql
export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH

View File

@ -1,112 +0,0 @@
#!/bin/bash
#
# $Id$
#
# generic InfiniDB Master Replication script.
#
# Notes: This script gets run by ProcMon during installs and upgrades:
# check log for error
checkForError() {
grep ERROR /tmp/master-rep-status-$hostipaddr.log > /tmp/error.check
if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then
echo "ERROR: check log file: /tmp/master-rep-status-$hostipaddr.log"
rm -f /tmp/error.check
exit 1
fi
rm -f /tmp/error.check
}
prefix=/usr/local
installdir=$prefix/MariaDB/Columnstore
pwprompt=
for arg in "$@"; do
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
prefix="`echo $arg | awk -F= '{print $2}'`"
installdir=$prefix/MariaDB/Columnstore
elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then
password="`echo $arg | awk -F= '{print $2}'`"
pwprompt="--password=$password"
elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then
installdir="`echo $arg | awk -F= '{print $2}'`"
prefix=`dirname $installdir`
elif [ `expr -- "$arg" : '--hostIP='` -eq 9 ]; then
hostipaddr="`echo $arg | awk -F= '{print $2}'`"
fi
done
test -f $installdir/post/functions && . $installdir/post/functions
repUser="idbrep"
password="Calpont1"
>/tmp/master-rep-status-$hostipaddr.log
#
# Create Replication User
#
echo "Create Replication User $repUser for node $hostipaddr" >>/tmp/master-rep-status-$hostipaddr.log
cat >/tmp/idb_master-rep.sql <<EOD
CREATE USER '$repUser'@'$hostipaddr' IDENTIFIED BY '$password';
GRANT REPLICATION SLAVE ON *.* TO '$repUser'@'$hostipaddr';
EOD
cat /tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
checkForError
#
# Grant table access for created user
#
echo "Grant table access for $repUser for node $hostipaddr" >>/tmp/master-rep-status-$hostipaddr.log
cat >/tmp/idb_master-rep.sql <<EOD
use mysql
grant all on *.* to '$repUser'@'$hostipaddr' identified by 'Calpont1';
grant REPLICATION SLAVE on *.* to '$repUser'@'$hostipaddr' identified by 'Calpont1';
EOD
cat /tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
checkForError
#
# Run SHOW MASTER STATUS
#
echo "Run SHOW MASTER STATUS to node log" >>/tmp/master-rep-status-$hostipaddr.log
cat >/tmp/idb_master-rep.sql <<EOD
SHOW MASTER STATUS
EOD
cat /tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
checkForError
echo "Run SHOW MASTER STATUS to master status log /tmp/show-master-status.log" >>/tmp/master-rep-status-$hostipaddr.log
cat >/tmp/idb_master-rep.sql <<EOD
SHOW MASTER STATUS
EOD
cat /tmp/idb_master-rep.sql >/tmp/show-master-status.log
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_master-rep.sql >>/tmp/show-master-status.log
#alls good, 'OK' for success
echo "OK"
exit 0

View File

@ -1,112 +0,0 @@
#!/bin/bash
#
# $Id$
#
# generic InfiniDB Master Replication script.
#
# Notes: This script gets run by ProcMon during installs and upgrades:
# check log for error
checkForError() {
grep ERROR /tmp/master-rep-status-$hostipaddr.log > /tmp/error.check
if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then
echo "ERROR: check log file: /tmp/master-rep-status-$hostipaddr.log"
rm -f /tmp/error.check
exit 1
fi
rm -f /tmp/error.check
}
prefix=/usr/local
installdir=$prefix/MariaDB/Columnstore
pwprompt=
for arg in "$@"; do
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
prefix="`echo $arg | awk -F= '{print $2}'`"
installdir=$prefix/MariaDB/Columnstore
elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then
password="`echo $arg | awk -F= '{print $2}'`"
pwprompt="--password=$password"
elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then
installdir="`echo $arg | awk -F= '{print $2}'`"
prefix=`dirname $installdir`
elif [ `expr -- "$arg" : '--hostIP='` -eq 9 ]; then
hostipaddr="`echo $arg | awk -F= '{print $2}'`"
fi
done
test -f $installdir/post/functions && . $installdir/post/functions
repUser="idbrep"
password="Calpont1"
>/tmp/master-rep-status-$hostipaddr.log
#
# Create Replication User
#
echo "Create Replication User $repUser for node $hostipaddr" >>/tmp/master-rep-status-$hostipaddr.log
cat >/tmp/idb_master-rep.sql <<EOD
CREATE USER '$repUser'@'$hostipaddr' IDENTIFIED BY '$password';
GRANT REPLICATION SLAVE ON *.* TO '$repUser'@'$hostipaddr';
EOD
cat /tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
checkForError
#
# Grant table access for created user
#
echo "Grant table access for $repUser for node $hostipaddr" >>/tmp/master-rep-status-$hostipaddr.log
cat >/tmp/idb_master-rep.sql <<EOD
use mysql
grant all on *.* to '$repUser'@'$hostipaddr' identified by 'Calpont1';
grant REPLICATION SLAVE on *.* to '$repUser'@'$hostipaddr' identified by 'Calpont1';
EOD
cat /tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
checkForError
#
# Run SHOW MASTER STATUS
#
echo "Run SHOW MASTER STATUS to node log" >>/tmp/master-rep-status-$hostipaddr.log
cat >/tmp/idb_master-rep.sql <<EOD
SHOW MASTER STATUS
EOD
cat /tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
checkForError
echo "Run SHOW MASTER STATUS to master status log /tmp/show-master-status.log" >>/tmp/master-rep-status-$hostipaddr.log
cat >/tmp/idb_master-rep.sql <<EOD
SHOW MASTER STATUS
EOD
cat /tmp/idb_master-rep.sql >/tmp/show-master-status.log
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_master-rep.sql >>/tmp/show-master-status.log
#alls good, 'OK' for success
echo "OK"
exit 0

View File

@ -1,167 +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=$USER
if [ -z "$user" ]; then
user=root
fi
quiet=0
shiftcnt=0
for arg in "$@"; do
if [ $(expr -- "$arg" : '--prefix=') -eq 9 ]; then
prefix="$(echo $arg | awk -F= '{print $2}')"
installdir=$prefix/MariaDB/Columnstore
((shiftcnt++))
elif [ $(expr -- "$arg" : '--rpmmode=') -eq 10 ]; then
rpmmode="$(echo $arg | awk -F= '{print $2}')"
((shiftcnt++))
elif [ $(expr -- "$arg" : '--installdir=') -eq 13 ]; then
installdir="$(echo $arg | awk -F= '{print $2}')"
prefix=$(dirname $installdir)
((shiftcnt++))
elif [ $(expr -- "$arg" : '--user=') -eq 7 ]; then
user="$(echo $arg | awk -F= '{print $2}')"
((shiftcnt++))
elif [ $(expr -- "$arg" : '--quiet') -eq 7 ]; then
quiet=1
((shiftcnt++))
elif [ $(expr -- "$arg" : '--port') -eq 6 ]; then
mysqlPort="$(echo $arg | awk -F= '{print $2}')"
((shiftcnt++))
elif [ $(expr -- "$arg" : '--module') -eq 8 ]; then
module="$(echo $arg | awk -F= '{print $2}')"
((shiftcnt++))
fi
done
shift $shiftcnt
if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFINIDB_INSTALL_DIR/lib:$INFINIDB_INSTALL_DIR/mysql/lib/mysql
fi
export INFINIDB_INSTALL_DIR=$installdir
cloud=`$INFINIDB_INSTALL_DIR/bin/getConfig Installation Cloud`
if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then
cp $INFINIDB_INSTALL_DIR/local/etc/*.pem /root/. > /dev/null 2>&1
if test -f $INFINIDB_INSTALL_DIR/local/etc/pm1/fstab ; then
echo "Setup fstab on Module"
touch /etc/fstab
rm -f /etc/fstab.columnstoreSave
mv /etc/fstab /etc/fstab.columnstoreSave
cat $INFINIDB_INSTALL_DIR/local/etc/pm1/fstab >> /etc/fstab
fi
fi
test -f $INFINIDB_INSTALL_DIR/post/functions && . $INFINIDB_INSTALL_DIR/post/functions
mid=`module_id`
#if um, cloud, separate system type, external um storage, then setup mount
if [ $module = "um" ]; then
if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then
systemtype=`$INFINIDB_INSTALL_DIR/bin/getConfig Installation ServerTypeInstall`
if [ $systemtype = "1" ]; then
umstoragetype=`$INFINIDB_INSTALL_DIR/bin/getConfig Installation UMStorageType`
if [ $umstoragetype = "external" ]; then
echo "Setup UM Volume Mount"
device=`$INFINIDB_INSTALL_DIR/bin/getConfig Installation UMVolumeDeviceName$mid`
mkdir -p $INFINIDB_INSTALL_DIR/mysql/db > /dev/null 2>&1
mount $device $INFINIDB_INSTALL_DIR/mysql/db -t ext2 -o defaults
chown mysql:mysql -R $INFINIDB_INSTALL_DIR/mysql > /dev/null 2>&1
fi
fi
fi
fi
#if pm, create dbroot directories
if [ $module = "pm" ]; then
numdbroots=`$INFINIDB_INSTALL_DIR/bin/getConfig SystemConfig DBRootCount`
for (( id=1; id<$numdbroots+1; id++ )); do
mkdir -p $INFINIDB_INSTALL_DIR/data$id > /dev/null 2>&1
chmod 755 $INFINIDB_INSTALL_DIR/data$id
done
fi
echo "Setup rc.local on Module"
if [ $EUID -eq 0 -a -f $INFINIDB_INSTALL_DIR/local/rc.local.columnstore ]; then
if [ $user = "root" ]; then
touch /etc/rc.local
rm -f /etc/rc.local.columnstoreSave
cp /etc/rc.local /etc/rc.local.columnstoreSave
cat $INFINIDB_INSTALL_DIR/local/rc.local.columnstore >> /etc/rc.local
else
sudo touch /etc/rc.local
sudo rm -f /etc/rc.local.columnstoreSave
sudo cp /etc/rc.local /etc/rc.local.columnstoreSave
sudo cat $INFINIDB_INSTALL_DIR/local/rc.local.columnstore >> /etc/rc.local
fi
fi
if [ $user != "root" ]; then
echo "Setup .bashrc on Module for non-root"
eval userhome=~$user
bashFile=$userhome/.bashrc
touch ${bashFile}
echo " " >> ${bashFile}
echo "export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR" >> ${bashFile}
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFINIDB_INSTALL_DIR/lib:$INFINIDB_INSTALL_DIR/mysql/lib/mysql" >> ${bashFile}
fi
plugin=`$INFINIDB_INSTALL_DIR/bin/getConfig SystemConfig DataFilePlugin`
if [ -n "$plugin" ]; then
echo "Setup .bashrc on Module for local-query"
setenv=`$INFINIDB_INSTALL_DIR/bin/getConfig SystemConfig DataFileEnvFile`
eval userhome=~$user
bashFile=$userhome/.bashrc
touch ${bashFile}
echo " " >> ${bashFile}
echo ". $INFINIDB_INSTALL_DIR/bin/$setenv" >> ${bashFile}
fi
# if mysqlrep is on and module has a my.cnf file, upgrade it
MySQLRep=`$INFINIDB_INSTALL_DIR/bin/getConfig Installation MySQLRep`
if [ $MySQLRep = "y" ]; then
if test -f $INFINIDB_INSTALL_DIR/mysql/my.cnf ; then
echo "Run Upgrade on my.cnf on Module"
$INFINIDB_INSTALL_DIR/bin/mycnfUpgrade > /tmp/mycnfUpgrade.log 2>&1
fi
fi
if test -f $INFINIDB_INSTALL_DIR/mysql/my.cnf ; then
echo "Run Mysql Port update on my.cnf on Module"
$INFINIDB_INSTALL_DIR/bin/mycnfUpgrade $mysqlPort > /tmp/mycnfUpgrade_port.log 2>&1
fi
# if um, run mysql install scripts
if [ $module = "um" ]; then
echo "Run post-mysqld-install"
$INFINIDB_INSTALL_DIR/bin/post-mysqld-install > /tmp/post-mysqld-install.log 2>&1
echo "Run post-mysql-install"
$INFINIDB_INSTALL_DIR/bin/post-mysql-install > /tmp/post-mysql-install.log 2>&1
fi
echo " "
echo "!!!Module Installation Successfully Completed!!!"
exit 0

View File

@ -1,2 +0,0 @@
# List of my.cnf arguments that should be ignored during upgrade install
#

View File

@ -1,18 +0,0 @@
# List of my.cnf arguments that should be checked and saved during upgrade install
#
infinidb_local_query
log-bin=mysql-bin
server-id
max_length_for_sort_data
tmpdir
log-error
general_log_file
slow_query_log_file
general-log
slow-query-log
character-set-server
collation-server
init-connect
binlog_format
secure-auth
port

View File

@ -1,44 +0,0 @@
#!/bin/bash
#
# Determine the Linux distribution and version that is being run.
#
# Check for GNU/Linux distributions
if [ -f /etc/SuSE-release ]; then
DISTRIBUTION="suse"
elif [ -f /etc/UnitedLinux-release ]; then
DISTRIBUTION="united"
elif [ -f /etc/debian_version ]; then
DISTRIBUTION="debian"
elif [ -f /etc/lsb_version ]; then
DISTRIBUTION="ubuntu"
elif [ -f /etc/redhat-release ]; then
a=`grep -i 'red.*hat.*enterprise.*linux' /etc/redhat-release`
if test $? = 0; then
DISTRIBUTION=rhel
else
a=`grep -i 'red.*hat.*linux' /etc/redhat-release`
if test $? = 0; then
DISTRIBUTION=rh
else
a=`grep -i 'Fedora' /etc/redhat-release`
if test $? = 0; then
DISTRIBUTION=fedora
else
a=`grep -i 'cern.*e.*linux' /etc/redhat-release`
if test $? = 0; then
DISTRIBUTION=cel
else
a=`grep -i 'scientific linux cern' /etc/redhat-release`
if test $? = 0; then
DISTRIBUTION=slc
else
DISTRIBUTION="unknown"
fi
fi
fi
fi
fi
else
DISTRIBUTION="unknown"
fi
echo ${DISTRIBUTION}

View File

@ -1,69 +0,0 @@
#!/usr/bin/expect
#
# $Id: patch_installer.sh 421 2007-04-05 15:46:55Z dhill $
#
# Install Software Patch on Module
# Argument 1 - Remote Module Name
# Argument 2 - Remote Server Host Name or IP address
# Argument 3 - Root Password of remote server
# Argument 4 - Patch Directory Location
# Argument 5 - Install Directory Location
# Argument 6 - Software File being installed
# Argument 7 - Debug flag 1 for on, 0 for off
set timeout 20
set MODULE [lindex $argv 0]
set SERVER [lindex $argv 1]
set PASSWORD [lindex $argv 2]
set PATCHLOCATION [lindex $argv 3]
set INSTALLLOCATION [lindex $argv 4]
set FILE [lindex $argv 5]
set DEBUG [lindex $argv 6]
set USERNAME "root"
set UNM [lindex $argv 7]
if { $UNM != "" } {
set USERNAME $UNM
}
log_user $DEBUG
spawn -noecho /bin/bash
#
# mv file being install
#
send_user "Backup Current File on Module"
expect -re "# "
send "ssh $USERNAME@$SERVER 'mv $INSTALLLOCATION$FILE $INSTALLLOCATION$FILE'.patchSave''\n"
# accept the remote host fingerprint (assuming never logged in before)
expect -re "service not known" { send_user " FAILED: Invalid Host\n" ; exit }
expect -re "authenticity" { send "yes\n" }
expect -re "word: "
# password for ssh
send "$PASSWORD\n"
# check return
expect {
-re "# " { send_user " DONE" }
-re "Permission denied" { send_user " FAILED: Invalid password\n" } exit;
-re "mv" { send_user " FAILED: copy filed\n" ; exit}
}
send_user "\n"
#
# send Patch File
#
send_user "Copy New Calpont Software File to Module"
expect -re "# "
send "scp $PATCHLOCATION$FILE $USERNAME@$SERVER:$INSTALLLOCATION$FILE\n"
expect -re "word: "
# send the password
send "$PASSWORD\n"
# check return
expect {
-re "100%" { send_user " DONE" }
-re "scp" { send_user " FAILED\n" ;
send_user "\n*** Installation Failed\n" ;
exit }
-re "Permission denied" { send_user " FAILED: Invalid password\n" ; exit }
-re "No such file or directory" { send_user " FAILED: Invalid package\n" ; exit }
}
send_user "\n"
send_user "\n!!!Patch Installation Successfully Completed!!!\n"
exit

View File

@ -1,319 +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 PKGTYPE [lindex $argv 5]
set NODEPS [lindex $argv 6]
set DEBUG [lindex $argv 7]
set INSTALLDIR "/usr/local/MariaDB/Columnstore"
set IDIR [lindex $argv 8]
if { $IDIR != "" } {
set INSTALLDIR $IDIR
}
set USERNAME "root"
set UNM [lindex $argv 13]
if { $UNM != "" } {
set USERNAME $UNM
}
set BASH "/bin/bash "
if { $DEBUG == "1" } {
set BASH "/bin/bash -x "
}
set HOME "$env(HOME)"
log_user $DEBUG
spawn -noecho /bin/bash
#
if { $PKGTYPE == "rpm" } {
set PKGERASE "rpm -e --nodeps \$(rpm -qa | grep '^infinidb')"
set PKGERASE1 "rpm -e --nodeps "
set PKGINSTALL "rpm -ivh $NODEPS --force infinidb*$VERSION*"
set PKGUPGRADE "rpm -Uvh --noscripts infinidb*$VERSION*"
} else {
if { $PKGTYPE == "deb" } {
set PKGERASE "dpkg -P \$(dpkg --get-selections | grep '^infinidb')"
set PKGERASE1 "dpkg -P "
set PKGINSTALL "dpkg -i --force-confnew infinidb*$VERSION*"
set PKGUPGRADE "dpkg -i --force-confnew infinidb*$VERSION*"
} else {
if { $PKGTYPE != "bin" } {
send_user "Invalid Package Type of $PKGTYPE"
exit 1
}
}
}
# check and see if remote server has ssh keys setup, set PASSWORD if so
send_user " "
send "ssh $USERNAME@$SERVER 'time'\n"
set timeout 60
expect {
"Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit 1 }
"service not known" { send_user "FAILED: Invalid Host\n" ; exit 1 }
"authenticity" { send "yes\n"
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
}
"sys" { set PASSWORD "ssh" }
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
timeout { send_user "ERROR: Timeout to host\n" ; exit 1 }
}
set timeout 30
expect {
-re {[$#] } { }
"sys" { }
}
send_user "\n"
#BUG 5749 - SAS: didn't work on their system until I added the sleep 60
sleep 60
if { $INSTALLTYPE == "initial" || $INSTALLTYPE == "uninstall" } {
#
# erase package
#
send_user "Erase InfiniDB Packages on Module "
send "ssh $USERNAME@$SERVER '$PKGERASE ;$PKGERASE1 dummy'\n"
if { $PASSWORD != "ssh" } {
set timeout 30
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
}
set timeout 120
expect {
"package dummy" { send_user "DONE" }
"error: Failed dependencies" { send_user "ERROR: Failed dependencies\n" ; exit 1 }
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
}
send_user "\n"
}
if { $INSTALLTYPE == "uninstall" } { exit 0 }
#
# send the package
#
set timeout 30
#expect -re {[$#] }
send_user "Copy New InfiniDB Package to Module "
send "ssh $USERNAME@$SERVER 'rm -f /root/infinidb-*.$PKGTYPE'\n"
if { $PASSWORD != "ssh" } {
set timeout 30
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
}
expect {
-re {[$#] } { }
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
}
set timeout 30
expect {
-re {[$#] } { }
}
send "scp $HOME/infinidb*$VERSION* $USERNAME@$SERVER:.;$PKGERASE dummy\n"
if { $PASSWORD != "ssh" } {
set timeout 30
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
}
set timeout 180
expect {
"package dummy" { send_user "DONE" }
"directory" { send_user "ERROR\n" ;
send_user "\n*** Installation ERROR\n" ;
exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
}
send_user "\n"
#sleep to make sure it's finished
sleep 5
#
if { $INSTALLTYPE == "initial"} {
#
# install package
#
send_user "Install InfiniDB Packages on Module "
send "ssh $USERNAME@$SERVER '$PKGINSTALL infinidb*$VERSION* ;$PKGERASE dummy'\n"
if { $PASSWORD != "ssh" } {
set timeout 30
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
}
set timeout 180
expect {
"package dummy" { send_user "DONE" }
"error: Failed dependencies" { send_user "ERROR: Failed dependencies\n" ;
send_user "\n*** Installation ERROR\n" ;
exit 1 }
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
"needs" { send_user "ERROR: disk space issue\n" ; exit 1 }
"conflicts" { send_user "ERROR: File Conflict issue\n" ; exit 1 }
}
}
send_user "\n"
#sleep to make sure it's finished
sleep 5
set timeout 30
#expect -re {[$#] }
if { $INSTALLTYPE == "initial"} {
#
# copy over InfiniDB config file
#
send_user "Copy InfiniDB Config file to Module "
send "scp $INSTALLDIR/etc/* $USERNAME@$SERVER:$INSTALLDIR/etc/.\n"
if { $PASSWORD != "ssh" } {
set timeout 30
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
}
set timeout 30
expect {
-re {[$#] } { send_user "DONE" }
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
}
send_user "\n"
#sleep to make sure it's finished
sleep 5
#
# copy over custom OS tmp files
#
send_user "Copy Custom OS files to Module "
send "scp -r $INSTALLDIR/local/etc $USERNAME@$SERVER:$INSTALLDIR/local/.\n"
if { $PASSWORD != "ssh" } {
set timeout 30
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
}
set timeout 30
expect {
-re {[$#] } { send_user "DONE" }
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
}
send_user "\n"
#sleep to make sure it's finished
sleep 5
#
# copy over InfiniDB OS files
#
send_user "Copy InfiniDB OS files to Module "
send "scp $INSTALLDIR/local/etc/$MODULE/* $USERNAME@$SERVER:$INSTALLDIR/local/.\n"
if { $PASSWORD != "ssh" } {
set timeout 30
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
}
set timeout 30
expect {
-re {[$#] } { send_user "DONE" }
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
}
#
send_user "\n"
#sleep to make sure it's finished
sleep 5
#
# Start module installer to setup Custom OS files
#
send_user "Run Module Installer "
send "ssh $USERNAME@$SERVER '$BASH $INSTALLDIR/bin/module_installer.sh --module=pm'\n"
if { $PASSWORD != "ssh" } {
set timeout 30
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
}
set timeout 30
expect {
"!!!Module" { send_user "DONE" }
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
"FAILED" { send_user "ERROR: missing OS file\n" ; exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
"No such file" { send_user "ERROR: File Not Found\n" ; exit 1 }
}
send_user "\n"
}
#
# check InfiniDB syslog functionality
#
set timeout 30
#expect -re {[$#] }
send_user "Check InfiniDB system logging functionality "
send " \n"
send date\n
send "ssh $USERNAME@$SERVER '$BASH $INSTALLDIR/bin/syslogSetup.sh check'\n"
if { $PASSWORD != "ssh" } {
set timeout 30
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
}
set timeout 30
expect {
"Logging working" { send_user "DONE" }
timeout { send_user "DONE" }
"not working" { send_user "WARNING: InfiniDB system logging functionality not working" }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
}
send_user "\n"
#
send_user "\nInstallation Successfully Completed on '$MODULE'\n"
exit 0
# vim:ts=4 sw=4:

View File

@ -1,336 +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=$USER
if [ -z "$user" ]; then
user=root
fi
quiet=0
for arg in "$@"; do
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
prefix="`echo $arg | awk -F= '{print $2}'`"
installdir=$prefix/MariaDB/Columnstore
elif [ `expr -- "$arg" : '--rpmmode='` -eq 10 ]; then
rpmmode="`echo $arg | awk -F= '{print $2}'`"
elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then
installdir="`echo $arg | awk -F= '{print $2}'`"
prefix=`dirname $installdir`
elif [ `expr -- "$arg" : '--user='` -eq 7 ]; then
user="`echo $arg | awk -F= '{print $2}'`"
elif [ `expr -- "$arg" : '--quiet'` -eq 7 ]; then
quiet=1
elif [ `expr -- "$arg" : '--plugin='` -eq 9 ]; then
plugin="`echo $arg | awk -F= '{print $2}'`"
else
echo "post-install: ignoring unknown argument: $arg" 1>&2
fi
done
if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then
export INFINIDB_INSTALL_DIR=$installdir
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib
else
# add library config file
/bin/cp -f $installdir/bin/infinidb.conf /etc/ld.so.conf.d/.
ldconfig
fi
#check 64-bit OS compatiable
arch=`uname -m`
patcnt=`expr "$arch" : 'i.86'`
is64bitos=1
if [ $patcnt -ne 0 ]; then
is64bitos=0
fi
is64bitpkg=1
file $installdir/bin/PrimProc | grep '64-bit' >/dev/null 2>&1
if [ $? -ne 0 ]; then
is64bitpkg=0
fi
if [ $is64bitpkg -eq 1 -a $is64bitos -ne 1 ]; then
echo "ERROR: Incompatiable Version, package is intended for a x86_64 architecture"
echo "exiting...."
exit 1
fi
if [ ! -f $installdir/etc/Calpont.xml ]; then
echo "$installdir/etc/Calpont.xml not found, exiting"
exit 1
fi
cd $installdir/lib || exit 1
for lib in *.so.1.0.0; do
blib=`basename $lib .1.0.0`
ln -sf $lib $blib
done
chown -h $user.$user *.so >/dev/null 2>&1
if [ -f libnetsnmp.so.5.2.1 ]; then
for lib in *.so.5.2.1; do
blib=`basename $lib .5.2.1`
ln -sf $lib $blib
ln -sf $lib ${blib}.5
done
chown -h $user.$user *.so *.so.5 >/dev/null 2>&1
fi
if [ -f libstdc++.so.6.0.14 ]; then
ln -sf libstdc++.so.6.0.14 libstdc++.so.6
chown -h $user.$user libstdc++.so.6 >/dev/null 2>&1
fi
ln -sf libjemalloc.so.3.3.0 libjemalloc.so
chown -h $user.$user libjemalloc.so >/dev/null 2>&1
# TODO-based on early experience with HDP it doesn't install bigtop
# so the code below will not correctly detect JAVA_HOME. Need to
# decide how to handle
# Autodetect JAVA_HOME if not defined
#if [ -e /usr/libexec/bigtop-detect-javahome ]; then
#. /usr/libexec/bigtop-detect-javahome
#elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
#. /usr/lib/bigtop-utils/bigtop-detect-javahome
#fi
#ln -sf $JAVA_HOME/jre/lib/amd64/server/libjvm.so
#chown -h $user.$user libjvm.so >/dev/null 2>&1
cd /
test -d /var/log/Calpont || mkdir /var/log/Calpont >/dev/null 2>&1
test -d /var/log/Calpont/archive || mkdir /var/log/Calpont/archive >/dev/null 2>&1
test -d /var/log/Calpont/corefiles || mkdir /var/log/Calpont/corefiles >/dev/null 2>&1
test -d /var/log/Calpont/trace || mkdir /var/log/Calpont/trace >/dev/null 2>&1
test -h /var/log/Calpont/data && rm -f /var/log/Calpont/data
test -d /var/log/Calpont/data || mkdir /var/log/Calpont/data >/dev/null 2>&1
# make sure trace dir is world-writable and sticky
chmod 1755 /var/log/Calpont/trace >/dev/null 2>&1
test -d $installdir/data || mkdir $installdir/data
test -d $installdir/data1 || mkdir $installdir/data1
test -d $installdir/data1/systemFiles || mkdir $installdir/data1/systemFiles
test -d $installdir/data1/systemFiles/dbrm || mkdir $installdir/data1/systemFiles/dbrm
test -d $installdir/data1/systemFiles/dataTransaction || rmdir $installdir/data1/systemFiles/dataTransaction >/dev/null 2>&1
test -d $installdir/data1/systemFiles/dataTransaction/archive || rmdir $installdir/data1/systemFiles/dataTransaction/archive >/dev/null 2>&1
chmod 1755 $installdir/data1 >/dev/null 2>&1
chmod -R 1755 $installdir/data1/systemFiles >/dev/null 2>&1
chmod 1755 $installdir/etc > /dev/null 2>&1
#create the bulk-load dirs
mkdir -p $installdir/data/bulk/data/import >/dev/null 2>&1
mkdir -p $installdir/data/bulk/log >/dev/null 2>&1
mkdir -p $installdir/data/bulk/job >/dev/null 2>&1
mkdir -p $installdir/data/bulk/rollback >/dev/null 2>&1
mkdir -p $installdir/data/bulk/tmpjob >/dev/null 2>&1
rm -f $installdir/data/bulk/tmpjob/* >/dev/null 2>&1
chmod -R 755 $installdir/data/bulk >/dev/null 2>&1
#create infinidb temp file directory
mkdir -p /tmp/infinidb_tmp_files >/dev/null 2>&1
#setup core file directory and link
mkdir /var/log/Calpont/corefiles > /dev/null 2>&1
chmod 755 /var/log/Calpont/corefiles > /dev/null 2>&1
#create mount directories
mkdir /mnt/tmp > /dev/null 2>&1
mkdir /var/log/Calpont/data/archive > /dev/null 2>&1
# install Calpont Log Rotate File
test -d $installdir/mysql/db || mkdir -p $installdir/mysql/db
cp $installdir/bin/columnstoreLogRotate /etc/logrotate.d/columnstore > /dev/null 2>&1
rm -rf $installdir/mysql/db/infinidb_log_archive > /dev/null 2>&1
# delete Calpont shared memory segments
$installdir/bin/Calpont/bin/clearShm > /dev/null 2>&1
#setup the infinidb service script
rm -f /etc/init.d/infinidb >/dev/null 2>&1
cp $installdir/bin/infinidb /etc/init.d >/dev/null 2>&1
if [ -x /sbin/chkconfig ]; then
/sbin/chkconfig --add infinidb > /dev/null 2>&1
/sbin/chkconfig infinidb on > /dev/null 2>&1
elif [ -x /usr/sbin/update-rc.d ]; then
/usr/sbin/update-rc.d infinidb defaults 99 > /dev/null 2>&1
else
echo ""
echo "Package 'chkconfig' or 'update-rc.d' not installed, contact your sysadmin if you want to setup to autostart for infinidb"
fi
#setup InfiniDB system logging
if [ $user = "root" ]; then
$installdir/bin/syslogSetup.sh install > /tmp/syslog_install.log 2>&1
chmod 777 -R /dev/shm
rm -f /etc/default/infinidb
else
sudo $installdir/bin/syslogSetup.sh --installdir=$installdir install > /tmp/syslog_install.log 2>&1
sudo chown $user:$user $installdir/etc/Calpont.xml
sudo chmod 755 /var/log
sudo chmod -R 755 /var/log/Calpont
sudo chmod -R 777 /dev/shm
sudo rm -f /var/lock/subsys/mysql-Calpont
sudo rm -f /tmp/StopCalpont
sed -i -e s@/usr/local/MariaDB/Columnstore@$installdir@g $installdir/bin/infinidb.def
sudo cp $installdir/bin/infinidb.def /etc/default/infinidb
fi
#check if InfiniDB system logging was setup
cat /tmp/syslog_install.log | grep 'No System Logging' >/dev/null 2>&1
if [ $? -eq 0 ]; then
cat /tmp/syslog_install.log
fi
#setup alias commands
eval userhome=~$user
bashFile=$userhome/.bashrc
touch ${bashFile}
if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then
sed -i -e s@/usr/local/MariaDB/Columnstore@$installdir@g $installdir/bin/columnstoreAlias
fi
egrep -qs 'Calpont Database Platform Alias Commands' ${bashFile}
rc1=$?
egrep -qs 'InfiniDB Alias Commands' ${bashFile}
rc2=$?
if [ $rc1 -ne 0 -a $rc2 -ne 0 ]; then
rm -f ${bashFile}.columnstoreSave
cp ${bashFile} ${bashFile}.columnstoreSave >/dev/null 2>&1
cat $installdir/bin/columnstoreAlias >> ${bashFile}
echo " " >> ${bashFile}
fi
#check and get amazon EC2 env variables
if [ -n "$EC2_HOME" ]; then
$installdir/bin/setConfig -d Installation EC2_HOME $EC2_HOME
if [ -n "$EC2_HOME" ]; then
$installdir/bin/setConfig -d Installation JAVA_HOME $JAVA_HOME
fi
$installdir/bin/setConfig -d Installation EC2_PATH $PATH:/home/ec2/bin:/opt/aws/bin
fi
#log install message
test -f $installdir/post/functions && . $installdir/post/functions
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib $installdir/bin/cplogger -i 19 "***** InfiniDB Installed *****"
#setup hadoop
hadoop=`which hadoop 2>/dev/null`
if [ -z $hadoop ]; then
#check for non-root user
if [ $installdir != "/usr/local/MariaDB/Columnstore" -a $quiet -eq 0 ]; then
cat <<EOD
The next steps are:
export INFINIDB_INSTALL_DIR=$installdir
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib:$installdir/mysql/lib/mysql
$installdir/bin/postConfigure -i $installdir
EOD
else
cat <<EOD
The next step is:
$installdir/bin/postConfigure
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 > /tmp/hdfs-20-test.log 2>&1
if [ $? -eq 0 ]; then
#Passed set in config file
$installdir/bin/setConfig -d SystemConfig DataFilePlugin $installdir/lib/hdfs-20.so
$installdir/bin/setConfig -d SystemConfig DataFileEnvFile setenv-hdfs-20
#check for non-root user
if [ $installdir != "/usr/local/MariaDB/Columnstore" -a $quiet -eq 0 ]; then
cat <<EOD
If you are intending to install InfiniDB over Hadoop, the next steps are:
export INFINIDB_INSTALL_DIR=$installdir
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib:$installdir/mysql/lib/mysql
. $installdir/bin/setenv-hdfs-20
$installdir/bin/postConfigure -i $installdir
If you are intending to install InfiniDB without Hadoop, the next steps are:
export INFINIDB_INSTALL_DIR=$installdir
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib:$installdir/mysql/lib/mysql
$installdir/bin/postConfigure -i $installdir
EOD
else
cat <<EOD
If you are intending to install InfiniDB over Hadoop, the next steps are:
. $installdir/bin/setenv-hdfs-20
$installdir/bin/postConfigure
If you are intending to install InfiniDB without Hadoop, the next step is:
$installdir/bin/postConfigure
EOD
fi
else
. $installdir/bin/setenv-hdfs-12
$installdir/bin/hdfsCheck $installdir/lib/hdfs-12.so > /tmp/hdfs-12-test.log 2>&1
if [ $? -eq 0 ]; then
#Passed set in config file
$installdir/bin/setConfig -d SystemConfig DataFilePlugin $installdir/lib/hdfs-12.so
$installdir/bin/setConfig -d SystemConfig DataFileEnvFile setenv-hdfs-12
if [ $installdir != "/usr/local/MariaDB/Columnstore" -a $quiet -eq 0 ]; then
cat <<EOD
If you are intending to install InfiniDB over Hadoop, the next steps are:
export INFINIDB_INSTALL_DIR=$installdir
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib:$installdir/mysql/lib/mysql:$libpath
. $installdir/bin/setenv-hdfs-12
$installdir/bin/postConfigure -i $installdir
If you are intending to install InfiniDB without Hadoop, the next steps are:
export INFINIDB_INSTALL_DIR=$installdir
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib:$installdir/mysql/lib/mysql
$installdir/bin/postConfigure -i $installdir
EOD
else
cat <<EOD
If you are intending to install InfiniDB over Hadoop, the next steps are:
. $installdir/bin/setenv-hdfs-12
$installdir/bin/postConfigure
If you are intending to install InfiniDB without Hadoop, the next step is:
$installdir/bin/postConfigure
EOD
fi
else
cat <<EOD
If you are intending to install InfiniDB 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 InfiniDB Customer Support.
EOD
fi
fi
fi
exit 0

View File

@ -1,124 +0,0 @@
#!/bin/bash
#
# $Id: post-mysql-install 3661 2013-06-25 22:04:33Z dhill $
#
# Post-install steps for calpont-mysql install
# check log for error
checkForError() {
# check for password error
grep "ERROR 1045" /tmp/mysql_install.log > /tmp/error.check
if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then
password=`$installdir/bin/getMySQLpw`
if [ $? -ne 0 ]; then
echo "MySQL Password missing or incorrect"
rm -f /tmp/error.check
$installdir/mysql/mysql-Calpont stop
sleep 2
exit 2;
fi
rm -f /tmp/error.check
return 1;
fi
rm -f /tmp/error.check
#---------------------------------------------------------------------------
# See if engine infinidb exist
#---------------------------------------------------------------------------
echo "checking for engine infinidb..."
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
--execute='show engines;' \
calpontsys | grep -i infinidb
#
# Add compressiontype column to SYSCOLUMN if applicable
#
if [ $? -ne 0 ]; then
echo "infinidb doesn't exist"
return 1
fi
echo "infinidb exist"
return 0;
}
prefix=/usr/local
installdir=$prefix/MariaDB/Columnstore
rpmmode=install
password=
for arg in "$@"; do
if [ $(expr -- "$arg" : '--prefix=') -eq 9 ]; then
prefix="$(echo $arg | awk -F= '{print $2}')"
installdir=$prefix/MariaDB/Columnstore
elif [ $(expr -- "$arg" : '--rpmmode=') -eq 10 ]; then
rpmmode="$(echo $arg | awk -F= '{print $2}')"
elif [ $(expr -- "$arg" : '--password=') -eq 11 ]; then
password="$(echo $arg | awk -F= '{print $2}')"
elif [ $(expr -- "$arg" : '--installdir=') -eq 13 ]; then
installdir="$(echo $arg | awk -F= '{print $2}')"
prefix=$(dirname $installdir)
else
echo "ignoring unknown argument: $arg" 1>&2
fi
done
if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then
export INFINIDB_INSTALL_DIR=$installdir
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFINIDB_INSTALL_DIR/lib:$INFINIDB_INSTALL_DIR/mysql/lib/mysql
fi
if [ -f $installdir/lib/libcalmysql.so.1.0.0 ]; then
libcalmysql=$installdir/lib/libcalmysql.so.1.0.0
libudfsdk=$installdir/lib/libudf_mysql.so.1.0.0
elif [ -f $installdir/lib/libcalmysql.so.1 ]; then
libcalmysql=$installdir/lib/libcalmysql.so.1
libudfsdk=$installdir/lib/libudf_mysql.so.1
else
libcalmysql=
fi
if [ -d $installdir/mysql/lib64/mysql/plugin -a -n "$libcalmysql" ]; then
cd $installdir/mysql/lib64/mysql/plugin
ln -sf $libcalmysql libcalmysql.so
ln -sf $libcalmysql libcalmysqlent.so
ln -sf $libudfsdk libudf_mysql.so
fi
if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then
sed -i -e s@/usr/local/MariaDB/Columnstore@$installdir@g $installdir/mysql/my.cnf
fi
if [ -x $installdir/mysql/mysql-Calpont ]; then
# Restart in the same way that mysqld will be started normally.
$installdir/mysql/mysql-Calpont stop >/dev/null 2>&1
sleep 2
$installdir/mysql/mysql-Calpont start
sleep 5
# Install various Calpont stuff...
$installdir/mysql/install_calpont_mysql.sh --password=$password --installdir=$installdir
checkForError
if [ $? -ne 0 ]; then
# retry
$installdir/mysql/install_calpont_mysql.sh --password=$password --installdir=$installdir
checkForError
if [ $? -ne 0 ]; then
echo "ERROR: missing or invalid password, or InfiniDB plugin install missing"
$installdir/mysql/mysql-Calpont stop
sleep 2
exit 1;
fi
fi
$installdir/mysql/mysql-Calpont stop
fi
exit 0

View File

@ -1,107 +0,0 @@
#!/bin/bash
#
# $Id: post-mysqld-install 3661 2013-06-25 22:04:33Z dhill $
#
# Post-install steps for infinidb-mysql install
prefix=/usr/local
installdir=$prefix/MariaDB/Columnstore
rpmmode=install
user=mysql
if [ $EUID -ne 0 ]; then
user=$USER
fi
for arg in "$@"; do
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
prefix="`echo $arg | awk -F= '{print $2}'`"
installdir=$prefix/MariaDB/Columnstore
elif [ `expr -- "$arg" : '--rpmmode='` -eq 10 ]; then
rpmmode="`echo $arg | awk -F= '{print $2}'`"
elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then
installdir="`echo $arg | awk -F= '{print $2}'`"
prefix=`dirname $installdir`
elif [ `expr -- "$arg" : '--user='` -eq 7 ]; then
user="`echo $arg | awk -F= '{print $2}'`"
else
echo "post-mysqld-install: ignoring unknown argument: $arg" 1>&2
fi
done
cd $installdir/mysql/lib64
for file in libmysqlclient libmysqlclient_r; do
ln -sf $file.so.18.0.0 $file.so
ln -sf $file.so.18.0.0 $file.so.18
done
cd $installdir/mysql/lib64/mysql/plugin
for file in ha_archive ha_blackhole ha_federated ha_innodb; do
ln -sf $file.so $file.so.0
done
### taken from MySQL-server-5.1.30-0.glibc23.i386.rpm
mysql_datadir=$installdir/mysql/db
# Create data directory if needed
if test ! -d $mysql_datadir; then mkdir -m 755 $mysql_datadir; fi
if test ! -d $mysql_datadir/mysql; then mkdir $mysql_datadir/mysql; fi
if test ! -d $mysql_datadir/test; then mkdir $mysql_datadir/test; fi
if test ! -d $installdir/mysql/lib; then mkdir $installdir/mysql/lib; fi
if test ! -d $installdir/mysql/lib/mysql; then mkdir $installdir/mysql/lib/mysql; fi
# Create a MySQL user and group. Do not report any problems if it already
# exists.
groupadd -r $user 2> /dev/null || true
useradd -m -r -d $mysql_datadir -s /bin/bash -c "MySQL server" -g $user $user 2> /dev/null || true
# The user may already exist, make sure it has the proper group nevertheless (BUG#12823)
usermod -g $user $user 2> /dev/null || true
# Change permissions so that the user that will run the MySQL daemon
# owns all database files.
chown -R $user:$user $installdir/mysql
# Initiate databases if needed
if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then
sed -i -e s@/usr/local/MariaDB/Columnstore@$installdir@g $installdir/mysql/my.cnf
fi
# InfiniDB testing hook...
test -x /usr/local/bin/idb-testing-mysql-pre-start && /usr/local/bin/idb-testing-mysql-pre-start $installdir/mysql
### Don't give the user the notes, we'll fix them ourselves...
$installdir/mysql/bin/mysql_install_db --rpm --user=$user --defaults-file=$installdir/mysql/my.cnf --basedir=$installdir/mysql >/dev/null
# Change permissions again to fix any new files.
chown -R $user:$user $mysql_datadir
# Fix permissions for the permission database so that only the user
# can read them.
chmod -R og-rw $mysql_datadir/mysql
# Change permissions again to fix any new files.
chown -R $user.$user $installdir/mysql
test -e /etc/init.d/mysql-Calpont || cp $installdir/mysql/mysql-Calpont /etc/init.d >/dev/null 2>&1
if [ -f $installdir/lib/libcalmysql.so.1.0.0 ]; then
libcalmysql=$installdir/lib/libcalmysql.so.1.0.0
libudfsdk=$installdir/lib/libudf_mysql.so.1.0.0
elif [ -f $installdir/lib/libcalmysql.so.1 ]; then
libcalmysql=$installdir/lib/libcalmysql.so.1
libudfsdk=$installdir/lib/libudf_mysql.so.1
else
libcalmysql=
fi
if [ -n "$libcalmysql" ]; then
cd $installdir/mysql/lib64/mysql/plugin
ln -sf $libcalmysql libcalmysql.so
ln -sf $libcalmysql libcalmysqlent.so
ln -sf $libudfsdk libudf_mysql.so
fi
# cleanup previous install mysql replication files
rm -rf $mysql_datadir/*relay*
rm -rf $mysql_datadir/mysql-bin.*
rm -rf $mysql_datadir/master.info
exit 0

View File

@ -1,156 +0,0 @@
#!/bin/bash
#
# $Id: post-uninstall 421 2007-04-05 15:46:55Z dhill $
#
# Post-uninstall steps for columnstore install
prefix=/usr/local
installdir=$prefix/MariaDB/Columnstore
rpmmode=install
user=$USER
sudo=sudo
if [ -z "$user" ]; then
user=root
sudo=" "
fi
quiet=0
for arg in "$@"; do
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
prefix="`echo $arg | awk -F= '{print $2}'`"
installdir=$prefix/MariaDB/Columnstore
elif [ `expr -- "$arg" : '--rpmmode='` -eq 10 ]; then
rpmmode="`echo $arg | awk -F= '{print $2}'`"
elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then
installdir="`echo $arg | awk -F= '{print $2}'`"
prefix=`dirname $installdir`
elif [ `expr -- "$arg" : '--user='` -eq 7 ]; then
user="`echo $arg | awk -F= '{print $2}'`"
elif [ `expr -- "$arg" : '--quiet'` -eq 7 ]; then
quiet=1
else
echo "post-uninstall: ignoring unknown argument: $arg" 1>&2
fi
done
#stop services
$installdir/bin/infinidb stop > /dev/null 2>&1
if test -f /etc/init.d/columnstore-Mysql ; then
$installdir/myql/columnstore-Mysql stop > /dev/null 2>&1
fi
if [ $installdir == "/usr/local/MariaDB/Columnstore" ]; then
# remove library config file
rm -f /etc/ld.so.conf.d/infinidb.conf
rm -f /etc/ld.so.cache
ldconfig
fi
# uninstall OS scripts updated by postConfigure
if test -f /root/.bashrc.columnstoreSave ; then
$sudo mv -f /root/.bashrc.columnstoreSave /root/.bashrc > /dev/null 2>&1
fi
if test -f /etc/exports.columnstoreSave ; then
$sudo mv -f /etc/exports.columnstoreSave /etc/exports > /dev/null 2>&1
else
$sudo rm -f /etc/exports > /dev/null 2>&1
fi
if test -f /etc/rc.d/rc.local.columnstoreSave ; then
$sudo mv -f /etc/rc.d/rc.local.columnstoreSave /etc/rc.d/rc.local > /dev/null 2>&1
fi
if test -f /etc/rc.local.columnstoreSave ; then
$sudo mv -f /etc/rc.local.columnstoreSave /etc/rc.local > /dev/null 2>&1
fi
export INFINIDB_INSTALL_DIR=$installdir
cloud=`$INFINIDB_INSTALL_DIR/bin/getConfig Installation Cloud`
if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then
if test -f /etc/fstab ; then
$sudo sed -i '/Calpont\/data/d' /etc/fstab > /dev/null 2>&1
fi
fi
#remove log file directories
#rm -rf /var/log/Calpont > /dev/null 2>&1
#rm -f $installdir/mysql/db/*.err > /dev/null 2>&1
rm -f /var/log/Calpont/activeAlarms > /dev/null 2>&1
rm -f /var/log/Calpont/*.log1 > /dev/null 2>&1
rm -rf $installdir/mysql/db/infinidb_log_archive > /dev/null 2>&1
sudo rm -f /etc/default/infinidb
# remove Calpont Log Rotate File abd Transaction Log File
rm -f /etc/logrotate.d/columnstore > /dev/null 2>&1
rm -f /etc/cron.d/transactionLog > /dev/null 2>&1
# delete Calpont shared memory segments
pkill -9 ProcMon
$installdir/bin/clearShm > /dev/null 2>&1
# delete prat files
rm -f /etc/cron.d/ps > /dev/null 2>&1
rm -f /etc/pscollect > /dev/null 2>&1
/etc/init.d/crond reload > /dev/null 2>&1
systemctl reload crond.service > /dev/null 2>&1
# delete tmp files
rm -f $installdir/local/*.columnstore
rm -rf $installdir/local/etc/
rm -rf /tmp/bucketreuse
rm -f /tmp/columnstore.txt
rm -f /tmp/dbbuilder.*
rm -f /tmp/dbrmfiles
rm -f /var/lock/subsys/infinidb
rm -f /tmp/pkgcheck
rm -f /tmp/upgrade-status.log.*
rm -f /tmp/mount.log
rm -f $installdir/data/bulk/tmpjob/* >/dev/null 2>&1
rm -rf /tmp/infinidb_tmp_files
rm -f $installdir/local/moveDbrootTransactionLog
#delete any old setenv files under home directory
if [ $user = "root" ]; then
rm -f /root/setenv-hdfs*
else
rm -f /home/$user/setenv-hdfs*
fi
# delete core files
#rm -f /var/log/Calpont/corefiles/* > /dev/null 2>&1
#uninstall InfiniDB system logging
if [ -x $installdir/bin/syslogSetup.sh ]; then
if [ $user = "root" ]; then
$installdir/bin/syslogSetup.sh uninstall >/dev/null 2>&1
rm -f /etc/init.d/infinidb > /dev/null 2>&1
else
sudo $installdir/bin/syslogSetup.sh uninstall >/dev/null 2>&1
fi
fi
if [ -x /sbin/chkconfig ]; then
/sbin/chkconfig infinidb off > /dev/null 2>&1
/sbin/chkconfig --del infinidb > /dev/null 2>&1
elif [ -x /usr/sbin/update-rc.d ]; then
/usr/sbin/update-rc.d -f infinidb remove > /dev/null 2>&1
fi
if [ $quiet != 1 ]; then
#make copy of Calpont.xml
/bin/cp -f $installdir/etc/Calpont.xml $installdir/etc/Calpont.xml.rpmsave > /dev/null 2>&1
/bin/cp -f $installdir/mysql/my.cnf $installdir/mysql/my.cnf.rpmsave > /dev/null 2>&1
fi
#umount file systems
if [ $user = "root" ]; then
rm -f $installdir/data*/OAMdbrootCheck > /dev/null 2>&1
else
sudo rm -f $installdir/data*/OAMdbrootCheck > /dev/null 2>&1
fi
#tell user to run post configure script
echo " "
echo "Calpont uninstall completed"
exit 0

View File

@ -1,70 +0,0 @@
#!/usr/bin/expect
#
# $Id: remote_command.sh 3495 2012-12-17 22:51:40Z dhill $
#
# Remote command execution script to another server
# Argument 1 - Remote Server Host Name or IP address
# Argument 2 - Remote Server password
# Argument 3 - Command
# Argument 4 - debug flag
# Argument 5 - Remote user name (optional)
# Argument 6 - Force a tty to be allocated (optional)
set stty_init {cols 512 -opost};
set timeout 30
set SERVER [lindex $argv 0]
set PASSWORD [lindex $argv 1]
set COMMAND [lindex $argv 2]
set DEBUG [lindex $argv 3]
if {[info exists env(USER)]} {
set USERNAME $env(USER)
} else {
set USERNAME "root"
}
set UNM [lindex $argv 4]
if { $UNM != "" && $UNM != "-" } {
set USERNAME "$UNM"
}
set TTY ""
set TTYOPT [lindex $argv 5]
if { $TTYOPT != "" } {
set TTY "-t"
}
log_user $DEBUG
spawn -noecho /bin/bash
expect -re {[$#] }
if { $PASSWORD == "ssh" } {
set PASSWORD ""
}
#
# send command
#
send "ssh $TTY $USERNAME@$SERVER $COMMAND\n"
expect {
"Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit 1}
"service not known" { send_user " FAILED: Invalid Host\n" ; exit 1}
"ssh: connect to host" { send_user " FAILED: Invalid Host\n" ; exit 1 }
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
"authenticity" { send "yes\n"
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
}
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
-re {[$#] } { exit 0 }
}
expect {
-re {[$#] } { exit 0 }
"Permission denied" { send_user " FAILED: Invalid password\n" ; exit 1 }
"(y or n)" { send "y\n"
expect -re {[$#] } { exit 0 }
}
}
exit 0

View File

@ -1,53 +0,0 @@
#!/usr/bin/expect
#
# $Id: remote_commend.sh 421 2007-04-05 15:46:55Z dhill $
#
# Remote command execution script to another server
# Argument 1 - Remote Server Host Name or IP address
# Argument 2 - Remote Server root password
# Argument 3 - Command
# Argument 4 - Good Response
# Argument 5 - Bad Response
# Argument 6 - timeout
# Argument 7 - Debug flag
set timeout 30
set SERVER [lindex $argv 0]
set USERNAME [lindex $argv 1]
set PASSWORD [lindex $argv 2]
set COMMAND [lindex $argv 3]
set GOOD_RESPONSE [lindex $argv 4]
set BAD_RESPONSE [lindex $argv 5]
set timeout [lindex $argv 6]
set DEBUG [lindex $argv 7]
log_user $DEBUG
spawn -noecho /bin/bash
expect -re {[$#] }
#
# send command
#
send "ssh $USERNAME@$SERVER '$COMMAND'\n"
expect {
-re "authenticity" { send "yes\n"
expect {
timeout { send_user "TIMEOUT\n" ; exit 2 }
-re "word: " { send "$PASSWORD\n" } abort
}
}
timeout { send_user "TIMEOUT\n" ; exit 2 }
-re "service not known" { send_user "FAILED: Invalid Host\n" ; exit 1 }
-re "Permission denied" { send_user "FAILED: Invalid Password\n" ; exit 1 }
-re "word: " { send "$PASSWORD\n" } abort
-re $GOOD_RESPONSE { send_user " " ; exit 0 }
-re $BAD_RESPONSE { send_user "FAILED\n" ; exit 1 }
-re "parser error" { send_user "FAILED: System Calpont.xml parse error\n" ; exit 1 }
}
expect {
timeout { send_user "FAILED-TIMEOUT\n" ; exit 1 }
-re $GOOD_RESPONSE { send_user " " ; exit 0 }
-re $BAD_RESPONSE { send_user "FAILED\n" ; exit 1 }
-re "No such file" { send_user "FAILED\n" ; exit 1 }
-re "parser error" { send_user "FAILED: System Calpont.xml parse error\n" ; exit 1 }
}
exit 1

View File

@ -1,53 +0,0 @@
#!/usr/bin/expect
#
# $Id: remote_commend.sh 421 2007-04-05 15:46:55Z dhill $
#
# Remote command execution script to another server
# Argument 1 - Remote Server Host Name or IP address
# Argument 2 - Remote Server root password
# Argument 3 - Command
set timeout 30
set USERNAME $env(USER)"@"
set SERVER [lindex $argv 0]
set PASSWORD [lindex $argv 1]
set FILE [lindex $argv 2]
set DEBUG [lindex $argv 3]
log_user $DEBUG
spawn -noecho /bin/bash
if { $PASSWORD == "ssh" } {
set PASSWORD ""
}
#
# send command
#
expect -re {[$#] }
send "scp $USERNAME$SERVER:$FILE .\n"
expect {
"authenticity" { send "yes\n"
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
}
"service not known" { send_user "FAILED: Invalid Host\n" ; exit 1 }
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
"Connection timed out" { send_user "FAILED: Connection timed out\n" ; exit 1 }
"lost connection" { send_user "FAILED: Connection refused\n" ; exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
expect {
"100%" { send_user "DONE\n" }
"scp:" { send_user "FAILED\n" ; exit 1 }
"Permission denied" { send_user "FAILED: Invalid password\n" ; exit 1 }
"No such file or directory" { send_user "FAILED: No such file or directory\n" ; exit 1 }
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
}
#sleep to make sure it's finished
sleep 5
exit 0

View File

@ -1,54 +0,0 @@
#!/usr/bin/expect
#
# $Id: remote_commend.sh 421 2007-04-05 15:46:55Z dhill $
#
# Remote command execution script to another server
# Argument 1 - Remote Server Host Name or IP address
# Argument 2 - Remote Server root password
# Argument 3 - Command
set timeout 30
set USERNAME $env(USER)"@"
set SERVER [lindex $argv 0]
set PASSWORD [lindex $argv 1]
set FILE [lindex $argv 2]
set DEBUG [lindex $argv 3]
log_user $DEBUG
spawn -noecho /bin/bash
if { $PASSWORD == "ssh" } {
set PASSWORD ""
}
#
# send command
#
expect -re "# "
send "scp $FILE $USERNAME$SERVER:$FILE\n"
expect {
-re "authenticity" { send "yes\n"
expect {
-re "word: " { send "$PASSWORD\n" }
-re "passphrase" { send "$PASSWORD\n" }
}
}
-re "service not known" { send_user "FAILED: Invalid Host\n" ; exit 1 }
-re "Connection refused" { send_user "FAILED: Connection refused\n" ; exit 1 }
-re "Connection timed out" { send_user "FAILED: Connection timed out\n" ; exit 1 }
-re "lost connection" { send_user "FAILED: Connection refused\n" ; exit 1 }
-re "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
-re "word: " { send "$PASSWORD\n" }
-re "passphrase" { send "$PASSWORD\n" }
-re "WARNING:" { send "rm -f /root/.ssh/known_hosts" ; exit 1 }
}
expect {
-re "100%" { send_user "DONE\n" }
-re "scp:" { send_user "FAILED\n" ; exit 1 }
-re "Permission denied" { send_user "FAILED: Invalid password\n" ; exit 1 }
-re "No such file or directory" { send_user "FAILED: Invalid file\n" ; exit 1 }
-re "Connection refused" { send_user "FAILED: Connection refused\n" ; exit 1 }
-re "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
}
#sleep to make sure it's finished
sleep 5
exit 0

View File

@ -1,89 +0,0 @@
set PROMPT "(\\$|#) "
proc auto_ssh_command { username password server commandstr } {
global PROMPT
#
# send command
#
send "ssh -t $username@$server $commandstr\n"
expect {
-re "Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit 1}
-re "service not known" { send_user " FAILED: Invalid Host\n" ; exit 1}
-re "ssh: connect to host" { send_user " FAILED: Invalid Host\n" ; exit 1 }
-re "Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
-re "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
-re "authenticity" { send "yes\n"
expect {
-re "word: " { send "$password\n" } abort
-re "passphrase" { send "$password\n" } abort
}
}
-re "word: " { send "$password\n" } abort
-re "passphrase" { send "$password\n" } abort
}
set needsudopwd 0
expect {
-re $PROMPT { exit 0 }
-re "Permission denied, please try again" { send_user " FAILED: Invalid password\n" ; exit 1 }
-re ": Permission denied" { send_user " FAILED: Privilege error\n" ; exit 1 }
-re "(y or n)" { send "y\n"
expect -re $PROMPT { exit 0 }
}
-re "sudo\\] password for $username: " {
send "$password\n";
set needsudopwd 1
} abort
}
if {$needsudopwd} {
expect {
-re $PROMPT { exit 0 }
-re "try again" { send_user " FAILED: Invalid sudo password\n" ; exit 1 }
}
}
}
proc auto_scp_command { username password server srcpath destpath } {
global PROMPT
send "scp $srcpath $username@$server:$destpath\n"
expect {
-re "Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit 1}
-re "service not known" { send_user " FAILED: Invalid Host\n" ; exit 1}
-re "ssh: connect to host" { send_user " FAILED: Invalid Host\n" ; exit 1 }
-re "Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
-re "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
-re "authenticity" { send "yes\n"
expect {
-re "word: " { send "$password\n" } abort
-re "passphrase" { send "$password\n" } abort
}
}
-re "word: " { send "$password\n" } abort
-re "passphrase" { send "$password\n" } abort
}
expect {
-re $PROMPT { exit 0 }
-re "Permission denied, please try again" { send_user " FAILED: Invalid password\n" ; exit 1 }
-re ": Permission denied" { send_user " FAILED: Privilege error\n" ; exit 1 }
-re "(y or n)" { send "y\n"
expect -re $PROMPT { exit 0 }
}
}
set timeout 30
expect {
-re "100%" { send_user "DONE" } abort
-re "directory" { send_user "ERROR\n" ;
send_user "\n*** Installation ERROR\n" ;
exit 1 }
-re "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
-re "No such file or directory" { send_user "ERROR: Invalid package\n" ; exit 1 }
}
send_user "\n"
# sleep to make sure it's finished
sleep 5
}

View File

@ -1,54 +0,0 @@
#!/usr/bin/expect
#
# $Id: rsync.sh 2915 2012-05-23 16:01:34Z dhill $
#
# Remote Install RPM and custom OS files from postConfigure script
# Argument 1 - Remote Server Host Name or IP address
# Argument 2 - Root Password of remote server
# Argument 3 - Debug flag 1 for on, 0 for off
set USERNAME "root@"
set SERVER [lindex $argv 0]
set PASSWORD [lindex $argv 1]
set INSTALLDIR [lindex $argv 2]
set DEBUG 0
set DEBUG [lindex $argv 3]
log_user $DEBUG
spawn -noecho /bin/bash
if { $PASSWORD == "ssh" } {
set USERNAME ""
set PASSWORD ""
}
set COMMAND "rsync -vopgr -e ssh --exclude=mysql/ --exclude=test/ --exclude=infinidb_vtable/ --exclude=infinidb_querystats/ --exclude=calpontsys/ --include=*/ --include=*/* --exclude=* $INSTALLDIR/mysql/db/ $USERNAME$SERVER:$INSTALLDIR/mysql/db/"
#
# run command
#
set timeout 60
send "$COMMAND\n"
expect {
-re "Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit -1}
-re "service not known" { send_user " FAILED: Invalid Host\n" ; exit -1}
-re "ssh: connect to host" { send_user " FAILED: Invalid Host\n" ; exit -1 }
-re "authenticity" { send "yes\n"
expect {
-re "word: " { send "$PASSWORD\n" }
-re "passphrase" { send "$PASSWORD\n" }
}
}
-re "word: " { send "$PASSWORD\n" }
-re "passphrase" { send "$PASSWORD\n" }
-re "failed" { send_user " FAILED: Failure, check tmp log\n" ; exit 1 }
-re "Permission denied" { send_user " FAILED: Invalid password\n" ; exit 1 }
-re "total size" { exit 0 }
}
expect {
-re "failed" { send_user " FAILED: Failure, check tmp log\n" ; exit 1 }
-re "Permission denied" { send_user " FAILED: Invalid password\n" ; exit 1 }
-re "total size" { exit 0 }
}
}
exit 0

View File

@ -1,67 +0,0 @@
#!/bin/bash
#
# $Id$
#
usage="usage: run.sh [-vh] [-s sleep] [-t tries] executable"
vflg=0
sopt="5"
topt="0"
while getopts "vs:t:h" flag; do
case $flag in
v) vflg=1
;;
s) sopt=$OPTARG
;;
t) topt=$OPTARG
;;
h) echo $usage
exit 0
;;
\? | *) echo $usage 1>&2
exit 1
;;
esac
done
shift $((OPTIND - 1))
exename="$1"
if [ -z "$exename" ]; then
echo $usage 1>&2
exit 1
fi
shift
args="$@"
retries=1
keep_going=1
if [ $vflg -gt 0 ]; then
echo "starting $exename $args with sleep=$sopt and tries=$topt"
fi
while [ $keep_going -ne 0 ]; do
$exename $args
if [ -e /tmp/StopCalpont ]; then
exit 0
fi
if [ $topt -gt 0 -a $retries -ge $topt ]; then
keep_going=0
fi
((retries++))
if [ $keep_going -ne 0 -a $sopt -gt 0 ]; then
sleep $sopt
fi
done
if [ $vflg -gt 0 ]; then
echo "$exename exceeded its try count, quiting!" 1>&2
fi
exit 1

View File

@ -1,119 +0,0 @@
#!/bin/bash
#
# $Id$
#
# generic InfiniDB Slave Replication script.
#
# Notes: This script gets run by ProcMon during installs and upgrades:
# check log for error
checkForError() {
grep ERROR /tmp/slave-rep-status.log > /tmp/error.check
if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then
echo "ERROR: check log file: /tmp/slave-rep-status.log"
rm -f /tmp/error.check
exit 1
fi
rm -f /tmp/error.check
}
prefix=/usr/local
installdir=$prefix/MariaDB/Columnstore
pwprompt=
for arg in "$@"; do
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
prefix="`echo $arg | awk -F= '{print $2}'`"
installdir=$prefix/MariaDB/Columnstore
elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then
password="`echo $arg | awk -F= '{print $2}'`"
pwprompt="--password=$password"
elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then
installdir="`echo $arg | awk -F= '{print $2}'`"
prefix=`dirname $installdir`
elif [ `expr -- "$arg" : '--masteripaddr='` -eq 15 ]; then
masteripaddr="`echo $arg | awk -F= '{print $2}'`"
elif [ `expr -- "$arg" : '--masterlogfile='` -eq 16 ]; then
masterlogfile="`echo $arg | awk -F= '{print $2}'`"
elif [ `expr -- "$arg" : '--masterlogpos='` -eq 15 ]; then
masterlogpos="`echo $arg | awk -F= '{print $2}'`"
elif [ `expr -- "$arg" : '--port='` -eq 7 ]; then
port="`echo $arg | awk -F= '{print $2}'`"
fi
done
test -f $installdir/post/functions && . $installdir/post/functions
repUser="idbrep"
password="Calpont1"
>/tmp/slave-rep-status.log
#
# Run stop slave command
#
echo "Run stop slave command" >>/tmp/slave-rep-status.log
cat >/tmp/idb_slave-rep.sql <<EOD
stop slave;
EOD
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
#
# Run Change Master Command
#
echo "Run Change Master Command" >>/tmp/slave-rep-status.log
cat >/tmp/idb_slave-rep.sql <<EOD
CHANGE MASTER TO
MASTER_HOST='$masteripaddr',
MASTER_USER='$repUser',
MASTER_PASSWORD='$password',
MASTER_PORT=$port,
MASTER_LOG_FILE='$masterlogfile',
MASTER_LOG_POS=$masterlogpos;
MASTER_USE_GTID=$masterlogpos;
EOD
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
#
# Run start slave command
#
echo "Run start slave command" >>/tmp/slave-rep-status.log
cat >/tmp/idb_slave-rep.sql <<EOD
start slave;
EOD
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
#
# Run SHOW SLAVE STATUS
#
echo "Run SHOW SLAVE STATUS to node log" >>/tmp/slave-rep-status.log
cat >/tmp/idb_slave-rep.sql <<EOD
SHOW SLAVE STATUS\G
EOD
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
checkForError
#alls good, 'OK' for success
echo "OK"
exit 0

View File

@ -1,119 +0,0 @@
#!/bin/bash
#
# $Id$
#
# generic InfiniDB Slave Replication script.
#
# Notes: This script gets run by ProcMon during installs and upgrades:
# check log for error
checkForError() {
grep ERROR /tmp/slave-rep-status.log > /tmp/error.check
if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then
echo "ERROR: check log file: /tmp/slave-rep-status.log"
rm -f /tmp/error.check
exit 1
fi
rm -f /tmp/error.check
}
prefix=/usr/local
installdir=$prefix/MariaDB/Columnstore
pwprompt=
for arg in "$@"; do
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
prefix="`echo $arg | awk -F= '{print $2}'`"
installdir=$prefix/MariaDB/Columnstore
elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then
password="`echo $arg | awk -F= '{print $2}'`"
pwprompt="--password=$password"
elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then
installdir="`echo $arg | awk -F= '{print $2}'`"
prefix=`dirname $installdir`
elif [ `expr -- "$arg" : '--masteripaddr='` -eq 15 ]; then
masteripaddr="`echo $arg | awk -F= '{print $2}'`"
elif [ `expr -- "$arg" : '--masterlogfile='` -eq 16 ]; then
masterlogfile="`echo $arg | awk -F= '{print $2}'`"
elif [ `expr -- "$arg" : '--masterlogpos='` -eq 15 ]; then
masterlogpos="`echo $arg | awk -F= '{print $2}'`"
elif [ `expr -- "$arg" : '--port='` -eq 7 ]; then
port="`echo $arg | awk -F= '{print $2}'`"
fi
done
test -f $installdir/post/functions && . $installdir/post/functions
repUser="idbrep"
password="Calpont1"
>/tmp/slave-rep-status.log
#
# Run stop slave command
#
echo "Run stop slave command" >>/tmp/slave-rep-status.log
cat >/tmp/idb_slave-rep.sql <<EOD
stop slave;
EOD
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
#
# Run Change Master Command
#
echo "Run Change Master Command" >>/tmp/slave-rep-status.log
cat >/tmp/idb_slave-rep.sql <<EOD
CHANGE MASTER TO
MASTER_HOST='$masteripaddr',
MASTER_USER='$repUser',
MASTER_PASSWORD='$password',
MASTER_PORT=$port,
MASTER_LOG_FILE='$masterlogfile',
MASTER_LOG_POS=$masterlogpos;
MASTER_USE_GTID=$masterlogpos;
EOD
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
#
# Run start slave command
#
echo "Run start slave command" >>/tmp/slave-rep-status.log
cat >/tmp/idb_slave-rep.sql <<EOD
start slave;
EOD
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
#
# Run SHOW SLAVE STATUS
#
echo "Run SHOW SLAVE STATUS to node log" >>/tmp/slave-rep-status.log
cat >/tmp/idb_slave-rep.sql <<EOD
SHOW SLAVE STATUS\G
EOD
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
checkForError
#alls good, 'OK' for success
echo "OK"
exit 0

View File

@ -1,36 +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
if [ -z "$INFINIDB_INSTALL_DIR" ]; then
test -f /etc/default/infinidb && . /etc/default/infinidb
fi
if [ -z "$INFINIDB_INSTALL_DIR" ]; then
INFINIDB_INSTALL_DIR=/usr/local/MariaDB/Columnstore
fi
export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR
test -f $INFINIDB_INSTALL_DIR/post/functions && . $INFINIDB_INSTALL_DIR/post/functions
for testScript in $INFINIDB_INSTALL_DIR/post/*.sh; do
if [ -x $testScript ]; then
eval $testScript
rc=$?
if [ $rc -ne 0 ]; then
cplogger -c 51 $testScript
echo "FAILED, check Critical log for additional info"
exit $rc
fi
fi
done
echo "OK"
cplogger -i 54
exit 0

View File

@ -1,262 +0,0 @@
#!/bin/bash
#
# $Id: syslogSetup.sh 421 2007-04-05 15:46:55Z dhill $
#
# syslogSetup.sh - install / uninstall Calpont InfiniDB system logging configuration
# no point in going any further if not root... (only works in bash)
test $EUID -eq 0 || exit 0
prefix=/usr/local
installdir=$prefix/MariaDB/Columnstore
syslog_conf=nofile
rsyslog7=0
for arg in "$@"; do
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
prefix="`echo $arg | awk -F= '{print $2}'`"
installdir=$prefix/MariaDB/Columnstore
elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then
installdir="`echo $arg | awk -F= '{print $2}'`"
prefix=`dirname $installdir`
elif [ `expr -- "$arg" : '--..*'` -ge 3 ]; then
echo "ignoring unknown argument: $arg" 1>&2
elif [ `expr -- "$arg" : '--'` -eq 2 ]; then
shift
break
else
break
fi
shift
done
if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then
export INFINIDB_INSTALL_DIR=$installdir
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFINIDB_INSTALL_DIR/lib
fi
columnstoreSyslogFile=$installdir/bin/columnstoreSyslog
columnstoreSyslogFile7=$installdir/bin/columnstoreSyslog7
checkSyslog() {
#check which syslog daemon is being used
#first check which is running
daemon="nodaemon"
cnt=`ps -ef | grep -v grep | grep syslog-ng | wc -l`
if [ $cnt -gt 0 ]; then
daemon="syslog-ng"
else cnt=`ps -ef | grep -v grep | grep rsyslog | wc -l`
if [ $cnt -ge 1 ]; then
daemon="rsyslog"
else cnt=`ps -ef | grep -v grep | grep syslogd | wc -l`
if [ $cnt -ge 1 ]; then
if [ "$daemon" != "rsyslog" ]; then
daemon=syslog
fi
fi
fi
fi
#if none running, check installed
if [ "$daemon" = "nodaemon" ]; then
if [ -f /etc/init.d/syslog ]; then
daemon="syslog"
/etc/init.d/syslog start > /dev/null 2>&1
elif [ -f /etc/init.d/rsyslog ]; then
daemon="rsyslog"
/etc/init.d/rsyslog start > /dev/null 2>&1
elif [ -f /etc/init.d/syslog-ng ]; then
daemon="syslog-ng"
/etc/init.d/syslog-ng start > /dev/null 2>&1
fi
fi
#if none running or installed, exit
if [ "$daemon" = "nodaemon" ]; then
echo ""
echo "*** No System Logging Application found (syslog, rsyslog, or syslog-ng)"
echo "*** For InfiniDB System Logging functionality, install a System Logging package and reinstall InfiniDB"
echo ""
exit 1
fi
#check which syslog config file is installed
if [ "$daemon" = "syslog-ng" ]; then
if [ -f /etc/syslog-ng/syslog-ng.conf ]; then
syslog_conf=/etc/syslog-ng/syslog-ng.conf
columnstoreSyslogFile=$installdir/bin/columnstoreSyslog-ng
echo ""
echo "System logging being used: syslog-ng"
echo ""
fi
elif [ "$daemon" = "rsyslog" ]; then
#check if rsyslog version 7 or greater
rsyslogd -v > /tmp/rsyslog.ver
cnt=`grep "rsyslogd 7" /tmp/rsyslog.ver | wc -l`
if [ $cnt -gt 0 ]; then
rsyslog7=1
fi
cnt=`grep "rsyslogd 8" /tmp/rsyslog.ver | wc -l`
if [ $cnt -gt 0 ]; then
rsyslog7=1
fi
cnt=`grep "rsyslogd 9" /tmp/rsyslog.ver | wc -l`
if [ $cnt -gt 0 ]; then
rsyslog7=1
fi
if [ -f /etc/rsyslog.conf ]; then
cnt=`grep "/etc/rsyslog.d/" /etc/rsyslog.conf | wc -l`
if [ $cnt -gt 0 ]; then
if [ $rsyslog7 == 1 ]; then
syslog_conf=/etc/rsyslog.d/49-calpont.conf
else
syslog_conf=/etc/rsyslog.d/calpont.conf
fi
else
syslog_conf=/etc/rsyslog.conf
fi
echo ""
echo "System logging being used: rsyslog"
echo ""
fi
elif [ "$daemon" = "syslog" ]; then
if [ -f /etc/syslog.conf ]; then
syslog_conf=/etc/syslog.conf
echo ""
echo "System logging being used: syslog"
echo ""
elif [ -d /etc/syslog-ng/syslog-ng.conf ]; then
syslog_conf=/etc/syslog-ng/syslog-ng.conf
columnstoreSyslogFile=$installdir/bin/columnstoreSyslog-ng
echo ""
echo "System logging being used: syslog-ng"
echo ""
fi
else
echo ""
echo "*** No System Logging Application found (syslog, rsyslog, or syslog-ng)"
echo "*** For InfiniDB System Logging functionality, install a System Logging package and reinstall InfiniDB"
echo ""
exit 1
fi
}
install() {
checkSyslog
if [ ! -z "$syslog_conf" ] ; then
$installdir/bin/setConfig -d Installation SystemLogConfigFile ${syslog_conf} >/dev/null 2>&1
if [ "$syslog_conf" != /etc/rsyslog.d/calpont.conf ]; then
rm -f ${syslog_conf}.calpontSave
cp ${syslog_conf} ${syslog_conf}.calpontSave >/dev/null 2>&1
sed -i '/# Calpont/,$d' ${syslog_conf}.calpontSave > /dev/null 2>&1
fi
egrep -qs 'Calpont Database Platform Logging' ${syslog_conf}
if [ $? -ne 0 ]; then
#set the syslog for calpont logging
# remove older version incase it was installed by previous build
rm -rf /etc/rsyslog.d/calpont.conf
if [ $rsyslog7 == 1 ]; then
rm -f /etc/rsyslog.d/49-calpont.conf
cat ${columnstoreSyslogFile7} >> ${syslog_conf}
chown syslog:adm /var/log/Calpont
else
cat ${columnstoreSyslogFile} >> ${syslog_conf}
fi
fi
pkill -hup syslogd > /dev/null 2>&1
pkill -hup syslog-ng > /dev/null 2>&1
pkill -hup rsyslogd > /dev/null 2>&1
/etc/init.d/rsyslog restart > /dev/null 2>&1
systemctl restart rsyslog.service > /dev/null 2>&1
fi
}
uninstall() {
checkSyslog
if [ ! -z "$syslog_conf" ] ; then
if [ "$syslog_conf" != /etc/rsyslog.d/calpont.conf ]; then
if [ "$syslog_conf" != /etc/rsyslog.d/49-calpont.conf ]; then
egrep -qs 'Calpont Database Platform Logging' ${syslog_conf}
if [ $? -eq 0 ]; then
if [ -f ${syslog_conf}.calpontSave ] ; then
#uninstall the syslog for calpont logging
mv -f ${syslog_conf} ${syslog_conf}.calpontBackup
mv -f ${syslog_conf}.calpontSave ${syslog_conf} >/dev/null 2>&1
if [ ! -f ${syslog_conf} ] ; then
cp ${syslog_conf}.calpontBackup ${syslog_conf}
fi
fi
fi
sed -i '/# Calpont/,$d' ${syslog_conf} > /dev/null 2>&1
else
rm -f "$syslog_conf"
fi
else
rm -f "$syslog_conf"
fi
pkill -hup syslogd > /dev/null 2>&1
pkill -hup syslog-ng > /dev/null 2>&1
/etc/init.d/rsyslog restart > /dev/null 2>&1
systemctl restart rsyslog.service > /dev/null 2>&1
$installdir/bin/setConfig -d Installation SystemLogConfigFile "unassigned"
fi
}
status() {
checkSyslog
if [ ! -z "$syslog_conf" ] ; then
egrep -qs 'Calpont Database Platform Logging' ${syslog_conf}
if [ $? -eq 0 ]; then
echo $syslog_conf
else
echo "No System Log Config File configured for InfiniDB System Logging"
fi
fi
}
check() {
test -f $installdir/post/functions && . $installdir/post/functions
number=$RANDOM
cplogger -i 100 "InfiniDB Log Test: $number"
sleep 3
egrep -qs "InfiniDB Log Test: $number" /var/log/Calpont/info.log
if [ $? -eq 0 ]; then
echo "InfiniDB System Logging working"
exit 0
else
echo "InfiniDB System Logging not working"
exit 1
fi
}
case "$1" in
install)
install
;;
uninstall)
uninstall
;;
status)
status
;;
check)
check
;;
*)
echo $"Usage: $0 {install|uninstall|status|check)"
exit 1
esac
exit 0
/

View File

@ -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

View File

@ -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/Calpont/bin/transactionLogArchiver.sh

View File

@ -1,48 +0,0 @@
#!/bin/bash
#
# $Id: transactionLogArchiver.sh 1375 2009-04-30 13:53:06Z rdempsey $
DATE=`date +'%s'`
CDATA=/var/log/Calpont/data
if [ ! -d $CDATA/archive ]; then
echo "Installation error: $CDATA/archive is not a directory." 1>&2
exit 1
fi
if [ -f $CDATA/data_mods.log ]; then
# Don't bother rotating an empty log
if [ ! -s $CDATA/data_mods.log ]; then
exit 0
fi
cp $CDATA/data_mods.log $CDATA/archive >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "Could not copy $CDATA/data_mods.log to $CDATA/archive" 1>&2
exit 1
fi
else
# Is this a reportable/fatal error?
echo "No such file: $CDATA/data_mods.log" 1>&2
fi
rm -f $CDATA/data_mods.log >/dev/null 2>&1
touch $CDATA/data_mods.log >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "Could not create $CDATA/data_mods.log" 1>&2
exit 1
fi
chmod 666 $CDATA/data_mods.log >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "Could not set the perms on $CDATA/data_mods.log" 1>&2
exit 1
fi
pkill -HUP syslog >/dev/null 2>&1
mv $CDATA/archive/data_mods.log $CDATA/archive/data_mods.log.$DATE >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "Could not move $CDATA/archive/data_mods.log to $CDATA/archive/data_mods.log.$DATE" 1>&2
exit 1
fi

View File

@ -1,444 +0,0 @@
#!/bin/bash
#
# $Id$
#
# generic InfiniDB upgrade script.
#
# Notes: This script gets run every time InfiniDB starts up so it needs to be:
# 1) able to only do stuff once if needed and nothing if not needed
# 2) reasonably fast when there's nothing to do
# check log for error
checkForError() {
grep ERROR /tmp/upgrade-status.log.$$ > /tmp/error.check
if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then
echo "ERROR: check log file: /tmp/upgrade-status.log.$$"
rm -f /tmp/error.check
exit 1;
fi
rm -f /tmp/error.check
}
if [ "x$1" != xdoupgrade ]; then
echo "Don't run this script by hand! You probably want to use install-infinidb.sh." 1>&2
exit 1
fi
prefix=/usr/local
installdir=$prefix/MariaDB/Columnstore
pwprompt=
for arg in "$@"; do
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
prefix="`echo $arg | awk -F= '{print $2}'`"
installdir=$prefix/MariaDB/Columnstore
elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then
password="`echo $arg | awk -F= '{print $2}'`"
pwprompt="--password=$password"
elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then
installdir="`echo $arg | awk -F= '{print $2}'`"
prefix=`dirname $installdir`
fi
done
test -f $installdir/post/functions && . $installdir/post/functions
mt=`module_type`
mid=`module_id`
# for CE version
if [ -z "$mt" ]; then
mt=pm
fi
if [ -z "$mid" ]; then
mid=1
fi
has_um=`$installdir/bin/getConfig SystemModuleConfig ModuleCount2`
if [ -z "$has_um" ]; then
has_um=0
fi
>/tmp/upgrade-status.log.$$
echo "mt = $mt" >>/tmp/upgrade-status.log.$$
echo "mid = $mid" >>/tmp/upgrade-status.log.$$
echo "has_um = $has_um" >>/tmp/upgrade-status.log.$$
#This upgrade only for UM or PM with no UM
if [ $has_um -eq 0 -o "x$mt" = xum ]; then
#---------------------------------------------------------------------------
# See if compressiontype column is in SYSCOLUMN
#---------------------------------------------------------------------------
echo "checking calpontsys for compressiontype..." >>/tmp/upgrade-status.log.$$
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
--execute='describe syscolumn;' \
calpontsys | grep compressiontype >>/tmp/upgrade-status.log.$$ 2>&1
#
# Add compressiontype column to SYSCOLUMN if applicable
#
if [ $? -ne 0 ]; then
echo "calpontsys needs upgrade for compressiontype" >>/tmp/upgrade-status.log.$$
echo "added compressiontype column" >>/tmp/upgrade-status.log.$$
cat >/tmp/idb_upgrade.sql <<EOD
alter table syscolumn add compressiontype int comment 'schema sync only';
EOD
cat /tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$ 2>&1
checkForError
if [ $mid -eq 1 ]; then
echo "update compressiontype to backend" >>/tmp/upgrade-status.log.$$
cat >/tmp/idb_upgrade.sql <<EOD
select calonlinealter('alter table syscolumn add (compressiontype int)') as xxx;
update syscolumn set compressiontype=0 where compressiontype is null;
EOD
cat /tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$ 2>&1
checkForError
fi
#
# Verify that compressiontype was successfully added to SYSCOLUMN
#
rm -f /tmp/idb_upgrade.sql
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
--execute='describe syscolumn;' \
calpontsys | grep compressiontype >/tmp/upgrade-status-1.log 2>&1
rc=$?
cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$
if [ $rc -ne 0 ]; then
echo "FAILED adding compressiontype to SYSCOLUMN!"
exit 1
fi
cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'`
rm -f /tmp/upgrade-status-1.log
if [ -z "$cnt" ]; then
cnt=0
fi
if [ $cnt -ne 1 ]; then
echo "FAILED adding compressiontype to SYSCOLUMN!"
exit 1
fi
#
# Verify that compressiontype (OID 1041) was successfully added to BRM
#
if [ $has_um -eq 0 ]; then
$installdir/bin/editem -o1041 1>/tmp/upgrade-status-1.log 2>/dev/null
rc=$?
cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$
if [ $rc -ne 0 ]; then
echo "FAILED adding compressiontype to BRM!"
exit 1
fi
cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'`
rm -f /tmp/upgrade-status-1.log
if [ -z "$cnt" ]; then
cnt=0
fi
if [ $cnt -lt 2 ]; then
echo "FAILED adding compressiontype to BRM!"
exit 1
fi
fi
fi
#---------------------------------------------------------------------------
# See if autoincrement column is in SYSTABLE
#---------------------------------------------------------------------------
echo "checking calpontsys for autoincrement..." >>/tmp/upgrade-status.log.$$
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
--execute='describe systable;' \
calpontsys | grep autoincrement >>/tmp/upgrade-status.log.$$ 2>&1
#
# Add autoincrement column to SYSTABLE if applicable
#
if [ $? -ne 0 ]; then
echo "calpontsys needs upgrade for autoincrement" >>/tmp/upgrade-status.log.$$
echo "add autoincrement columns" >>/tmp/upgrade-status.log.$$
cat >/tmp/idb_upgrade.sql <<EOD
alter table systable add autoincrement int comment 'schema sync only';
EOD
cat /tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$ 2>&1
checkForError
if [ $mid -eq 1 ]; then
echo "update autoincrement to backend" >>/tmp/upgrade-status.log.$$
cat >/tmp/idb_upgrade.sql <<EOD
select calonlinealter('alter table systable add (autoincrement int)') as xxx;
update systable set autoincrement=0 where autoincrement is null;
EOD
cat /tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$ 2>&1
checkForError
fi
#
#Verify that autoincrement was successfully added to SYSTABLE
#
rm -f /tmp/idb_upgrade.sql
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
--execute='describe systable;' \
calpontsys | grep autoincrement >/tmp/upgrade-status-1.log 2>&1
rc=$?
cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$
if [ $rc -ne 0 ]; then
echo "FAILED adding autoincrement to SYSTABLE!"
exit 1
fi
cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'`
rm -f /tmp/upgrade-status-1.log
if [ -z "$cnt" ]; then
cnt=0
fi
if [ $cnt -ne 1 ]; then
echo "FAILED adding autoincrement to SYSTABLE!"
exit 1
fi
#
# Verify that autoincrement (OID 1011) was successfully added to BRM
#
if [ $has_um -eq 0 ]; then
$installdir/bin/editem -o1011 1>/tmp/upgrade-status-1.log 2>/dev/null
rc=$?
cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$
if [ $rc -ne 0 ]; then
echo "FAILED adding autoincrement to BRM!"
exit 1
fi
cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'`
rm -f /tmp/upgrade-status-1.log
if [ "x$cnt" = x ]; then
cnt=0
fi
if [ $cnt -lt 2 ]; then
echo "FAILED adding autoincrement to BRM!"
exit 1
fi
fi
fi
#---------------------------------------------------------------------------
# See if nextvalue column is in SYSCOLUMN
#---------------------------------------------------------------------------
echo "checking calpontsys for nextvalue..." >>/tmp/upgrade-status.log.$$
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
--execute='describe syscolumn;' \
calpontsys | grep nextvalue >>/tmp/upgrade-status.log.$$ 2>&1
#
# Add nextvalue column to SYSCOLUMN if applicable.
# Also set old autoincrement column in SYSCOLUMN to 'n'.
#
if [ $? -ne 0 ]; then
echo "calpontsys needs upgrade for nextvalue" >>/tmp/upgrade-status.log.$$
echo "add nextvalue columns" >>/tmp/upgrade-status.log.$$
cat >/tmp/idb_upgrade.sql <<EOD
alter table syscolumn add nextvalue bigint comment 'schema sync only';
EOD
cat /tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$ 2>&1
checkForError
if [ $mid -eq 1 ]; then
echo "update nextvalue to backend" >>/tmp/upgrade-status.log.$$
cat >/tmp/idb_upgrade.sql <<EOD
select calonlinealter('alter table syscolumn add (nextvalue bigint)') as xxx;
update syscolumn set nextvalue=1 where nextvalue is null;
update syscolumn set autoincrement='n' where autoincrement is null;
EOD
cat /tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$ 2>&1
checkForError
fi
#
# Verify that nextvalue was successfully added to SYSCOLUMN
#
rm -f /tmp/idb_upgrade.sql
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
--execute='describe syscolumn;' \
calpontsys | grep nextvalue >/tmp/upgrade-status-1.log 2>&1
rc=$?
cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$
if [ $rc -ne 0 ]; then
echo "FAILED adding nextvalue to SYSCOLUMN!"
exit 1
fi
cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'`
rm -f /tmp/upgrade-status-1.log
if [ -z "$cnt" ]; then
cnt=0
fi
if [ $cnt -ne 1 ]; then
echo "FAILED adding nextvalue to SYSCOLUMN!"
exit 1
fi
#
# Verify that nextvalue (OID 1042) was successfully added to BRM
#
if [ $has_um -eq 0 ]; then
$installdir/bin/editem -o1042 1>/tmp/upgrade-status-1.log 2>/dev/null
rc=$?
cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$
if [ $rc -ne 0 ]; then
echo "FAILED adding nextvalue to BRM!"
exit 1
fi
cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'`
rm -f /tmp/upgrade-status-1.log
if [ "x$cnt" = x ]; then
cnt=0
fi
if [ $cnt -lt 2 ]; then
echo "FAILED adding nextvalue to BRM!"
exit 1
fi
fi
fi
#---------------------------------------------------------------------------
# See if systable schema and tablename columns are varchar(128).
#---------------------------------------------------------------------------
recreate=0
echo "checking calpontsys.systable schema and tablename for varchar(128)..." >>/tmp/upgrade-status.log.$$
colCount=` \
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
--execute='describe systable;' \
calpontsys | egrep "schema|tablename" | grep "varchar(128)" | wc -l`
if [ $colCount -ne 2 ]; then
recreate=1
echo "calpontsys needs upgrade to expand systable schema and tablename" >>/tmp/upgrade-status.log.$$
fi
#---------------------------------------------------------------------------
# See if syscolumn schema, tablename, and columname columns are varchar(128).
#---------------------------------------------------------------------------
if [ $recreate -eq 0 ]; then
echo "checking calpontsys.syscolumn schema, tablename, columnname for varchar(128)..." >>/tmp/upgrade-status.log.$$
colCount=` \
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
--execute='describe syscolumn;' \
calpontsys | egrep "schema|tablename|columnname" | grep "varchar(128)" | wc -l`
if [ $colCount -ne 3 ]; then
recreate=1
echo "calpontsys needs upgrade to expand syscolumn schema, tablename, and columnname" >>/tmp/upgrade-status.log.$$
fi
fi
#---------------------------------------------------------------------------
# See if defaultvalue column in SYSCOLUMN is varchar(64)
#---------------------------------------------------------------------------
if [ $recreate -eq 0 ]; then
echo "checking calpontsys for defaultvalue varchar(64)..." >>/tmp/upgrade-status.log.$$
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
--execute='describe syscolumn;' \
calpontsys | grep defaultvalue | grep 'varchar(64)' >>/tmp/upgrade-status.log.$$ 2>&1
if [ $? -ne 0 ]; then
recreate=1
echo "calpontsys needs upgrade to change defaultvalue" >>/tmp/upgrade-status.log.$$
fi
fi
#
# Change defaultvalue column to varchar(64) if applicable
#
if [ $recreate -ne 0 ]; then
cat >/tmp/idb_upgrade.sql <<EOD
drop table if exists systable restrict;
drop table if exists syscolumn restrict;
EOD
cat /tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$ 2>&1
checkForError
echo "create systable and syscolumn with schema sync only" >>/tmp/upgrade-status.log.$$
cat $installdir/mysql/syscatalog_mysql.sql >>/tmp/upgrade-status.log.$$
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys <$installdir/mysql/syscatalog_mysql.sql >>/tmp/upgrade-status.log.$$ 2>&1
checkForError
#
# Verify column widths:
# varchar(64) for syscolumn.defaultvalue
# varchar(128) for systable (schema, tablename) and syscolumn (schema, tablename, and columnname).
#
rm -f /tmp/idb_upgrade.sql
echo "verify column widths" >>/tmp/upgrade-status.log.$$
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
--execute='describe syscolumn;' \
calpontsys | grep defaultvalue | grep 'varchar(64)' >/tmp/upgrade-status-1.log 2>&1
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
--execute='describe systable; describe syscolumn;' \
calpontsys | egrep "schema|tablename|columnname" | grep 'varchar(128)' >>/tmp/upgrade-status-1.log 2>&1
cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$
cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'`
rm -f /tmp/upgrade-status-1.log
if [ -z "$cnt" ]; then
cnt=0
fi
if [ $cnt -ne 6 ]; then
echo "FAILED width of schema, tablename, columnname, defaultvalue verification!"
exit 1
fi
fi
fi
echo "OK"

View File

@ -1,444 +0,0 @@
#!/bin/bash
#
# $Id$
#
# generic InfiniDB upgrade script.
#
# Notes: This script gets run every time InfiniDB starts up so it needs to be:
# 1) able to only do stuff once if needed and nothing if not needed
# 2) reasonably fast when there's nothing to do
# check log for error
checkForError() {
grep ERROR /tmp/upgrade-status.log.$$ > /tmp/error.check
if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then
echo "ERROR: check log file: /tmp/upgrade-status.log.$$"
rm -f /tmp/error.check
exit 1;
fi
rm -f /tmp/error.check
}
if [ "x$1" != xdoupgrade ]; then
echo "Don't run this script by hand! You probably want to use install-infinidb.sh." 1>&2
exit 1
fi
prefix=/usr/local
installdir=$prefix/MariaDB/Columnstore
pwprompt=
for arg in "$@"; do
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
prefix="`echo $arg | awk -F= '{print $2}'`"
installdir=$prefix/MariaDB/Columnstore
elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then
password="`echo $arg | awk -F= '{print $2}'`"
pwprompt="--password=$password"
elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then
installdir="`echo $arg | awk -F= '{print $2}'`"
prefix=`dirname $installdir`
fi
done
test -f $installdir/post/functions && . $installdir/post/functions
mt=`module_type`
mid=`module_id`
# for CE version
if [ -z "$mt" ]; then
mt=pm
fi
if [ -z "$mid" ]; then
mid=1
fi
has_um=`$installdir/bin/getConfig SystemModuleConfig ModuleCount2`
if [ -z "$has_um" ]; then
has_um=0
fi
>/tmp/upgrade-status.log.$$
echo "mt = $mt" >>/tmp/upgrade-status.log.$$
echo "mid = $mid" >>/tmp/upgrade-status.log.$$
echo "has_um = $has_um" >>/tmp/upgrade-status.log.$$
#This upgrade only for UM or PM with no UM
if [ $has_um -eq 0 -o "x$mt" = xum ]; then
#---------------------------------------------------------------------------
# See if compressiontype column is in SYSCOLUMN
#---------------------------------------------------------------------------
echo "checking calpontsys for compressiontype..." >>/tmp/upgrade-status.log.$$
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
--execute='describe syscolumn;' \
calpontsys | grep compressiontype >>/tmp/upgrade-status.log.$$ 2>&1
#
# Add compressiontype column to SYSCOLUMN if applicable
#
if [ $? -ne 0 ]; then
echo "calpontsys needs upgrade for compressiontype" >>/tmp/upgrade-status.log.$$
echo "added compressiontype column" >>/tmp/upgrade-status.log.$$
cat >/tmp/idb_upgrade.sql <<EOD
alter table syscolumn add compressiontype int comment 'schema sync only';
EOD
cat /tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$ 2>&1
checkForError
if [ $mid -eq 1 ]; then
echo "update compressiontype to backend" >>/tmp/upgrade-status.log.$$
cat >/tmp/idb_upgrade.sql <<EOD
select calonlinealter('alter table syscolumn add (compressiontype int)') as xxx;
update syscolumn set compressiontype=0 where compressiontype is null;
EOD
cat /tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$ 2>&1
checkForError
fi
#
# Verify that compressiontype was successfully added to SYSCOLUMN
#
rm -f /tmp/idb_upgrade.sql
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
--execute='describe syscolumn;' \
calpontsys | grep compressiontype >/tmp/upgrade-status-1.log 2>&1
rc=$?
cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$
if [ $rc -ne 0 ]; then
echo "FAILED adding compressiontype to SYSCOLUMN!"
exit 1
fi
cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'`
rm -f /tmp/upgrade-status-1.log
if [ -z "$cnt" ]; then
cnt=0
fi
if [ $cnt -ne 1 ]; then
echo "FAILED adding compressiontype to SYSCOLUMN!"
exit 1
fi
#
# Verify that compressiontype (OID 1041) was successfully added to BRM
#
if [ $has_um -eq 0 ]; then
$installdir/bin/editem -o1041 1>/tmp/upgrade-status-1.log 2>/dev/null
rc=$?
cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$
if [ $rc -ne 0 ]; then
echo "FAILED adding compressiontype to BRM!"
exit 1
fi
cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'`
rm -f /tmp/upgrade-status-1.log
if [ -z "$cnt" ]; then
cnt=0
fi
if [ $cnt -lt 2 ]; then
echo "FAILED adding compressiontype to BRM!"
exit 1
fi
fi
fi
#---------------------------------------------------------------------------
# See if autoincrement column is in SYSTABLE
#---------------------------------------------------------------------------
echo "checking calpontsys for autoincrement..." >>/tmp/upgrade-status.log.$$
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
--execute='describe systable;' \
calpontsys | grep autoincrement >>/tmp/upgrade-status.log.$$ 2>&1
#
# Add autoincrement column to SYSTABLE if applicable
#
if [ $? -ne 0 ]; then
echo "calpontsys needs upgrade for autoincrement" >>/tmp/upgrade-status.log.$$
echo "add autoincrement columns" >>/tmp/upgrade-status.log.$$
cat >/tmp/idb_upgrade.sql <<EOD
alter table systable add autoincrement int comment 'schema sync only';
EOD
cat /tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$ 2>&1
checkForError
if [ $mid -eq 1 ]; then
echo "update autoincrement to backend" >>/tmp/upgrade-status.log.$$
cat >/tmp/idb_upgrade.sql <<EOD
select calonlinealter('alter table systable add (autoincrement int)') as xxx;
update systable set autoincrement=0 where autoincrement is null;
EOD
cat /tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$ 2>&1
checkForError
fi
#
#Verify that autoincrement was successfully added to SYSTABLE
#
rm -f /tmp/idb_upgrade.sql
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
--execute='describe systable;' \
calpontsys | grep autoincrement >/tmp/upgrade-status-1.log 2>&1
rc=$?
cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$
if [ $rc -ne 0 ]; then
echo "FAILED adding autoincrement to SYSTABLE!"
exit 1
fi
cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'`
rm -f /tmp/upgrade-status-1.log
if [ -z "$cnt" ]; then
cnt=0
fi
if [ $cnt -ne 1 ]; then
echo "FAILED adding autoincrement to SYSTABLE!"
exit 1
fi
#
# Verify that autoincrement (OID 1011) was successfully added to BRM
#
if [ $has_um -eq 0 ]; then
$installdir/bin/editem -o1011 1>/tmp/upgrade-status-1.log 2>/dev/null
rc=$?
cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$
if [ $rc -ne 0 ]; then
echo "FAILED adding autoincrement to BRM!"
exit 1
fi
cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'`
rm -f /tmp/upgrade-status-1.log
if [ "x$cnt" = x ]; then
cnt=0
fi
if [ $cnt -lt 2 ]; then
echo "FAILED adding autoincrement to BRM!"
exit 1
fi
fi
fi
#---------------------------------------------------------------------------
# See if nextvalue column is in SYSCOLUMN
#---------------------------------------------------------------------------
echo "checking calpontsys for nextvalue..." >>/tmp/upgrade-status.log.$$
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
--execute='describe syscolumn;' \
calpontsys | grep nextvalue >>/tmp/upgrade-status.log.$$ 2>&1
#
# Add nextvalue column to SYSCOLUMN if applicable.
# Also set old autoincrement column in SYSCOLUMN to 'n'.
#
if [ $? -ne 0 ]; then
echo "calpontsys needs upgrade for nextvalue" >>/tmp/upgrade-status.log.$$
echo "add nextvalue columns" >>/tmp/upgrade-status.log.$$
cat >/tmp/idb_upgrade.sql <<EOD
alter table syscolumn add nextvalue bigint comment 'schema sync only';
EOD
cat /tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$ 2>&1
checkForError
if [ $mid -eq 1 ]; then
echo "update nextvalue to backend" >>/tmp/upgrade-status.log.$$
cat >/tmp/idb_upgrade.sql <<EOD
select calonlinealter('alter table syscolumn add (nextvalue bigint)') as xxx;
update syscolumn set nextvalue=1 where nextvalue is null;
update syscolumn set autoincrement='n' where autoincrement is null;
EOD
cat /tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$ 2>&1
checkForError
fi
#
# Verify that nextvalue was successfully added to SYSCOLUMN
#
rm -f /tmp/idb_upgrade.sql
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
--execute='describe syscolumn;' \
calpontsys | grep nextvalue >/tmp/upgrade-status-1.log 2>&1
rc=$?
cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$
if [ $rc -ne 0 ]; then
echo "FAILED adding nextvalue to SYSCOLUMN!"
exit 1
fi
cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'`
rm -f /tmp/upgrade-status-1.log
if [ -z "$cnt" ]; then
cnt=0
fi
if [ $cnt -ne 1 ]; then
echo "FAILED adding nextvalue to SYSCOLUMN!"
exit 1
fi
#
# Verify that nextvalue (OID 1042) was successfully added to BRM
#
if [ $has_um -eq 0 ]; then
$installdir/bin/editem -o1042 1>/tmp/upgrade-status-1.log 2>/dev/null
rc=$?
cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$
if [ $rc -ne 0 ]; then
echo "FAILED adding nextvalue to BRM!"
exit 1
fi
cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'`
rm -f /tmp/upgrade-status-1.log
if [ "x$cnt" = x ]; then
cnt=0
fi
if [ $cnt -lt 2 ]; then
echo "FAILED adding nextvalue to BRM!"
exit 1
fi
fi
fi
#---------------------------------------------------------------------------
# See if systable schema and tablename columns are varchar(128).
#---------------------------------------------------------------------------
recreate=0
echo "checking calpontsys.systable schema and tablename for varchar(128)..." >>/tmp/upgrade-status.log.$$
colCount=` \
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
--execute='describe systable;' \
calpontsys | egrep "schema|tablename" | grep "varchar(128)" | wc -l`
if [ $colCount -ne 2 ]; then
recreate=1
echo "calpontsys needs upgrade to expand systable schema and tablename" >>/tmp/upgrade-status.log.$$
fi
#---------------------------------------------------------------------------
# See if syscolumn schema, tablename, and columname columns are varchar(128).
#---------------------------------------------------------------------------
if [ $recreate -eq 0 ]; then
echo "checking calpontsys.syscolumn schema, tablename, columnname for varchar(128)..." >>/tmp/upgrade-status.log.$$
colCount=` \
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
--execute='describe syscolumn;' \
calpontsys | egrep "schema|tablename|columnname" | grep "varchar(128)" | wc -l`
if [ $colCount -ne 3 ]; then
recreate=1
echo "calpontsys needs upgrade to expand syscolumn schema, tablename, and columnname" >>/tmp/upgrade-status.log.$$
fi
fi
#---------------------------------------------------------------------------
# See if defaultvalue column in SYSCOLUMN is varchar(64)
#---------------------------------------------------------------------------
if [ $recreate -eq 0 ]; then
echo "checking calpontsys for defaultvalue varchar(64)..." >>/tmp/upgrade-status.log.$$
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
--execute='describe syscolumn;' \
calpontsys | grep defaultvalue | grep 'varchar(64)' >>/tmp/upgrade-status.log.$$ 2>&1
if [ $? -ne 0 ]; then
recreate=1
echo "calpontsys needs upgrade to change defaultvalue" >>/tmp/upgrade-status.log.$$
fi
fi
#
# Change defaultvalue column to varchar(64) if applicable
#
if [ $recreate -ne 0 ]; then
cat >/tmp/idb_upgrade.sql <<EOD
drop table if exists systable restrict;
drop table if exists syscolumn restrict;
EOD
cat /tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys </tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$ 2>&1
checkForError
echo "create systable and syscolumn with schema sync only" >>/tmp/upgrade-status.log.$$
cat $installdir/mysql/syscatalog_mysql.sql >>/tmp/upgrade-status.log.$$
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
calpontsys <$installdir/mysql/syscatalog_mysql.sql >>/tmp/upgrade-status.log.$$ 2>&1
checkForError
#
# Verify column widths:
# varchar(64) for syscolumn.defaultvalue
# varchar(128) for systable (schema, tablename) and syscolumn (schema, tablename, and columnname).
#
rm -f /tmp/idb_upgrade.sql
echo "verify column widths" >>/tmp/upgrade-status.log.$$
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
--execute='describe syscolumn;' \
calpontsys | grep defaultvalue | grep 'varchar(64)' >/tmp/upgrade-status-1.log 2>&1
$installdir/mysql/bin/mysql \
--defaults-file=$installdir/mysql/my.cnf \
--user=root $pwprompt \
--execute='describe systable; describe syscolumn;' \
calpontsys | egrep "schema|tablename|columnname" | grep 'varchar(128)' >>/tmp/upgrade-status-1.log 2>&1
cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$
cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'`
rm -f /tmp/upgrade-status-1.log
if [ -z "$cnt" ]; then
cnt=0
fi
if [ $cnt -ne 6 ]; then
echo "FAILED width of schema, tablename, columnname, defaultvalue verification!"
exit 1
fi
fi
fi
echo "OK"

View File

@ -1,323 +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 PKGTYPE [lindex $argv 5]
set NODEPS [lindex $argv 6]
set MYSQLPW [lindex $argv 7]
set MYSQLPORT [lindex $argv 8]
set DEBUG [lindex $argv 9]
set INSTALLDIR "/usr/local/MariaDB/Columnstore"
set IDIR [lindex $argv 10]
if { $IDIR != "" } {
set INSTALLDIR $IDIR
}
set USERNAME "root"
set UNM [lindex $argv 11]
if { $UNM != "" } {
set USERNAME $UNM
}
if { $MYSQLPW == "none" } {
set MYSQLPW " "
}
set BASH "/bin/bash "
#if { $DEBUG == "1" } {
# set BASH "/bin/bash -x "
#}
set HOME "$env(HOME)"
log_user $DEBUG
spawn -noecho /bin/bash
#
if { $PKGTYPE == "rpm" } {
set PKGERASE "rpm -e --nodeps \$(rpm -qa | grep '^infinidb')"
set PKGERASE1 "rpm -e --nodeps "
set PKGINSTALL "rpm -ivh $NODEPS --force infinidb*$VERSION*"
set PKGUPGRADE "rpm -Uvh --noscripts infinidb*$VERSION*"
} else {
if { $PKGTYPE == "deb" } {
set PKGERASE "dpkg -P \$(dpkg --get-selections | grep '^infinidb')"
set PKGERASE1 "dpkg -P "
set PKGINSTALL "dpkg -i --force-confnew infinidb*$VERSION*"
set PKGUPGRADE "dpkg -i --force-confnew infinidb*$VERSION*"
} else {
send_user "Invalid Package Type of $PKGTYPE"
exit 1
}
}
# check and see if remote server has ssh keys setup, set PASSWORD if so
send_user " "
send "ssh $USERNAME@$SERVER 'time'\n"
set timeout 60
expect {
"Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit 1 }
"service not known" { send_user "FAILED: Invalid Host\n" ; exit 1 }
"authenticity" { send "yes\n"
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
}
"sys" { set PASSWORD "ssh" }
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
timeout { send_user "ERROR: Timeout to host\n" ; exit 1 }
}
set timeout 30
expect {
-re {[$#] } { }
"sys" { }
}
send_user "\n"
#BUG 5749 - SAS: didn't work on their system until I added the sleep 60
sleep 60
if { $INSTALLTYPE == "initial" || $INSTALLTYPE == "uninstall" } {
#
# erase InfiniDB packages
#
send_user "Erase InfiniDB Packages on Module "
send "ssh $USERNAME@$SERVER '$PKGERASE ;$PKGERASE1 dummy'\n"
if { $PASSWORD != "ssh" } {
set timeout 30
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
}
set timeout 120
expect {
"package dummy" { send_user "DONE" }
"error: Failed dependencies" { send_user "ERROR: Failed dependencies\n" ; exit 1 }
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
}
send_user "\n"
}
if { $INSTALLTYPE == "uninstall" } { exit 0 }
#
# send the InfinIDB package
#
set timeout 30
#expect -re {[$#] }
send_user "Copy new InfiniDB Packages to Module "
send "ssh $USERNAME@$SERVER 'rm -f /root/infinidb-*.$PKGTYPE'\n"
if { $PASSWORD != "ssh" } {
set timeout 30
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
}
}
expect {
-re {[$#] } { }
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
}
set timeout 30
expect {
-re {[$#] } { }
}
send "scp $HOME/infinidb*$VERSION* $USERNAME@$SERVER:.;$PKGERASE dummy\n"
if { $PASSWORD != "ssh" } {
set timeout 30
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
}
set timeout 120
expect {
"package dummy" { send_user "DONE" }
"directory" { send_user "ERROR\n" ;
send_user "\n*** Installation ERROR\n" ;
exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
}
send_user "\n"
#sleep to make sure it's finished
sleep 5
#
set timeout 30
expect -re {[$#] }
if { $INSTALLTYPE == "initial"} {
#
# install package
#
send_user "Install InfinIDB Packages on Module "
send "ssh $USERNAME@$SERVER '$PKGINSTALL ;$PKGERASE dummy'\n"
if { $PASSWORD != "ssh" } {
set timeout 30
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
}
set timeout 180
expect {
"package dummy" { send_user "DONE" }
"error: Failed dependencies" { send_user "ERROR: Failed dependencies\n" ;
send_user "\n*** Installation ERROR\n" ;
exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
"needs" { send_user "ERROR: disk space issue\n" ; exit 1 }
"conflicts" { send_user "ERROR: File Conflict issue\n" ; exit 1 }
}
send_user "\n"
set timeout 30
}
#sleep to make sure it's finished
sleep 5
#
if { $INSTALLTYPE == "initial"} {
#
# copy over InfiniDB config file
#
send_user "Copy InfiniDB Config file to Module "
send "scp $INSTALLDIR/etc/* $USERNAME@$SERVER:$INSTALLDIR/etc/.\n"
if { $PASSWORD != "ssh" } {
set timeout 30
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
}
set timeout 30
expect {
"directory" { send_user "ERROR\n" ;
send_user "\n*** Installation ERROR\n" ;
exit 1 }
-re {[$#] } { send_user "DONE" }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
}
send_user "\n"
#sleep to make sure it's finished
sleep 5
#
# copy over custom OS tmp files
#
send_user "Copy Custom OS files to Module "
send "scp -r $INSTALLDIR/local/etc $USERNAME@$SERVER:$INSTALLDIR/local/.\n"
if { $PASSWORD != "ssh" } {
set timeout 30
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
}
set timeout 30
expect {
"directory" { send_user "ERROR\n" ;
send_user "\n*** Installation ERROR\n" ;
exit 1 }
-re {[$#] } { send_user "DONE" }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
}
send_user "\n"
#sleep to make sure it's finished
sleep 5
#
# copy over InfiniDB OS files
#
send_user "Copy InfiniDB OS files to Module "
send "scp $INSTALLDIR/local/etc/$MODULE/* $USERNAME@$SERVER:$INSTALLDIR/local/.\n"
if { $PASSWORD != "ssh" } {
set timeout 30
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
}
set timeout 30
expect {
"directory" { send_user "ERROR\n" ;
send_user "\n*** Installation ERROR\n" ;
exit 1 }
-re {[$#] } { send_user "DONE" }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
}
send_user "\n"
#sleep to make sure it's finished
sleep 5
#
# Start module installer to setup Custom OS files
#
send_user "Run Module Installer "
send "ssh $USERNAME@$SERVER '$BASH $INSTALLDIR/bin/module_installer.sh --module=um --port=$MYSQLPORT'\n"
if { $PASSWORD != "ssh" } {
set timeout 30
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
}
set timeout 200
expect {
"!!!Module" { send_user "DONE" }
"FAILED" { send_user "ERROR: missing OS file\n" ; exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
"No such file" { send_user "ERROR: File Not Found\n" ; exit 1 }
}
send_user "\n"
set timeout 30
#expect -re {[$#] }
}
#
# check InfiniDB syslog functionality
#
send_user "Check InfiniDB system logging functionality "
send " \n"
send date\n
send "ssh $USERNAME@$SERVER '$BASH $INSTALLDIR/bin/syslogSetup.sh check'\n"
if { $PASSWORD != "ssh" } {
set timeout 30
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
}
set timeout 30
expect {
"Logging working" { send_user "DONE" }
timeout { send_user "DONE" }
"not working" { send_user "WARNING: InfiniDB system logging functionality not working" }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
}
send_user "\n"
send_user "\nInstallation Successfully Completed on '$MODULE'\n"
exit 0
# vim:ts=4 sw=4:

View File

@ -1,173 +0,0 @@
#!/usr/bin/expect
#
# $Id$
#
# Install custom OS files on External Module
# Argument 1 - Remote Module Name
# Argument 2 - Remote Server Host Name or IP address
# Argument 3 - OAM Parent Host Name
# Argument 4 - Root Password of remote server
# Argument 5 - Debug flag 1 for on, 0 for off
set timeout 10
set USERNAME root
set MODULE [lindex $argv 0]
set SERVER [lindex $argv 1]
set OAMHOSTNAME [lindex $argv 2]
set PASSWORD [lindex $argv 3]
set DEBUG [lindex $argv 4]
log_user $DEBUG
spawn -noecho /bin/bash
#
# Validate Calpont RPM is installed
#
send_user "\n"
send_user "Check Calpont RPM installed "
expect -re "# "
send "ssh $USERNAME@$SERVER 'rpm -iq calpont'\n"
expect {
-re "Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit }
-re "service not known" { send_user "FAILED: Invalid Host\n" ; exit }
-re "authenticity" { send "yes\n"
expect {
-re "word: " { send "$PASSWORD\n" }
}
}
-re "word: " { send "$PASSWORD\n" }
}
expect {
-re "tools " { send_user "DONE" }
-re "Permission denied" { send_user "ERROR: Invalid password\n" ; exit -1 }
-re "package calpont" { send_user "ERROR: Calpont RPM not installed on External Module\n" ; exit -1 }
}
#
# Create mount directories
#
send_user "\n"
send_user "Create etc mount directory "
expect -re "# "
send "ssh $USERNAME@$SERVER 'mkdir /mnt/$OAMHOSTNAME\_etc'\n"
expect -re "word: "
# send the password
send "$PASSWORD\n"
expect {
-re "# " { send_user "DONE" }
-re "Permission denied" { send_user "ERROR: Invalid password\n" ; exit -1 }
-re "mkdir: cannot" { send_user "DONE: already installed\n"
send_user "\nInstallation Successfully Completed on '$MODULE'\n"; exit 0 }
}
send_user "\n"
send_user "Create OAM mount directory "
send "ssh $USERNAME@$SERVER 'mkdir /mnt/$OAMHOSTNAME\_OAM'\n"
expect -re "word: "
# send the password
send "$PASSWORD\n"
expect {
-re "# " { send_user "DONE" }
-re "Permission denied" { send_user "ERROR: Invalid password\n" ; exit -1 }
-re "mkdir: cannot" { send_user "DONE: already installed\n"
send_user "\nInstallation Successfully Completed on '$MODULE'\n"; exit 0 }
}
#
# copy over calpont OS files
#
send_user "\n"
send_user "Copy Mount File to Module "
send "scp /tmp/etc/$MODULE/*mount $USERNAME@$SERVER:/mnt/.\n"
expect -re "word: "
# send the password
send "$PASSWORD\n"
expect {
-re "100%" { send_user "DONE" }
-re "scp" { send_user "ERROR\n" ;
send_user "\n*** Installation ERROR\n" ;
exit -1 }
-re "Permission denied" { send_user "ERROR: Invalid password\n" ; exit -1 }
-re "No such file or directory" { send_user "ERROR: Invalid file\n" ; exit -1 }
}
#
send_user "\n"
send_user "Copy Custom inittab to Module "
send "scp /tmp/etc/$MODULE/inittab.calpont $USERNAME@$SERVER:/tmp/.\n"
expect -re "word: "
# send the password
send "$PASSWORD\n"
expect {
-re "100%" { send_user "DONE" }
-re "scp" { send_user "ERROR\n" ;
send_user "\n*** Installation ERROR\n" ;
exit -1 }
-re "Permission denied" { send_user "ERROR: Invalid password\n" ; exit -1 }
-re "No such file or directory" { send_user "ERROR: Invalid file\n" ; exit -1 }
}
#
send_user "\n"
send_user "Copy syslogd.conf to Module "
send "scp /etc/syslog.conf $USERNAME@$SERVER:/etc/.\n"
expect -re "word: "
# send the password
send "$PASSWORD\n"
expect {
-re "100%" { send_user "DONE" }
-re "scp" { send_user "ERROR\n" ;
send_user "\n*** Installation ERROR\n" ;
exit -1 }
-re "Permission denied" { send_user "ERROR: Invalid password\n" ; exit -1 }
-re "No such file or directory" { send_user "ERROR: Invalid file\n" ; exit -1 }
}
#
# chmod of mount file
#
send_user "\n"
send_user "Run chmod on Mount File "
send "ssh $USERNAME@$SERVER 'chmod 755 /mnt/$OAMHOSTNAME\_*mount'\n"
expect -re "word: "
# send the password
send "$PASSWORD\n"
expect {
-re "# " { send_user "DONE" }
-re "Permission denied" { send_user "ERROR: Invalid password\n" ; exit -1 }
}
#
# Update External Module inittab
#
send_user "\n"
send_user "Update inittab "
send "ssh $USERNAME@$SERVER 'cat /tmp/inittab.calpont >> /etc/inittab'\n"
expect -re "word: "
# send the password
send "$PASSWORD\n"
expect {
-re "# " { send_user "DONE" }
-re "Permission denied" { send_user "ERROR: Invalid password\n" ; exit -1 }
}
#
# Restart External Module syslogd
#
send_user "\n"
send_user "Restart syslogd "
send "ssh $USERNAME@$SERVER 'service syslog restart'\n"
expect -re "word: "
# send the password
send "$PASSWORD\n"
expect {
-re "# " { send_user "DONE" }
-re "Permission denied" { send_user "ERROR: Invalid password\n" ; exit -1 }
}
#
# startup ProcMon
#
send_user "\n"
send_user "Startup ProcMon "
send "ssh $USERNAME@$SERVER 'kill -HUP 1'\n"
expect -re "word: "
# send the password
send "$PASSWORD\n"
expect {
-re "# " { send_user "DONE" }
-re "Permission denied" { send_user "ERROR: Invalid password\n" ; exit -1 }
}
send_user "\n"
#
send_user "\nInstallation Successfully Completed on '$MODULE'\n"
exit 0

View File

@ -1 +0,0 @@
pm1

View File

@ -331,7 +331,7 @@ link_all_deplibs=unknown
sys_lib_search_path_spec=`echo "/lib64 /usr/lib64 /usr/local/lib64" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/lib64/ctapi /usr/local/Calpont/lib /usr/local/Calpont/mysql/lib/mysql hwcap 1 nosegneg hwcap 1 nosegneg hwcap 1 nosegneg hwcap 1 nosegneg /usr/lib64/mysql /usr/lib64/qt-3.3/lib /usr/lib/vmware-tools/lib32/libvmGuestLib.so /usr/lib/vmware-tools/lib64/libvmGuestLib.so /usr/lib/vmware-tools/lib32/libvmGuestLibJava.so /usr/lib/vmware-tools/lib64/libvmGuestLibJava.so /usr/lib/vmware-tools/lib32/libDeployPkg.so /usr/lib/vmware-tools/lib64/libDeployPkg.so /usr/lib64/xulrunner "
sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/lib64/ctapi /usr/local/MariaDB/Columnstore/lib /usr/local/MariaDB/Columnstore/mysql/lib/mysql hwcap 1 nosegneg hwcap 1 nosegneg hwcap 1 nosegneg hwcap 1 nosegneg /usr/lib64/mysql /usr/lib64/qt-3.3/lib /usr/lib/vmware-tools/lib32/libvmGuestLib.so /usr/lib/vmware-tools/lib64/libvmGuestLib.so /usr/lib/vmware-tools/lib32/libvmGuestLibJava.so /usr/lib/vmware-tools/lib64/libvmGuestLibJava.so /usr/lib/vmware-tools/lib32/libDeployPkg.so /usr/lib/vmware-tools/lib64/libDeployPkg.so /usr/lib64/xulrunner "
# Fix the shell variable $srcfile for the compiler.
fix_srcfile_path=""
@ -7550,7 +7550,7 @@ link_all_deplibs=unknown
sys_lib_search_path_spec=`echo "/lib64 /usr/lib64 /usr/local/lib64" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/lib64/ctapi /usr/local/Calpont/lib /usr/local/Calpont/mysql/lib/mysql hwcap 1 nosegneg hwcap 1 nosegneg hwcap 1 nosegneg hwcap 1 nosegneg /usr/lib64/mysql /usr/lib64/qt-3.3/lib /usr/lib/vmware-tools/lib32/libvmGuestLib.so /usr/lib/vmware-tools/lib64/libvmGuestLib.so /usr/lib/vmware-tools/lib32/libvmGuestLibJava.so /usr/lib/vmware-tools/lib64/libvmGuestLibJava.so /usr/lib/vmware-tools/lib32/libDeployPkg.so /usr/lib/vmware-tools/lib64/libDeployPkg.so /usr/lib64/xulrunner "
sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/lib64/ctapi /usr/local/MariaDB/Columnstore/lib /usr/local/MariaDB/Columnstore/mysql/lib/mysql hwcap 1 nosegneg hwcap 1 nosegneg hwcap 1 nosegneg hwcap 1 nosegneg /usr/lib64/mysql /usr/lib64/qt-3.3/lib /usr/lib/vmware-tools/lib32/libvmGuestLib.so /usr/lib/vmware-tools/lib64/libvmGuestLib.so /usr/lib/vmware-tools/lib32/libvmGuestLibJava.so /usr/lib/vmware-tools/lib64/libvmGuestLibJava.so /usr/lib/vmware-tools/lib32/libDeployPkg.so /usr/lib/vmware-tools/lib64/libDeployPkg.so /usr/lib64/xulrunner "
# Fix the shell variable $srcfile for the compiler.
fix_srcfile_path=""

7574
libtool~ Executable file

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@
<PROCESSCONFIG1>
<ProcessName>ProcessMonitor</ProcessName>
<ModuleType>ChildExtOAMModule</ModuleType>
<ProcessLocation>/usr/local/Calpont/bin/ProcMon</ProcessLocation>
<ProcessLocation>/usr/local/MariaDB/Columnstore/bin/ProcMon</ProcessLocation>
<BootLaunch>0</BootLaunch>
<LaunchID>1</LaunchID>
<DepProcessName/>
@ -14,7 +14,7 @@
<PROCESSCONFIG2>
<ProcessName>ProcessManager</ProcessName>
<ModuleType>ParentOAMModule</ModuleType>
<ProcessLocation>/usr/local/Calpont/bin/ProcMgr</ProcessLocation>
<ProcessLocation>/usr/local/MariaDB/Columnstore/bin/ProcMgr</ProcessLocation>
<BootLaunch>1</BootLaunch>
<LaunchID>2</LaunchID>
<DepProcessName/>
@ -24,17 +24,17 @@
<PROCESSCONFIG3>
<ProcessName>SNMPTrapDaemon</ProcessName>
<ModuleType>ParentOAMModule</ModuleType>
<ProcessLocation>/usr/local/Calpont/sbin/snmptrapd</ProcessLocation>
<ProcessArg1>/usr/local/Calpont/sbin/snmptrapd</ProcessArg1>
<ProcessLocation>/usr/local/MariaDB/Columnstore/sbin/snmptrapd</ProcessLocation>
<ProcessArg1>/usr/local/MariaDB/Columnstore/sbin/snmptrapd</ProcessArg1>
<ProcessArg2>-M</ProcessArg2>
<ProcessArg3>/usr/local/Calpont/share/snmp/mibs</ProcessArg3>
<ProcessArg3>/usr/local/MariaDB/Columnstore/share/snmp/mibs</ProcessArg3>
<ProcessArg4>-m</ProcessArg4>
<ProcessArg5>/usr/local/Calpont/share/snmp/mibs/CALPONT-MIB.txt</ProcessArg5>
<ProcessArg5>/usr/local/MariaDB/Columnstore/share/snmp/mibs/CALPONT-MIB.txt</ProcessArg5>
<ProcessArg6>-c</ProcessArg6>
<ProcessArg7>/usr/local/Calpont/etc/snmptrapd.conf</ProcessArg7>
<ProcessArg7>/usr/local/MariaDB/Columnstore/etc/snmptrapd.conf</ProcessArg7>
<ProcessArg8>-C</ProcessArg8>
<ProcessArg9>-Lf</ProcessArg9>
<ProcessArg10>/var/log/Calpont/snmptrapd.log</ProcessArg10>
<ProcessArg10>/usr/local/MariaDB/Columnstore/snmptrapd.log</ProcessArg10>
<ProcessArg11>-p</ProcessArg11>
<ProcessArg12>/var/run/snmptrapd.pid</ProcessArg12>
<BootLaunch>1</BootLaunch>
@ -47,8 +47,8 @@
<PROCESSCONFIG4>
<ProcessName>DBRMControllerNode</ProcessName>
<ModuleType>ParentOAMModule</ModuleType>
<ProcessLocation>/usr/local/Calpont/bin/controllernode</ProcessLocation>
<ProcessArg1>/usr/local/Calpont/bin/controllernode</ProcessArg1>
<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>
@ -60,13 +60,13 @@
<PROCESSCONFIG5>
<ProcessName>SNMPAgent</ProcessName>
<ModuleType>ChildOAMModule</ModuleType>
<ProcessLocation>/usr/local/Calpont/sbin/snmpd</ProcessLocation>
<ProcessArg1>/usr/local/Calpont/sbin/snmpd</ProcessArg1>
<ProcessLocation>/usr/local/MariaDB/Columnstore/sbin/snmpd</ProcessLocation>
<ProcessArg1>/usr/local/MariaDB/Columnstore/sbin/snmpd</ProcessArg1>
<ProcessArg2>-c</ProcessArg2>
<ProcessArg3>/usr/local/Calpont/etc/snmpd.conf</ProcessArg3>
<ProcessArg3>/usr/local/MariaDB/Columnstore/etc/snmpd.conf</ProcessArg3>
<ProcessArg4>-C</ProcessArg4>
<ProcessArg5>-Lf</ProcessArg5>
<ProcessArg6>/var/log/Calpont/snmpd.log</ProcessArg6>
<ProcessArg6>/usr/local/MariaDB/Columnstore/snmpd.log</ProcessArg6>
<ProcessArg7>-p</ProcessArg7>
<ProcessArg8>/var/run/snmpd.pid</ProcessArg8>
<BootLaunch>0</BootLaunch>
@ -78,8 +78,8 @@
<PROCESSCONFIG6>
<ProcessName>ServerMonitor</ProcessName>
<ModuleType>ChildOAMModule</ModuleType>
<ProcessLocation>/usr/local/Calpont/bin/ServerMonitor</ProcessLocation>
<ProcessArg1>/usr/local/Calpont/bin/ServerMonitor</ProcessArg1>
<ProcessLocation>/usr/local/MariaDB/Columnstore/bin/ServerMonitor</ProcessLocation>
<ProcessArg1>/usr/local/MariaDB/Columnstore/bin/ServerMonitor</ProcessArg1>
<BootLaunch>2</BootLaunch>
<LaunchID>6</LaunchID>
<DepProcessName/>
@ -89,8 +89,8 @@
<PROCESSCONFIG7>
<ProcessName>DBRMWorkerNode</ProcessName>
<ModuleType>ChildExtOAMModule</ModuleType>
<ProcessLocation>/usr/local/Calpont/bin/workernode</ProcessLocation>
<ProcessArg1>/usr/local/Calpont/bin/workernode</ProcessArg1>
<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>
@ -102,7 +102,7 @@
<PROCESSCONFIG8>
<ProcessName>DecomSvr</ProcessName>
<ModuleType>pm</ModuleType>
<ProcessLocation>/usr/local/Calpont/bin/DecomSvr</ProcessLocation>
<ProcessLocation>/usr/local/MariaDB/Columnstore/bin/DecomSvr</ProcessLocation>
<BootLaunch>2</BootLaunch>
<LaunchID>15</LaunchID>
<DepProcessName/>
@ -112,7 +112,7 @@
<PROCESSCONFIG9>
<ProcessName>PrimProc</ProcessName>
<ModuleType>pm</ModuleType>
<ProcessLocation>/usr/local/Calpont/bin/PrimProc</ProcessLocation>
<ProcessLocation>/usr/local/MariaDB/Columnstore/bin/PrimProc</ProcessLocation>
<BootLaunch>2</BootLaunch>
<LaunchID>20</LaunchID>
<DepProcessName/>
@ -122,7 +122,7 @@
<PROCESSCONFIG10>
<ProcessName>ExeMgr</ProcessName>
<ModuleType>pm</ModuleType>
<ProcessLocation>/usr/local/Calpont/bin/ExeMgr</ProcessLocation>
<ProcessLocation>/usr/local/MariaDB/Columnstore/bin/ExeMgr</ProcessLocation>
<BootLaunch>2</BootLaunch>
<LaunchID>30</LaunchID>
<DepProcessName1>PrimProc</DepProcessName1>
@ -133,7 +133,7 @@
<PROCESSCONFIG11>
<ProcessName>WriteEngineServer</ProcessName>
<ModuleType>pm</ModuleType>
<ProcessLocation>/usr/local/Calpont/bin/WriteEngineServer</ProcessLocation>
<ProcessLocation>/usr/local/MariaDB/Columnstore/bin/WriteEngineServer</ProcessLocation>
<BootLaunch>2</BootLaunch>
<LaunchID>40</LaunchID>
<RunType>LOADSHARE</RunType>
@ -172,7 +172,7 @@
<PROCESSCONFIG14>
<ProcessName>mysqld</ProcessName>
<ModuleType>pm</ModuleType>
<ProcessLocation>/usr/local/Calpont/mysql/libexe/mysqld</ProcessLocation>
<ProcessLocation>/usr/local/MariaDB/Columnstore/mysql/libexe/mysqld</ProcessLocation>
<BootLaunch>0</BootLaunch>
<LaunchID>100</LaunchID>
<DepProcessName/>

View File

@ -1,57 +0,0 @@
include ../../rules.mak
#******************************************************************************************
#
# $Id: Makefile 3250 2012-09-26 17:44:13Z rdempsey $
#
# Copyright (C) 2009-2012 Calpont Corporation
# All rights reserved
#*****************************************************************************************/
.PHONY: install clean test docs coverage leakcheck
SCRIPTS=post-install pre-uninstall remote_command.sh \
columnstoreLogRotate transactionLog transactionLogArchiver.sh system_installer.sh \
module_installer.sh patch_installer.sh xm_installer.sh startupTests.sh \
director_installer.sh user_installer.sh performance_installer.sh \
remote_scp_get.sh columnstoreAlias run.sh upgrade-columnstore.sh \
post-mysql-install post-mysqld-install binary_installer.sh \
os_check.sh columnstore columnstoreSyslog columnstoreSyslog-ng syslogSetup.sh \
remote_scp_put.sh columnstoreUninstall.sh columnstore.def \
remotessh.exp master-rep-columnstore.sh slave-rep-columnstore.sh rsync.sh \
myCnf-include-args.text myCnf-exclude-args.text remote_command_verify.sh \
columnstoreSyslog7 disable-rep-columnstore.sh columnstore.conf
LOCAL=module
bootstrap:
umask 002; \
mkdir -p $(INSTALL_ROOT_BIN); \
pushd $(INSTALL_ROOT_BIN) >/dev/null; \
rm -f $(SCRIPTS); \
popd >/dev/null; \
$(INSTALL) $(SCRIPTS) $(INSTALL_ROOT_BIN)
pushd $(INSTALL_ROOT_BIN) >/dev/null; \
chmod -f 555 $(SCRIPTS); \
popd >/dev/null
umask 002; \
mkdir -p $(INSTALL_ROOT_LOCAL); \
pushd $(INSTALL_ROOT_LOCAL) >/dev/null; \
rm -f $(LOCAL); \
popd >/dev/null; \
$(INSTALL) $(LOCAL) $(INSTALL_ROOT_LOCAL)
pushd $(INSTALL_ROOT_LOCAL) >/dev/null; \
chmod -f 555 $(LOCAL); \
popd >/dev/null
clean:
rm -f $(OBJS) $(PROGRAM) core *~ *.tag *.d *.d.*
install: bootstrap
test:
docs:
coverage:
leakcheck:

View File

@ -53,7 +53,7 @@ if { $INSTALLTYPE == "initial" || $INSTALLTYPE == "uninstall" } {
send_user "Uninstall Calpont Package "
send " \n"
send date\n
send "ssh $USERNAME@$SERVER 'rm -f /etc/init.d/infinidb /etc/init.d/mysql-Calpont $INSTALLDIR/releasenum >/dev/null 2>&1'\n"
send "ssh $USERNAME@$SERVER 'rm -f /etc/init.d/infinidb /etc/init.d/mysql-Columnstore $INSTALLDIR/releasenum >/dev/null 2>&1'\n"
set timeout 20
expect {
"Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit 1}

View File

@ -3,11 +3,11 @@
alias mcsmysql='/usr/local/Calpont/mysql/bin/mysql --defaults-file=/usr/local/Calpont/mysql/my.cnf -u root'
alias ma=/usr/local/Calpont/bin/mcsadmin
alias mcsadmin=/usr/local/Calpont/bin/mcsadmin
alias home='cd /usr/local/Calpont/'
alias log='cd /var/log/Calpont/'
alias core='cd /var/log/Calpont/corefiles'
alias home='cd /usr/local/MariaDB/Columnstore'
alias log='cd /var/log/Columnstore/'
alias core='cd /var/log/Columnstore/corefiles'
alias tmsg='tail -f /var/log/messages'
alias tdebug='tail -f /var/log/Calpont/debug.log'
alias tinfo='tail -f /var/log/Calpont/info.log'
alias tdebug='tail -f /var/log/Columnstore/debug.log'
alias tinfo='tail -f /var/log/Columnstore/info.log'
alias dbrm='cd /usr/local/Calpont/data1/systemFiles/dbrm'
alias module='cat /usr/local/Calpont/local/module'

View File

@ -3,21 +3,21 @@
# as part of the RPM installation
#
/var/log/Calpont/*.log {
/var/log/Columnstore/*.log {
missingok
rotate 7
daily
dateext
copytruncate
olddir /var/log/Calpont/archive
olddir /var/log/Columnstore/archive
}
/var/log/Calpont/*.log1 {
/var/log/Columnstore/*.log1 {
missingok
rotate 7
daily
nocreate
compress
olddir /var/log/Calpont/archive
olddir /var/log/Columnstore/archive
}
/usr/local/Calpont/etc/Calpont.xml {
daily

View File

@ -1,7 +1,7 @@
# Calpont Database Platform Logging
local1.=crit -/var/log/Calpont/crit.log
local1.=err -/var/log/Calpont/err.log
local1.=warning -/var/log/Calpont/warning.log
local1.=info -/var/log/Calpont/info.log
local1.=debug -/var/log/Calpont/debug.log
local2.=crit -/var/log/Calpont/data/data_mods.log
local1.=crit -/var/log/Columnstore/crit.log
local1.=err -/var/log/Columnstore/err.log
local1.=warning -/var/log/Columnstore/warning.log
local1.=info -/var/log/Columnstore/info.log
local1.=debug -/var/log/Columnstore/debug.log
local2.=crit -/var/log/Columnstore/data/data_mods.log

View File

@ -21,27 +21,27 @@ filter f_local1debug { facility(local1) and level(debug); };
filter f_local2crit { facility(local2) and level(crit); };
destination d_crit{
file("/var/log/Calpont/crit.log");
file("/var/log/Columnstore/crit.log");
};
destination d_err{
file("/var/log/Calpont/err.log");
file("/var/log/Columnstore/err.log");
};
destination d_warning{
file("/var/log/Calpont/warning.log");
file("/var/log/Columnstore/warning.log");
};
destination d_info{
file("/var/log/Calpont/info.log");
file("/var/log/Columnstore/info.log");
};
destination d_debug{
file("/var/log/Calpont/debug.log");
file("/var/log/Columnstore/debug.log");
};
destination d_data_mods{
file("/var/log/Calpont/data/data_mods.log");
file("/var/log/Columnstore/data/data_mods.log");
};
log{

View File

@ -1,8 +1,8 @@
# Calpont Database Platform Logging
local1.crit -/var/log/Calpont/crit.log
local1.err -/var/log/Calpont/err.log
local1.warning -/var/log/Calpont/warning.log
local1.info -/var/log/Calpont/info.log
local1.debug -/var/log/Calpont/debug.log
local2.crit -/var/log/Calpont/data/data_mods.log
local1.crit -/var/log/Columnstore/crit.log
local1.err -/var/log/Columnstore/err.log
local1.warning -/var/log/Columnstore/warning.log
local1.info -/var/log/Columnstore/info.log
local1.debug -/var/log/Columnstore/debug.log
local2.crit -/var/log/Columnstore/data/data_mods.log

View File

@ -34,7 +34,7 @@ export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR
InstallDir=$INFINIDB_INSTALL_DIR
if [ $InstallDir != "/usr/local/Calpont" ]; then
if [ $InstallDir != "/usr/local/MariaDB/Columnstore" ]; then
export PATH=$InstallDir/bin:$InstallDir/mysql/bin:/bin:/usr/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$InstallDir/lib:$InstallDir/mysql/lib/mysql
fi
@ -107,7 +107,7 @@ start() {
#columnstore core files
$SUDO ulimit -c unlimited > /dev/null 2>&1
$SUDO sysctl -q -w kernel.core_uses_pid=1 > /dev/null 2>&1
$SUDO sysctl -q -w kernel.core_pattern=/var/log/Calpont/corefiles/core.%e.%p > /dev/null 2>&1
$SUDO sysctl -q -w kernel.core_pattern=/var/log/Columnstore/corefiles/core.%e.%p > /dev/null 2>&1
fi
RETVAL=0
@ -128,8 +128,8 @@ stop() {
RETVAL=$?
rm -f /var/lock/subsys/columnstore
fuser -k 8604/tcp > /dev/null 2>&1
test -f $InstallDir/mysql/mysql-Calpont || return $RETVAL
$InstallDir/mysql/mysql-Calpont stop > /dev/null 2>&1
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

View File

@ -1,2 +1,2 @@
/usr/local/Calpont/lib
/usr/local/MariaDB/Columnstore/lib

View File

@ -2,7 +2,7 @@
# Copy this file to /etc/default and rename it to 'infinidb'.
# Change this line to your InfiniDB installation directory
INFINIDB_INSTALL_DIR=/usr/local/Calpont
INFINIDB_INSTALL_DIR=/usr/local/MariaDB/Columnstore
LD_LIBRARY_PATH=$INFINIDB_INSTALL_DIR/lib:$INFINIDB_INSTALL_DIR/mysql/lib/mysql
export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR

View File

@ -12,5 +12,5 @@ stop on runlevel 5
stop on runlevel 6
respawn
exec /usr/local/Calpont/bin/ProcMon
exec /usr/local/MariaDB/Columnstore/bin/ProcMon

View File

@ -1,13 +1,13 @@
# InfiniDB Alias Commands
#
alias mcsmysql='/usr/local/Calpont/mysql/bin/mysql --defaults-file=/usr/local/Calpont/mysql/my.cnf -u root'
alias ma=/usr/local/Calpont/bin/mcsadmin
alias mcsadmin=/usr/local/Calpont/bin/mcsadmin
alias home='cd /usr/local/Calpont/'
alias log='cd /var/log/Calpont/'
alias core='cd /var/log/Calpont/corefiles'
alias mcsmysql='/usr/local/MariaDB/Columnstore/mysql/bin/mysql --defaults-file=/usr/local/MariaDB/Columnstore/mysql/my.cnf -u root'
alias ma=/usr/local/MariaDB/Columnstore/bin/mcsadmin
alias mcsadmin=/usr/local/MariaDB/Columnstore/bin/mcsadmin
alias home='cd /usr/local/MaridDB/Columnstore'
alias log='cd /var/log/Columnstore/'
alias core='cd /var/log/Columnstore/corefiles'
alias tmsg='tail -f /var/log/messages'
alias tdebug='tail -f /var/log/Calpont/debug.log'
alias tinfo='tail -f /var/log/Calpont/info.log'
alias dbrm='cd /usr/local/Calpont/data1/systemFiles/dbrm'
alias module='cat /usr/local/Calpont/local/module'
alias tdebug='tail -f /var/log/Columnstore/debug.log'
alias tinfo='tail -f /var/log/Columnstore/info.log'
alias dbrm='cd /usr/local/MariaDB/Columnstore/data1/systemFiles/dbrm'
alias module='cat /usr/local/MariaDB/Columnstore/local/module'

View File

@ -3,33 +3,33 @@
# as part of the RPM installation
#
/var/log/Calpont/*.log {
/var/log/Columnstore/*.log {
missingok
rotate 7
daily
dateext
copytruncate
olddir /var/log/Calpont/archive
olddir /var/log/Columnstore/archive
}
/var/log/Calpont/*.log1 {
/var/log/Columnstore/*.log1 {
missingok
rotate 7
daily
nocreate
compress
olddir /var/log/Calpont/archive
olddir /var/log/Columnstore/archive
}
/usr/local/Calpont/etc/Calpont.xml {
/usr/local/MariaDB/Columnstore/etc/Calpont.xml {
daily
dateext
copy
olddir /usr/local/Calpont/etc/
olddir /usr/local/MariaDB/Columnstore/etc/
}
/usr/local/Calpont/mysql/db/*.err {
/usr/local/MariaDB/Columnstore/mysql/db/*.err {
missingok
rotate 7
daily
dateext
copytruncate
olddir /usr/local/Calpont/mysql/db
olddir /usr/local/MariaDB/Columnstore/mysql/db
}

View File

@ -1,7 +1,7 @@
# Calpont Database Platform Logging
local1.=crit -/var/log/Calpont/crit.log
local1.=err -/var/log/Calpont/err.log
local1.=warning -/var/log/Calpont/warning.log
local1.=info -/var/log/Calpont/info.log
local1.=debug -/var/log/Calpont/debug.log
local2.=crit -/var/log/Calpont/data/data_mods.log
local1.=crit -/var/log/Columnstore/crit.log
local1.=err -/var/log/Columnstore/err.log
local1.=warning -/var/log/Columnstore/warning.log
local1.=info -/var/log/Columnstore/info.log
local1.=debug -/var/log/Columnstore/debug.log
local2.=crit -/var/log/Columnstore/data/data_mods.log

View File

@ -21,27 +21,27 @@ filter f_local1debug { facility(local1) and level(debug); };
filter f_local2crit { facility(local2) and level(crit); };
destination d_crit{
file("/var/log/Calpont/crit.log");
file("/var/log/Columnstore/crit.log");
};
destination d_err{
file("/var/log/Calpont/err.log");
file("/var/log/Columnstore/err.log");
};
destination d_warning{
file("/var/log/Calpont/warning.log");
file("/var/log/Columnstore/warning.log");
};
destination d_info{
file("/var/log/Calpont/info.log");
file("/var/log/Columnstore/info.log");
};
destination d_debug{
file("/var/log/Calpont/debug.log");
file("/var/log/Columnstore/debug.log");
};
destination d_data_mods{
file("/var/log/Calpont/data/data_mods.log");
file("/var/log/Columnstore/data/data_mods.log");
};
log{

View File

@ -1,8 +1,8 @@
# Calpont Database Platform Logging
local1.crit -/var/log/Calpont/crit.log
local1.err -/var/log/Calpont/err.log
local1.warning -/var/log/Calpont/warning.log
local1.info -/var/log/Calpont/info.log
local1.debug -/var/log/Calpont/debug.log
local2.crit -/var/log/Calpont/data/data_mods.log
local1.crit -/var/log/Columnstore/crit.log
local1.err -/var/log/Columnstore/err.log
local1.warning -/var/log/Columnstore/warning.log
local1.info -/var/log/Columnstore/info.log
local1.debug -/var/log/Columnstore/debug.log
local2.crit -/var/log/Columnstore/data/data_mods.log

View File

@ -1,184 +0,0 @@
#!/bin/bash
#
# $Id: infinidb 3704 2013-08-07 03:33:20Z bwilkinson $
#
# infinidb Starts Calpont InfiniDB database platform
#
#
# chkconfig: 2345 99 99
# description: Calpont InfiniDB is a database platform that utilizes Mysql
#
### BEGIN INIT INFO
# Provides: infinidb
# Required-Start: $local_fs $remote_fs $network $syslog $all
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start/stop InfiniDB DW DBMS
### END INIT INFO
# Source function library.
if [ -f /etc/init.d/functions ]; then
. /etc/init.d/functions
fi
if [ -z "$INFINIDB_INSTALL_DIR" ]; then
test -f /etc/default/infinidb && . /etc/default/infinidb
fi
if [ -z "$INFINIDB_INSTALL_DIR" ]; then
INFINIDB_INSTALL_DIR=/usr/local/Calpont
fi
export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR
InstallDir=$INFINIDB_INSTALL_DIR
if [ $InstallDir != "/usr/local/Calpont" ]; then
export PATH=$InstallDir/bin:$InstallDir/mysql/bin:/bin:/usr/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$InstallDir/lib:$InstallDir/mysql/lib/mysql
fi
#hadoop
plugin=`$INFINIDB_INSTALL_DIR/bin/getConfig SystemConfig DataFilePlugin`
if [ -n "$plugin" ]; then
setenv=`$InstallDir/bin/getConfig SystemConfig DataFileEnvFile`
. $InstallDir/bin/$setenv >/dev/null 2>&1
fi
if [ -e $InstallDir/lib/libjemalloc.so ]; then
export LD_PRELOAD=$InstallDir/lib/libjemalloc.so
elif [ -e $InstallDir/lib/libjemalloc.so.1 ]; then
export LD_PRELOAD=$InstallDir/lib/libjemalloc.so.1
fi
test -f $InstallDir/post/functions && . $InstallDir/post/functions
mt=`module_type`
mid=`module_id`
has_um=`$InstallDir/bin/getConfig SystemModuleConfig ModuleCount2`
if [ "x$has_um" = x ]; then
has_um=0
fi
user=$USER
if [ -z "$user" ]; then
user=root
fi
checkInstallSetup() {
InitialInstallFlag=`$InstallDir/bin/getConfig -c $InstallDir/etc/Calpont.xml Installation InitialInstallFlag`
if [ $InitialInstallFlag != "y" ]; then
echo "Please run the postConfigure install script, check the Installation Guide"
echo "for additional details"
rm -f /var/lock/subsys/infinidb
exit 1
fi
}
[ -f $InstallDir/bin/ProcMon ] || exit 0
start() {
if [ -f /var/lock/subsys/infinidb ]; then
echo "InfiniDB Database Platform already running"
exit 0
fi
(mkdir -p /var/lock/subsys && touch /var/lock/subsys/infinidb) >/dev/null 2>&1
if [ -x $InstallDir/bin/infinidb.pre-start ]; then
$InstallDir/bin/infinidb.pre-start
if [ $? -ne 0 ]; then
echo "Error running InfiniDB pre-start script, not starting InfiniDB"
rm -f /var/lock/subsys/infinidb
exit 1
fi
fi
checkInstallSetup
CoreFileFlag=`$InstallDir/bin/getConfig -c $InstallDir/etc/Calpont.xml Installation CoreFileFlag`
if [ $CoreFileFlag = "y" ]; then
SUDO=
if [ "$user" != "root" ]; then
SUDO="sudo"
fi
#infinidb core files
$SUDO ulimit -c unlimited > /dev/null 2>&1
$SUDO sysctl -q -w kernel.core_uses_pid=1 > /dev/null 2>&1
$SUDO sysctl -q -w kernel.core_pattern=/var/log/Calpont/corefiles/core.%e.%p > /dev/null 2>&1
fi
RETVAL=0
echo "Starting InfiniDB Database Platform"
rm -f /tmp/StopCalpont
exec $InstallDir/bin/run.sh $InstallDir/bin/ProcMon > /dev/null 2>&1 &
return $RETVAL
}
stop() {
echo "Shutting down InfiniDB Database Platform"
touch /tmp/StopCalpont
pkill -9 ProcMon
pkill -9 ProcMgr
pkill -9 snmptrapd
sleep 1
$InstallDir/bin/clearShm
RETVAL=$?
rm -f /var/lock/subsys/infinidb
fuser -k 8604/tcp > /dev/null 2>&1
test -f $InstallDir/mysql/mysql-Calpont || return $RETVAL
$InstallDir/mysql/mysql-Calpont stop > /dev/null 2>&1
if [ -x $InstallDir/bin/infinidb.post-stop ]; then
$InstallDir/bin/infinidb.post-stop
fi
return $RETVAL
}
restart() {
stop
start
}
status() {
isrunning=0
if [ $EUID -eq 0 ]; then
if [ -f /var/lock/subsys/infinidb ]; then
isrunning=1
fi
else
pgrep ProcMon >/dev/null 2>&1
if [ $? -eq 0 ]; then
isrunning=1
fi
fi
if [ $isrunning -ne 0 ]; then
echo "InfiniDB is running"
else
echo "InfiniDB is not running"
exit 3
fi
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
condrestart)
[ -f /var/lock/subsys/infinidb ] && restart || :
;;
status)
status
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
exit 1
esac
exit $?

View File

@ -14,5 +14,5 @@ HOME=/
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/Calpont/bin/transactionLogArchiver.sh
00,10,20,30,40,50 * * * * root /usr/local/MariaDB/Columnstore/bin/transactionLogArchiver.sh

View File

@ -107,7 +107,7 @@ start() {
#infinidb core files
$SUDO ulimit -c unlimited > /dev/null 2>&1
$SUDO sysctl -q -w kernel.core_uses_pid=1 > /dev/null 2>&1
$SUDO sysctl -q -w kernel.core_pattern=/var/log/Calpont/corefiles/core.%e.%p > /dev/null 2>&1
$SUDO sysctl -q -w kernel.core_pattern=/var/log/Columnstore/corefiles/core.%e.%p > /dev/null 2>&1
fi
RETVAL=0
@ -128,8 +128,8 @@ stop() {
RETVAL=$?
rm -f /var/lock/subsys/infinidb
fuser -k 8604/tcp > /dev/null 2>&1
test -f $InstallDir/mysql/mysql-Calpont || return $RETVAL
$InstallDir/mysql/mysql-Calpont stop > /dev/null 2>&1
test -f $InstallDir/mysql/mysql-Columnstore || return $RETVAL
$InstallDir/mysql/mysql-Columnstore stop > /dev/null 2>&1
if [ -x $InstallDir/bin/infinidb.post-stop ]; then
$InstallDir/bin/infinidb.post-stop
fi

View File

@ -1,167 +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 calpont OS files to Linux OS file
#
#
prefix=/usr/local
installdir=$prefix/MariaDB/Columnstore
rpmmode=install
user=$USER
if [ -z "$user" ]; then
user=root
fi
quiet=0
shiftcnt=0
for arg in "$@"; do
if [ $(expr -- "$arg" : '--prefix=') -eq 9 ]; then
prefix="$(echo $arg | awk -F= '{print $2}')"
installdir=$prefix/MariaDB/Columnstore
((shiftcnt++))
elif [ $(expr -- "$arg" : '--rpmmode=') -eq 10 ]; then
rpmmode="$(echo $arg | awk -F= '{print $2}')"
((shiftcnt++))
elif [ $(expr -- "$arg" : '--installdir=') -eq 13 ]; then
installdir="$(echo $arg | awk -F= '{print $2}')"
prefix=$(dirname $installdir)
((shiftcnt++))
elif [ $(expr -- "$arg" : '--user=') -eq 7 ]; then
user="$(echo $arg | awk -F= '{print $2}')"
((shiftcnt++))
elif [ $(expr -- "$arg" : '--quiet') -eq 7 ]; then
quiet=1
((shiftcnt++))
elif [ $(expr -- "$arg" : '--port') -eq 6 ]; then
mysqlPort="$(echo $arg | awk -F= '{print $2}')"
((shiftcnt++))
elif [ $(expr -- "$arg" : '--module') -eq 8 ]; then
module="$(echo $arg | awk -F= '{print $2}')"
((shiftcnt++))
fi
done
shift $shiftcnt
if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFINIDB_INSTALL_DIR/lib:$INFINIDB_INSTALL_DIR/mysql/lib/mysql
fi
export INFINIDB_INSTALL_DIR=$installdir
cloud=`$INFINIDB_INSTALL_DIR/bin/getConfig Installation Cloud`
if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then
cp $INFINIDB_INSTALL_DIR/local/etc/*.pem /root/. > /dev/null 2>&1
if test -f $INFINIDB_INSTALL_DIR/local/etc/pm1/fstab ; then
echo "Setup fstab on Module"
touch /etc/fstab
rm -f /etc/fstab.calpontSave
mv /etc/fstab /etc/fstab.calpontSave
cat $INFINIDB_INSTALL_DIR/local/etc/pm1/fstab >> /etc/fstab
fi
fi
test -f $INFINIDB_INSTALL_DIR/post/functions && . $INFINIDB_INSTALL_DIR/post/functions
mid=`module_id`
#if um, cloud, separate system type, external um storage, then setup mount
if [ $module = "um" ]; then
if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then
systemtype=`$INFINIDB_INSTALL_DIR/bin/getConfig Installation ServerTypeInstall`
if [ $systemtype = "1" ]; then
umstoragetype=`$INFINIDB_INSTALL_DIR/bin/getConfig Installation UMStorageType`
if [ $umstoragetype = "external" ]; then
echo "Setup UM Volume Mount"
device=`$INFINIDB_INSTALL_DIR/bin/getConfig Installation UMVolumeDeviceName$mid`
mkdir -p $INFINIDB_INSTALL_DIR/mysql/db > /dev/null 2>&1
mount $device $INFINIDB_INSTALL_DIR/mysql/db -t ext2 -o defaults
chown mysql:mysql -R $INFINIDB_INSTALL_DIR/mysql > /dev/null 2>&1
fi
fi
fi
fi
#if pm, create dbroot directories
if [ $module = "pm" ]; then
numdbroots=`$INFINIDB_INSTALL_DIR/bin/getConfig SystemConfig DBRootCount`
for (( id=1; id<$numdbroots+1; id++ )); do
mkdir -p $INFINIDB_INSTALL_DIR/data$id > /dev/null 2>&1
chmod 755 $INFINIDB_INSTALL_DIR/data$id
done
fi
echo "Setup rc.local on Module"
if [ $EUID -eq 0 -a -f $INFINIDB_INSTALL_DIR/local/rc.local.calpont ]; then
if [ $user = "root" ]; then
touch /etc/rc.local
rm -f /etc/rc.local.calpontSave
cp /etc/rc.local /etc/rc.local.calpontSave
cat $INFINIDB_INSTALL_DIR/local/rc.local.calpont >> /etc/rc.local
else
sudo touch /etc/rc.local
sudo rm -f /etc/rc.local.calpontSave
sudo cp /etc/rc.local /etc/rc.local.calpontSave
sudo cat $INFINIDB_INSTALL_DIR/local/rc.local.calpont >> /etc/rc.local
fi
fi
if [ $user != "root" ]; then
echo "Setup .bashrc on Module for non-root"
eval userhome=~$user
bashFile=$userhome/.bashrc
touch ${bashFile}
echo " " >> ${bashFile}
echo "export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR" >> ${bashFile}
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFINIDB_INSTALL_DIR/lib:$INFINIDB_INSTALL_DIR/mysql/lib/mysql" >> ${bashFile}
fi
plugin=`$INFINIDB_INSTALL_DIR/bin/getConfig SystemConfig DataFilePlugin`
if [ -n "$plugin" ]; then
echo "Setup .bashrc on Module for local-query"
setenv=`$INFINIDB_INSTALL_DIR/bin/getConfig SystemConfig DataFileEnvFile`
eval userhome=~$user
bashFile=$userhome/.bashrc
touch ${bashFile}
echo " " >> ${bashFile}
echo ". $INFINIDB_INSTALL_DIR/bin/$setenv" >> ${bashFile}
fi
# if mysqlrep is on and module has a my.cnf file, upgrade it
MySQLRep=`$INFINIDB_INSTALL_DIR/bin/getConfig Installation MySQLRep`
if [ $MySQLRep = "y" ]; then
if test -f $INFINIDB_INSTALL_DIR/mysql/my.cnf ; then
echo "Run Upgrade on my.cnf on Module"
$INFINIDB_INSTALL_DIR/bin/mycnfUpgrade > /tmp/mycnfUpgrade.log 2>&1
fi
fi
if test -f $INFINIDB_INSTALL_DIR/mysql/my.cnf ; then
echo "Run Mysql Port update on my.cnf on Module"
$INFINIDB_INSTALL_DIR/bin/mycnfUpgrade $mysqlPort > /tmp/mycnfUpgrade_port.log 2>&1
fi
# if um, run mysql install scripts
if [ $module = "um" ]; then
echo "Run post-mysqld-install"
$INFINIDB_INSTALL_DIR/bin/post-mysqld-install > /tmp/post-mysqld-install.log 2>&1
echo "Run post-mysql-install"
$INFINIDB_INSTALL_DIR/bin/post-mysql-install > /tmp/post-mysql-install.log 2>&1
fi
echo " "
echo "!!!Module Installation Successfully Completed!!!"
exit 0

View File

@ -101,14 +101,14 @@ chown -h $user.$user libjemalloc.so >/dev/null 2>&1
cd /
test -d /var/log/Calpont || mkdir /var/log/Calpont >/dev/null 2>&1
test -d /var/log/Calpont/archive || mkdir /var/log/Calpont/archive >/dev/null 2>&1
test -d /var/log/Calpont/corefiles || mkdir /var/log/Calpont/corefiles >/dev/null 2>&1
test -d /var/log/Calpont/trace || mkdir /var/log/Calpont/trace >/dev/null 2>&1
test -h /var/log/Calpont/data && rm -f /var/log/Calpont/data
test -d /var/log/Calpont/data || mkdir /var/log/Calpont/data >/dev/null 2>&1
test -d /var/log/Columnstore || mkdir /var/log/Columnstore >/dev/null 2>&1
test -d /var/log/Columnstore/archive || mkdir /var/log/Columnstore/archive >/dev/null 2>&1
test -d /var/log/Columnstore/corefiles || mkdir /var/log/Columnstore/corefiles >/dev/null 2>&1
test -d /var/log/Columnstore/trace || mkdir /var/log/Columnstore/trace >/dev/null 2>&1
test -h /var/log/Columnstore/data && rm -f /var/log/Columnstore/data
test -d /var/log/Columnstore/data || mkdir /var/log/Columnstore/data >/dev/null 2>&1
# make sure trace dir is world-writable and sticky
chmod 1755 /var/log/Calpont/trace >/dev/null 2>&1
chmod 1755 /var/log/Columnstore/trace >/dev/null 2>&1
test -d $installdir/data || mkdir $installdir/data
test -d $installdir/data1 || mkdir $installdir/data1
test -d $installdir/data1/systemFiles || mkdir $installdir/data1/systemFiles
@ -132,12 +132,12 @@ chmod -R 755 $installdir/data/bulk >/dev/null 2>&1
mkdir -p /tmp/infinidb_tmp_files >/dev/null 2>&1
#setup core file directory and link
mkdir /var/log/Calpont/corefiles > /dev/null 2>&1
chmod 755 /var/log/Calpont/corefiles > /dev/null 2>&1
mkdir /var/log/Columnstore/corefiles > /dev/null 2>&1
chmod 755 /var/log/Columnstore/corefiles > /dev/null 2>&1
#create mount directories
mkdir /mnt/tmp > /dev/null 2>&1
mkdir /var/log/Calpont/data/archive > /dev/null 2>&1
mkdir /var/log/Columnstore/data/archive > /dev/null 2>&1
# install Calpont Log Rotate File
test -d $installdir/mysql/db || mkdir -p $installdir/mysql/db
@ -169,9 +169,9 @@ else
sudo $installdir/bin/syslogSetup.sh --installdir=$installdir install > /tmp/syslog_install.log 2>&1
sudo chown $user:$user $installdir/etc/Calpont.xml
sudo chmod 755 /var/log
sudo chmod -R 755 /var/log/Calpont
sudo chmod -R 755 /var/log/Columnstore
sudo chmod -R 777 /dev/shm
sudo rm -f /var/lock/subsys/mysql-Calpont
sudo rm -f /var/lock/subsys/mysql-Columnstore
sudo rm -f /tmp/StopCalpont
sed -i -e s@/usr/local/MariaDB/Columnstore@$installdir@g $installdir/bin/infinidb.def

View File

@ -1,336 +0,0 @@
#!/bin/bash
#
# $Id: post-install 3705 2013-08-07 19:47:20Z dhill $
#
# Post-install steps for calpont install
prefix=/usr/local
installdir=$prefix/MariaDB/Columnstore
rpmmode=install
user=$USER
if [ -z "$user" ]; then
user=root
fi
quiet=0
for arg in "$@"; do
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
prefix="`echo $arg | awk -F= '{print $2}'`"
installdir=$prefix/MariaDB/Columnstore
elif [ `expr -- "$arg" : '--rpmmode='` -eq 10 ]; then
rpmmode="`echo $arg | awk -F= '{print $2}'`"
elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then
installdir="`echo $arg | awk -F= '{print $2}'`"
prefix=`dirname $installdir`
elif [ `expr -- "$arg" : '--user='` -eq 7 ]; then
user="`echo $arg | awk -F= '{print $2}'`"
elif [ `expr -- "$arg" : '--quiet'` -eq 7 ]; then
quiet=1
elif [ `expr -- "$arg" : '--plugin='` -eq 9 ]; then
plugin="`echo $arg | awk -F= '{print $2}'`"
else
echo "post-install: ignoring unknown argument: $arg" 1>&2
fi
done
if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then
export INFINIDB_INSTALL_DIR=$installdir
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib
else
# add library config file
/bin/cp -f $installdir/bin/infinidb.conf /etc/ld.so.conf.d/.
ldconfig
fi
#check 64-bit OS compatiable
arch=`uname -m`
patcnt=`expr "$arch" : 'i.86'`
is64bitos=1
if [ $patcnt -ne 0 ]; then
is64bitos=0
fi
is64bitpkg=1
file $installdir/bin/PrimProc | grep '64-bit' >/dev/null 2>&1
if [ $? -ne 0 ]; then
is64bitpkg=0
fi
if [ $is64bitpkg -eq 1 -a $is64bitos -ne 1 ]; then
echo "ERROR: Incompatiable Version, package is intended for a x86_64 architecture"
echo "exiting...."
exit 1
fi
if [ ! -f $installdir/etc/Calpont.xml ]; then
echo "$installdir/etc/Calpont.xml not found, exiting"
exit 1
fi
cd $installdir/lib || exit 1
for lib in *.so.1.0.0; do
blib=`basename $lib .1.0.0`
ln -sf $lib $blib
done
chown -h $user.$user *.so >/dev/null 2>&1
if [ -f libnetsnmp.so.5.2.1 ]; then
for lib in *.so.5.2.1; do
blib=`basename $lib .5.2.1`
ln -sf $lib $blib
ln -sf $lib ${blib}.5
done
chown -h $user.$user *.so *.so.5 >/dev/null 2>&1
fi
if [ -f libstdc++.so.6.0.14 ]; then
ln -sf libstdc++.so.6.0.14 libstdc++.so.6
chown -h $user.$user libstdc++.so.6 >/dev/null 2>&1
fi
ln -sf libjemalloc.so.3.3.0 libjemalloc.so
chown -h $user.$user libjemalloc.so >/dev/null 2>&1
# TODO-based on early experience with HDP it doesn't install bigtop
# so the code below will not correctly detect JAVA_HOME. Need to
# decide how to handle
# Autodetect JAVA_HOME if not defined
#if [ -e /usr/libexec/bigtop-detect-javahome ]; then
#. /usr/libexec/bigtop-detect-javahome
#elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
#. /usr/lib/bigtop-utils/bigtop-detect-javahome
#fi
#ln -sf $JAVA_HOME/jre/lib/amd64/server/libjvm.so
#chown -h $user.$user libjvm.so >/dev/null 2>&1
cd /
test -d /var/log/Calpont || mkdir /var/log/Calpont >/dev/null 2>&1
test -d /var/log/Calpont/archive || mkdir /var/log/Calpont/archive >/dev/null 2>&1
test -d /var/log/Calpont/corefiles || mkdir /var/log/Calpont/corefiles >/dev/null 2>&1
test -d /var/log/Calpont/trace || mkdir /var/log/Calpont/trace >/dev/null 2>&1
test -h /var/log/Calpont/data && rm -f /var/log/Calpont/data
test -d /var/log/Calpont/data || mkdir /var/log/Calpont/data >/dev/null 2>&1
# make sure trace dir is world-writable and sticky
chmod 1755 /var/log/Calpont/trace >/dev/null 2>&1
test -d $installdir/data || mkdir $installdir/data
test -d $installdir/data1 || mkdir $installdir/data1
test -d $installdir/data1/systemFiles || mkdir $installdir/data1/systemFiles
test -d $installdir/data1/systemFiles/dbrm || mkdir $installdir/data1/systemFiles/dbrm
test -d $installdir/data1/systemFiles/dataTransaction || rmdir $installdir/data1/systemFiles/dataTransaction >/dev/null 2>&1
test -d $installdir/data1/systemFiles/dataTransaction/archive || rmdir $installdir/data1/systemFiles/dataTransaction/archive >/dev/null 2>&1
chmod 1755 $installdir/data1 >/dev/null 2>&1
chmod -R 1755 $installdir/data1/systemFiles >/dev/null 2>&1
chmod 1755 $installdir/etc > /dev/null 2>&1
#create the bulk-load dirs
mkdir -p $installdir/data/bulk/data/import >/dev/null 2>&1
mkdir -p $installdir/data/bulk/log >/dev/null 2>&1
mkdir -p $installdir/data/bulk/job >/dev/null 2>&1
mkdir -p $installdir/data/bulk/rollback >/dev/null 2>&1
mkdir -p $installdir/data/bulk/tmpjob >/dev/null 2>&1
rm -f $installdir/data/bulk/tmpjob/* >/dev/null 2>&1
chmod -R 755 $installdir/data/bulk >/dev/null 2>&1
#create infinidb temp file directory
mkdir -p /tmp/infinidb_tmp_files >/dev/null 2>&1
#setup core file directory and link
mkdir /var/log/Calpont/corefiles > /dev/null 2>&1
chmod 755 /var/log/Calpont/corefiles > /dev/null 2>&1
#create mount directories
mkdir /mnt/tmp > /dev/null 2>&1
mkdir /var/log/Calpont/data/archive > /dev/null 2>&1
# install Calpont Log Rotate File
test -d $installdir/mysql/db || mkdir -p $installdir/mysql/db
cp $installdir/bin/calpontLogRotate /etc/logrotate.d/calpont > /dev/null 2>&1
rm -rf $installdir/mysql/db/infinidb_log_archive > /dev/null 2>&1
# delete Calpont shared memory segments
$installdir/bin/Calpont/bin/clearShm > /dev/null 2>&1
#setup the infinidb service script
rm -f /etc/init.d/infinidb >/dev/null 2>&1
cp $installdir/bin/infinidb /etc/init.d >/dev/null 2>&1
if [ -x /sbin/chkconfig ]; then
/sbin/chkconfig --add infinidb > /dev/null 2>&1
/sbin/chkconfig infinidb on > /dev/null 2>&1
elif [ -x /usr/sbin/update-rc.d ]; then
/usr/sbin/update-rc.d infinidb defaults 99 > /dev/null 2>&1
else
echo ""
echo "Package 'chkconfig' or 'update-rc.d' not installed, contact your sysadmin if you want to setup to autostart for infinidb"
fi
#setup InfiniDB system logging
if [ $user = "root" ]; then
$installdir/bin/syslogSetup.sh install > /tmp/syslog_install.log 2>&1
chmod 777 -R /dev/shm
rm -f /etc/default/infinidb
else
sudo $installdir/bin/syslogSetup.sh --installdir=$installdir install > /tmp/syslog_install.log 2>&1
sudo chown $user:$user $installdir/etc/Calpont.xml
sudo chmod 755 /var/log
sudo chmod -R 755 /var/log/Calpont
sudo chmod -R 777 /dev/shm
sudo rm -f /var/lock/subsys/mysql-Calpont
sudo rm -f /tmp/StopCalpont
sed -i -e s@/usr/local/MariaDB/Columnstore@$installdir@g $installdir/bin/infinidb.def
sudo cp $installdir/bin/infinidb.def /etc/default/infinidb
fi
#check if InfiniDB system logging was setup
cat /tmp/syslog_install.log | grep 'No System Logging' >/dev/null 2>&1
if [ $? -eq 0 ]; then
cat /tmp/syslog_install.log
fi
#setup alias commands
eval userhome=~$user
bashFile=$userhome/.bashrc
touch ${bashFile}
if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then
sed -i -e s@/usr/local/MariaDB/Columnstore@$installdir@g $installdir/bin/calpontAlias
fi
egrep -qs 'Calpont Database Platform Alias Commands' ${bashFile}
rc1=$?
egrep -qs 'InfiniDB Alias Commands' ${bashFile}
rc2=$?
if [ $rc1 -ne 0 -a $rc2 -ne 0 ]; then
rm -f ${bashFile}.calpontSave
cp ${bashFile} ${bashFile}.calpontSave >/dev/null 2>&1
cat $installdir/bin/calpontAlias >> ${bashFile}
echo " " >> ${bashFile}
fi
#check and get amazon EC2 env variables
if [ -n "$EC2_HOME" ]; then
$installdir/bin/setConfig -d Installation EC2_HOME $EC2_HOME
if [ -n "$EC2_HOME" ]; then
$installdir/bin/setConfig -d Installation JAVA_HOME $JAVA_HOME
fi
$installdir/bin/setConfig -d Installation EC2_PATH $PATH:/home/ec2/bin:/opt/aws/bin
fi
#log install message
test -f $installdir/post/functions && . $installdir/post/functions
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib $installdir/bin/cplogger -i 19 "***** InfiniDB Installed *****"
#setup hadoop
hadoop=`which hadoop 2>/dev/null`
if [ -z $hadoop ]; then
#check for non-root user
if [ $installdir != "/usr/local/MariaDB/Columnstore" -a $quiet -eq 0 ]; then
cat <<EOD
The next steps are:
export INFINIDB_INSTALL_DIR=$installdir
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib:$installdir/mysql/lib/mysql
$installdir/bin/postConfigure -i $installdir
EOD
else
cat <<EOD
The next step is:
$installdir/bin/postConfigure
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 > /tmp/hdfs-20-test.log 2>&1
if [ $? -eq 0 ]; then
#Passed set in config file
$installdir/bin/setConfig -d SystemConfig DataFilePlugin $installdir/lib/hdfs-20.so
$installdir/bin/setConfig -d SystemConfig DataFileEnvFile setenv-hdfs-20
#check for non-root user
if [ $installdir != "/usr/local/MariaDB/Columnstore" -a $quiet -eq 0 ]; then
cat <<EOD
If you are intending to install InfiniDB over Hadoop, the next steps are:
export INFINIDB_INSTALL_DIR=$installdir
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib:$installdir/mysql/lib/mysql
. $installdir/bin/setenv-hdfs-20
$installdir/bin/postConfigure -i $installdir
If you are intending to install InfiniDB without Hadoop, the next steps are:
export INFINIDB_INSTALL_DIR=$installdir
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib:$installdir/mysql/lib/mysql
$installdir/bin/postConfigure -i $installdir
EOD
else
cat <<EOD
If you are intending to install InfiniDB over Hadoop, the next steps are:
. $installdir/bin/setenv-hdfs-20
$installdir/bin/postConfigure
If you are intending to install InfiniDB without Hadoop, the next step is:
$installdir/bin/postConfigure
EOD
fi
else
. $installdir/bin/setenv-hdfs-12
$installdir/bin/hdfsCheck $installdir/lib/hdfs-12.so > /tmp/hdfs-12-test.log 2>&1
if [ $? -eq 0 ]; then
#Passed set in config file
$installdir/bin/setConfig -d SystemConfig DataFilePlugin $installdir/lib/hdfs-12.so
$installdir/bin/setConfig -d SystemConfig DataFileEnvFile setenv-hdfs-12
if [ $installdir != "/usr/local/MariaDB/Columnstore" -a $quiet -eq 0 ]; then
cat <<EOD
If you are intending to install InfiniDB over Hadoop, the next steps are:
export INFINIDB_INSTALL_DIR=$installdir
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib:$installdir/mysql/lib/mysql:$libpath
. $installdir/bin/setenv-hdfs-12
$installdir/bin/postConfigure -i $installdir
If you are intending to install InfiniDB without Hadoop, the next steps are:
export INFINIDB_INSTALL_DIR=$installdir
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib:$installdir/mysql/lib/mysql
$installdir/bin/postConfigure -i $installdir
EOD
else
cat <<EOD
If you are intending to install InfiniDB over Hadoop, the next steps are:
. $installdir/bin/setenv-hdfs-12
$installdir/bin/postConfigure
If you are intending to install InfiniDB without Hadoop, the next step is:
$installdir/bin/postConfigure
EOD
fi
else
cat <<EOD
If you are intending to install InfiniDB 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 InfiniDB Customer Support.
EOD
fi
fi
fi
exit 0

View File

@ -13,7 +13,7 @@ checkForError() {
if [ $? -ne 0 ]; then
echo "MySQL Password missing or incorrect"
rm -f /tmp/error.check
$installdir/mysql/mysql-Calpont stop
$installdir/mysql/mysql-Columnstore stop
sleep 2
exit 2;
fi
@ -93,12 +93,12 @@ if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then
sed -i -e s@/usr/local/MariaDB/Columnstore@$installdir@g $installdir/mysql/my.cnf
fi
if [ -x $installdir/mysql/mysql-Calpont ]; then
if [ -x $installdir/mysql/mysql-Columnstore ]; then
# Restart in the same way that mysqld will be started normally.
$installdir/mysql/mysql-Calpont stop >/dev/null 2>&1
$installdir/mysql/mysql-Columnstore stop >/dev/null 2>&1
sleep 2
$installdir/mysql/mysql-Calpont start
$installdir/mysql/mysql-Columnstore start
sleep 5
@ -111,13 +111,13 @@ if [ -x $installdir/mysql/mysql-Calpont ]; then
checkForError
if [ $? -ne 0 ]; then
echo "ERROR: missing or invalid password, or InfiniDB plugin install missing"
$installdir/mysql/mysql-Calpont stop
$installdir/mysql/mysql-Columnstore stop
sleep 2
exit 1;
fi
fi
$installdir/mysql/mysql-Calpont stop
$installdir/mysql/mysql-Columnstore stop
fi
exit 0

View File

@ -79,7 +79,7 @@ chmod -R og-rw $mysql_datadir/mysql
# Change permissions again to fix any new files.
chown -R $user.$user $installdir/mysql
test -e /etc/init.d/mysql-Calpont || cp $installdir/mysql/mysql-Calpont /etc/init.d >/dev/null 2>&1
test -e /etc/init.d/mysql-Columnstore || cp $installdir/mysql/mysql-Columnstore /etc/init.d >/dev/null 2>&1
if [ -f $installdir/lib/libcalmysql.so.1.0.0 ]; then
libcalmysql=$installdir/lib/libcalmysql.so.1.0.0

Some files were not shown because too many files have changed in this diff Show More