You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-30 14:21:11 +03:00
mCOL-522 changes
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
# 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 6 - Install Type, "initial", "upgrade", "uninstall", "nonDistribute"
|
||||
# Argument 7 - Server type?
|
||||
# Argument 8 - Debug flag 1 for on, 0 for off
|
||||
# Argument 9 - install dir (optional)
|
||||
@@ -78,64 +78,68 @@ if { $INSTALLTYPE == "initial" || $INSTALLTYPE == "uninstall" } {
|
||||
}
|
||||
send_user "\n"
|
||||
}
|
||||
|
||||
if { $INSTALLTYPE == "uninstall" } {
|
||||
exit 0
|
||||
}
|
||||
sleep 10
|
||||
#
|
||||
# send the MariaDB Columnstore package
|
||||
#
|
||||
send_user "Copy New MariaDB Columnstore 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 MariaDB Columnstore 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" }
|
||||
|
||||
if { $INSTALLTYPE == "initial" } {
|
||||
#
|
||||
# send the MariaDB Columnstore package
|
||||
#
|
||||
send_user "Copy New MariaDB Columnstore 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 MariaDB Columnstore 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 MariaDB Columnstore/releasenum to complete
|
||||
sleep 5
|
||||
}
|
||||
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 MariaDB Columnstore/releasenum to complete
|
||||
sleep 5
|
||||
|
||||
send_user "\n"
|
||||
send_user "Run post-install script "
|
||||
@@ -150,6 +154,7 @@ expect {
|
||||
set timeout 60
|
||||
# check return
|
||||
expect {
|
||||
"No such file" { send_user "ERROR: post-install Not Found\n" ; exit 1 }
|
||||
"MariaDB Columnstore syslog logging not working" { send_user "ERROR: MariaDB Columnstore System logging not setup\n" ; exit 1 }
|
||||
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
|
||||
"Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1}
|
||||
@@ -161,7 +166,7 @@ expect {
|
||||
send_user "\n"
|
||||
sleep 10
|
||||
#
|
||||
if { $INSTALLTYPE == "initial"} {
|
||||
if { $INSTALLTYPE == "initial" || $INSTALLTYPE == "nonDistribute" } {
|
||||
#
|
||||
# copy over calpont config file
|
||||
#
|
||||
|
@@ -58,9 +58,11 @@ expect {
|
||||
}
|
||||
"word: " { send "$PASSWORD\n" }
|
||||
"passphrase" { send "$PASSWORD\n" }
|
||||
"No such file" { send_user "FAILED: File doesn't exist\n" ; exit 1}
|
||||
-re {[$#] } { exit 0 }
|
||||
}
|
||||
expect {
|
||||
"No such file" { send_user "FAILED: File doesn't exist\n" ; exit 1}
|
||||
-re {[$#>] } { exit 0 }
|
||||
"Permission denied" { send_user " FAILED: Invalid password\n" ; exit 1 }
|
||||
"(y or n)" { send "y\n"
|
||||
|
@@ -2758,6 +2758,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
string version = systemsoftware.Version + "-" + systemsoftware.Release;
|
||||
|
||||
string installType = "initial";
|
||||
if ( !nonDistribute )
|
||||
{
|
||||
if ( EEPackageType == "rpm" )
|
||||
@@ -2792,6 +2793,12 @@ int main(int argc, char *argv[])
|
||||
if( !pkgCheck(columnstorePackage) )
|
||||
exit(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
EEPackageType = "binary";
|
||||
installType = "nonDistribute";
|
||||
columnstorePackage = HOME + "/" + "mariadb-columnstore-" + version + "*.bin.tar.gz";
|
||||
}
|
||||
|
||||
if ( password.empty() )
|
||||
{
|
||||
@@ -2885,18 +2892,15 @@ int main(int argc, char *argv[])
|
||||
cout << endl << "----- Performing Install Check on '" + remoteModuleName + " / " + remoteHostName + "' -----" << endl << endl;
|
||||
|
||||
//check of releasenum file exist, which shows package is installed
|
||||
string cmd = installDir + "/bin/remote_command.sh " + remoteModuleIP + " " + password + " 'ls" + installDir + "/releasenum' < /tmp/releasenum_check.log";
|
||||
string cmd = installDir + "/bin/remote_command.sh " + remoteModuleIP + " " + password + " 'ls " + installDir + "/bin/post-install' > /tmp/install_check.log";
|
||||
int rtnCode = system(cmd.c_str());
|
||||
if (WEXITSTATUS(rtnCode) != 0) {
|
||||
cout << endl << "Error MariaDB-ColumnStore packages not installed on " + remoteModuleName + " / " + remoteHostName << endl;
|
||||
cout << endl << "Error: MariaDB ColumnStore not installed on " + remoteModuleName + " / " + remoteHostName << endl;
|
||||
cout << "Install and re-run postConfigure. Exiting..." << endl << endl;
|
||||
exit(1);
|
||||
}
|
||||
else
|
||||
cout << endl << "MariaDB-ColumnStore packages installed" << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << endl << "----- Performing Install on '" + remoteModuleName + " / " + remoteHostName + "' -----" << endl << endl;
|
||||
|
||||
if ( remote_installer_debug == "1" )
|
||||
@@ -2910,7 +2914,6 @@ int main(int argc, char *argv[])
|
||||
//run remote installer script
|
||||
cmd = installDir + "/bin/user_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " + password + " " + version + " initial " + EEPackageType + " " + nodeps + " " + temppwprompt + " " + mysqlPort + " " + remote_installer_debug + " " + debug_logfile;
|
||||
|
||||
//cout << cmd << endl;
|
||||
if ( thread_remote_installer ) {
|
||||
thr_data[thread_id].command = cmd;
|
||||
|
||||
@@ -3015,12 +3018,9 @@ int main(int argc, char *argv[])
|
||||
if ( pmwithum )
|
||||
binservertype = "pmwithum";
|
||||
|
||||
//check my.cnf port in-user on remote node
|
||||
// checkRemoteMysqlPort(remoteModuleIP, remoteModuleName, USER, password, mysqlPort, sysConfig);
|
||||
|
||||
cmd = installDir + "/bin/binary_installer.sh " + remoteModuleName + " " +
|
||||
remoteModuleIP + " " + password + " " + columnstorePackage + " " + remoteModuleType +
|
||||
" initial " + binservertype + " " + mysqlPort + " " + remote_installer_debug +
|
||||
" " + installType + " " + binservertype + " " + mysqlPort + " " + remote_installer_debug +
|
||||
" " + installDir + " " + debug_logfile;
|
||||
|
||||
if ( thread_remote_installer ) {
|
||||
@@ -3045,7 +3045,6 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3057,19 +3056,16 @@ int main(int argc, char *argv[])
|
||||
cout << endl << "----- Performing Install Check on '" + remoteModuleName + " / " + remoteHostName + "' -----" << endl << endl;
|
||||
|
||||
//check of releasenum file exist, which shows package is installed
|
||||
string cmd = installDir + "/bin/remote_command.sh " + remoteModuleIP + " " + password + " 'ls" + installDir + "/releasenum' < /tmp/releasenum_check.log";
|
||||
string cmd = installDir + "/bin/remote_command.sh " + remoteModuleIP + " " + password + " 'ls " + installDir + "/bin/post-install' > /tmp/install_check.log";
|
||||
int rtnCode = system(cmd.c_str());
|
||||
if (WEXITSTATUS(rtnCode) != 0) {
|
||||
cout << endl << "Error MariaDB-ColumnStore packages not installed on " + remoteModuleName + " / " + remoteHostName << endl;
|
||||
cout << endl << "Error: MariaDB ColumnStore not installed on " + remoteModuleName + " / " + remoteHostName << endl;
|
||||
cout << "Install and re-run postConfigure. Exiting..." << endl << endl;
|
||||
exit(1);
|
||||
}
|
||||
else
|
||||
cout << endl << "MariaDB-ColumnStore packages installed" << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << endl << "----- Performing Install on '" + remoteModuleName + " / " + remoteHostName + "' -----" << endl << endl;
|
||||
else
|
||||
cout << endl << "----- Performing Install on '" + remoteModuleName + " / " + remoteHostName + "' -----" << endl << endl;
|
||||
|
||||
if ( remote_installer_debug == "1" )
|
||||
cout << "Install log file is located here: " + logfile << endl << endl;
|
||||
@@ -3078,7 +3074,6 @@ int main(int argc, char *argv[])
|
||||
//run remote installer script
|
||||
cmd = installDir + "/bin/performance_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " + password + " " + version + " initial " + EEPackageType + " " + nodeps + " " + remote_installer_debug + " " + debug_logfile;
|
||||
|
||||
//cout << cmd << endl;
|
||||
if ( thread_remote_installer ) {
|
||||
thr_data[thread_id].command = cmd;
|
||||
|
||||
@@ -3107,7 +3102,7 @@ int main(int argc, char *argv[])
|
||||
if ( pmwithum )
|
||||
binservertype = "pmwithum";
|
||||
cmd = installDir + "/bin/binary_installer.sh " + remoteModuleName + " " + remoteModuleIP +
|
||||
" " + password + " " + columnstorePackage + " " + remoteModuleType + " initial " +
|
||||
" " + password + " " + columnstorePackage + " " + remoteModuleType + " " + installType + " " +
|
||||
binservertype + " " + mysqlPort + " " + remote_installer_debug + " " + installDir + " " +
|
||||
debug_logfile;
|
||||
|
||||
@@ -3133,12 +3128,11 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( thread_remote_installer && !nonDistribute ) {
|
||||
if ( thread_remote_installer ) {
|
||||
|
||||
//wait until remove install Thread Count is at zero or hit timeout
|
||||
cout << endl << "MariaDB ColumnStore Package being installed, please wait ...";
|
||||
|
Reference in New Issue
Block a user