1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-12-24 14:20:59 +03:00
This commit is contained in:
david hill
2017-06-22 17:14:40 -05:00
parent f709a00b81
commit 1a387ce5e6
5 changed files with 24 additions and 390 deletions

View File

@@ -197,152 +197,3 @@ if { $INSTALLTYPE == "initial" } {
send_user "\nInstallation Successfully Completed on '$MODULE'\n"
exit 0
sleep 10
#
if { $INSTALLTYPE == "initial" || $INSTALLTYPE == "nonDistribute" } {
#
# copy over calpont config file
#
send_user "Copy MariaDB Columnstore 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 MariaDB Columnstore 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'\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"
}
}
send_user "\nInstallation Successfully Completed on '$MODULE'\n"
exit 0

View File

@@ -56,10 +56,9 @@ if [ "x$has_um" = x ]; then
has_um=0
fi
user=root
user=`whoami 2>/dev/null`
SUDO=" "
if [ "$USER" != "root" ]; then
user=$USER
if [ $user != "root" ]; then
SUDO="sudo "
fi

View File

@@ -231,105 +231,5 @@ if { $INSTALLTYPE == "initial" } {
send_user "\nInstallation Successfully Completed on '$MODULE'\n"
exit 0
set timeout 30
#expect -re {[$#] }
if { $INSTALLTYPE == "initial"} {
#
# copy over MariaDB Columnstore config file
#
send_user "Copy MariaDB Columnstore 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 MariaDB Columnstore OS files
#
send_user "Copy MariaDB Columnstore 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 }
"WARNING" { send_user "WARNING: SYSLOG setup failed\n" }
}
send_user "\n"
}
#
# check MariaDB Columnstore syslog functionality
#
#
send_user "\nInstallation Successfully Completed on '$MODULE'\n"
exit 0
# vim:ts=4 sw=4:

View File

@@ -233,107 +233,6 @@ if { $INSTALLTYPE == "initial" } {
}
}
send_user "\nInstallation Successfully Completed on '$MODULE'\n"
exit 0
#
if { $INSTALLTYPE == "initial"} {
#
# copy over MariaDB Columnstore config file
#
send_user "Copy MariaDB Columnstore 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 MariaDB Columnstore OS files
#
send_user "Copy MariaDB Columnstore 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" }
"ERROR" { send_user "ERROR: check /tmp logs\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 }
"WARNING" { send_user "WARNING: SYSLOG setup failed\n" }
}
send_user "\n"
set timeout 30
#expect -re {[$#] }
}
send_user "\nInstallation Successfully Completed on '$MODULE'\n"
exit 0
# vim:ts=4 sw=4:

View File

@@ -165,46 +165,30 @@ int main(int argc, char **argv)
sleep(1);
MonitorConfig config;
//get Distributed Install
// string DistributedInstall = "y";
//PMwithUM config
try {
oam.getSystemConfig( "PMwithUM", PMwithUM);
}
catch(...) {
PMwithUM = "n";
}
// try
// {
// oam.getSystemConfig("DistributedInstall", DistributedInstall);
// }
// catch (...)
// {
// log.writeLog(__LINE__, "addModule - ERROR: get DistributedInstall", LOG_TYPE_ERROR);
// }
string modType = config.moduleType();
if ( ( config.ServerInstallType() == oam::INSTALL_COMBINE_DM_UM_PM ) ||
( PMwithUM == "y") )
modType = "um";
//run the module install script
string cmd = startup::StartUp::installDir() + "/bin/module_installer.sh " + " --installdir=" + startup::StartUp::installDir() + " --module=" + modType + " > /dev/null 2>&1";
log.writeLog(__LINE__, "run module_installer.sh", LOG_TYPE_DEBUG);
log.writeLog(__LINE__, cmd, LOG_TYPE_DEBUG);
//check for a non-distrubuted install setup
// if ( DistributedInstall == "n" )
// {
//PMwithUM config
try {
oam.getSystemConfig( "PMwithUM", PMwithUM);
}
catch(...) {
PMwithUM = "n";
}
system(cmd.c_str());
string modType = config.moduleType();
if ( ( config.ServerInstallType() == oam::INSTALL_COMBINE_DM_UM_PM ) ||
( PMwithUM == "y") )
modType = "um";
//run the module install script
string cmd = startup::StartUp::installDir() + "/bin/module_installer.sh " + " --installdir=" + startup::StartUp::installDir() + " --module=" + modType + " > /dev/null 2>&1";
log.writeLog(__LINE__, "run module_installer.sh", LOG_TYPE_DEBUG);
log.writeLog(__LINE__, cmd, LOG_TYPE_DEBUG);
//exit to allow ProcMon to restart in a setup state
log.writeLog(__LINE__, "restarting for a initial setup", LOG_TYPE_DEBUG);
system(cmd.c_str());
//exit to allow ProcMon to restart in a setup state
log.writeLog(__LINE__, "restarting for a non-distrubuted install", LOG_TYPE_DEBUG);
exit (0);
// }
exit (0);
}
//define entry if missing
@@ -529,7 +513,8 @@ int main(int argc, char **argv)
oam.getSystemStatus(systemstatus, false);
}
catch(...)
{}
{
}
// determine Standby OAM Module, if needed
if ( gOAMParentModuleFlag &&