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