1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-10-31 18:30:33 +03:00

MCOL-750 - fix install failures - timing issues

This commit is contained in:
david hill
2017-08-10 17:00:59 -05:00
parent 76fb89c13f
commit 7ec0a27a12
7 changed files with 387 additions and 127 deletions

View File

@@ -7,8 +7,7 @@ install(PROGRAMS post-install
transactionLogArchiver.sh transactionLogArchiver.sh
module_installer.sh module_installer.sh
startupTests.sh startupTests.sh
user_installer.sh package_installer.sh
performance_installer.sh
remote_scp_get.sh remote_scp_get.sh
columnstoreAlias columnstoreAlias
run.sh run.sh

View File

@@ -72,7 +72,7 @@ send_user "\n"
send_user "Stop ColumnStore service " send_user "Stop ColumnStore service "
send date\n send date\n
send "ssh -v $USERNAME@$SERVER '$INSTALLDIR/bin/columnstore stop'\n" send "ssh -v $USERNAME@$SERVER '$INSTALLDIR/bin/columnstore stop'\n"
set timeout 10 set timeout 30
expect { expect {
"word: " { send "$PASSWORD\n" } "word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" } "passphrase" { send "$PASSWORD\n" }
@@ -82,8 +82,6 @@ set timeout 60
expect { expect {
"Exit status 0" { send_user "DONE" } "Exit status 0" { send_user "DONE" }
"No such file" { send_user "ERROR: post-install Not Found\n" ; exit 1 } "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} "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 refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 } "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
@@ -91,96 +89,93 @@ expect {
} }
send_user "\n" send_user "\n"
#
# remove MariaDB Columnstore files
#
send_user "Uninstall MariaDB Columnstore Package "
send " \n"
send date\n
send "ssh -v $USERNAME@$SERVER '$INSTALLDIR/bin/pre-uninstall --installdir=$INSTALLDIR >/dev/null 2>&1'\n"
set timeout 30
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\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}
"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 }
"MariaDB Columnstore uninstall completed" { send_user "DONE" }
"Exit status 0" { send_user "DONE" }
}
send_user "\n"
if { $INSTALLTYPE == "initial" || $INSTALLTYPE == "uninstall" } { if { $INSTALLTYPE == "uninstall" } { exit 0 }
#
# remove MariaDB Columnstore files # needed for some reason, if not here the 'columnstore start' will run before the package is installed
# sleep 60
send_user "Uninstall MariaDB Columnstore Package "
send " \n" #
send date\n # send the MariaDB Columnstore package
send "ssh -v $USERNAME@$SERVER '$INSTALLDIR/bin/pre-uninstall --installdir=$INSTALLDIR >/dev/null 2>&1'\n" #
set timeout 10 send_user "Copy New MariaDB Columnstore Package to Module "
expect { send " \n"
"word: " { send "$PASSWORD\n" } send date\n
"passphrase" { send "$PASSWORD\n" } send "scp -v $CALPONTPKG $USERNAME@$SERVER:$CALPONTPKG\n"
} set timeout 30
set timeout 20 expect {
expect { "word: " { send "$PASSWORD\n" }
"Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit 1} "passphrase" { send "$PASSWORD\n" }
"service not known" { send_user "FAILED: Invalid Host\n" ; exit 1} }
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 } set timeout 120
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 } expect {
"MariaDB Columnstore uninstall completed" { send_user "DONE" } "Exit status 0" { send_user "DONE" }
"Exit status 0" { send_user "DONE" } "100%" { send_user "DONE" }
} "scp :" { send_user "ERROR\n" ;
send_user "\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"
#
# install package
#
send_user "Install MariaDB Columnstore Package on Module "
send " \n"
send date\n
send "ssh -v $USERNAME@$SERVER 'tar -C $PREFIX --exclude db -zxf $CALPONTPKG'\n"
set timeout 30
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
set timeout 120
expect {
"Exit status 0" { 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 }
} }
if { $INSTALLTYPE == "uninstall" } {
exit 0
}
if { $INSTALLTYPE == "initial" } {
#
# send the MariaDB Columnstore package
#
send_user "Copy New MariaDB Columnstore Package to Module "
send " \n"
send date\n
send "scp -v $CALPONTPKG $USERNAME@$SERVER:$CALPONTPKG\n"
set timeout 10
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
set timeout 120
expect {
"Exit status 0" { send_user "DONE" }
"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"
#
# install package
#
send_user "Install MariaDB Columnstore Package on Module "
send " \n"
send date\n
send "ssh -v $USERNAME@$SERVER 'tar -C $PREFIX --exclude db -zxf $CALPONTPKG'\n"
set timeout 10
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
set timeout 120
expect {
"Exit status 0" { 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 }
}
}
send_user "\n" send_user "\n"
send_user "Run post-install script " send_user "Run post-install script "
send " \n" send " \n"
send date\n send date\n
send "ssh -v $USERNAME@$SERVER '$INSTALLDIR/bin/post-install --installdir=$INSTALLDIR'\n" send "ssh -v $USERNAME@$SERVER '$INSTALLDIR/bin/post-install --installdir=$INSTALLDIR'\n"
set timeout 10 set timeout 30
expect { expect {
"word: " { send "$PASSWORD\n" } "word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" } "passphrase" { send "$PASSWORD\n" }
@@ -197,13 +192,16 @@ expect {
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 } "No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
"columnstore start" { send_user "DONE" } "columnstore start" { send_user "DONE" }
} }
send_user "\n" send_user "\n"
# needed for some reason, if not here the 'columnstore start' will run before the package is installed
sleep 30
send_user "Start ColumnStore service " send_user "Start ColumnStore service "
send " \n" send " \n"
send date\n send date\n
send "ssh -v $USERNAME@$SERVER '$INSTALLDIR/bin/columnstore restart'\n" send "ssh -v $USERNAME@$SERVER '$INSTALLDIR/bin/columnstore restart'\n"
set timeout 10 set timeout 30
expect { expect {
"word: " { send "$PASSWORD\n" } "word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" } "passphrase" { send "$PASSWORD\n" }
@@ -231,7 +229,7 @@ if { $AMAZONINSTALL == "1" } {
send " \n" send " \n"
send date\n send date\n
send "scp -v -r $INSTALLDIR/local/etc $USERNAME@$SERVER:$INSTALLDIR/local\n" send "scp -v -r $INSTALLDIR/local/etc $USERNAME@$SERVER:$INSTALLDIR/local\n"
set timeout 10 set timeout 30
expect { expect {
"word: " { send "$PASSWORD\n" } "word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" } "passphrase" { send "$PASSWORD\n" }

View File

@@ -0,0 +1,266 @@
#!/usr/bin/expect
#
# $Id: package_installer.sh 1128 2009-01-05 16:36:59Z rdempsey $
#
# Install RPM and custom OS files on system
# Argument 1 - Remote Module Name
# Argument 2 - Remote Server Host Name or IP address
# Argument 3 - Root Password of remote server
# Argument 4 - Package name being installed
# Argument 5 - Install Type, "initial" or "upgrade"
# Argument 6 - Debug flag 1 for on, 0 for off
set timeout 30
set USERNAME root
set MODULE [lindex $argv 0]
set SERVER [lindex $argv 1]
set PASSWORD [lindex $argv 2]
set VERSION [lindex $argv 3]
set INSTALLTYPE [lindex $argv 4]
set AMAZONINSTALL [lindex $argv 5]
set PKGTYPE [lindex $argv 6]
set NODEPS [lindex $argv 7]
set DEBUG [lindex $argv 8]
set INSTALLDIR "/usr/local/mariadb/columnstore"
set IDIR [lindex $argv 9]
if { $IDIR != "" } {
set INSTALLDIR $IDIR
}
set USERNAME "root"
set UNM [lindex $argv 10]
if { $UNM != "" } {
set USERNAME $UNM
}
set BASH "/bin/bash "
#if { $DEBUG == "1" } {
# set BASH "/bin/bash -x "
#}
set HOME "$env(HOME)"
log_user $DEBUG
spawn -noecho /bin/bash
#
if { $PKGTYPE == "rpm" } {
set PKGERASE "rpm -e --nodeps \$(rpm -qa | grep '^mariadb-columnstore')"
set PKGERASE1 "rpm -e --nodeps "
set PKGINSTALL "rpm -ivh $NODEPS --force mariadb-columnstore*$VERSION*rpm"
set PKGUPGRADE "rpm -Uvh --noscripts mariadb-columnstore*$VERSION*rpm"
} else {
if { $PKGTYPE == "deb" } {
set PKGERASE "dpkg -P \$(dpkg --get-selections | grep '^mariadb-columnstore')"
set PKGERASE1 "dpkg -P "
set PKGINSTALL "dpkg -i --force-confnew mariadb-columnstore*$VERSION*deb"
set PKGUPGRADE "dpkg -i --force-confnew mariadb-columnstore*$VERSION*deb"
} else {
if { $PKGTYPE != "bin" } {
send_user "Invalid Package Type of $PKGTYPE"
exit 1
}
}
}
# check and see if remote server has ssh keys setup, set PASSWORD if so
send_user " "
send "ssh -v $USERNAME@$SERVER 'time'\n"
set timeout 20
expect {
"Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit 1 }
"service not known" { send_user "FAILED: Invalid Host\n" ; exit 1 }
"authenticity" { send "yes\n"
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
}
"sys" { set PASSWORD "ssh" }
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
timeout { send_user "ERROR: Timeout to host\n" ; exit 1 }
"Exit status 0" { send_user "DONE" }
}
send_user "\n"
send_user "Stop ColumnStore service "
send date\n
send "ssh -v $USERNAME@$SERVER '$INSTALLDIR/bin/columnstore stop'\n"
set timeout 30
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
set timeout 60
# check return
expect {
"Exit status 0" { 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 }
timeout { send_user "TIMEOUT: Continue" }
}
send_user "\n"
# needed for some reason, if not here the 'columnstore start' will run before the package is installed
sleep 60
#
# erase package
#
send_user "Erase MariaDB Columnstore Packages on Module "
send "ssh -v $USERNAME@$SERVER '$PKGERASE '\n"
if { $PASSWORD != "ssh" } {
set timeout 30
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
}
set timeout 120
expect {
"error: --purge needs at least one package" { send_user "DONE" }
"error: Failed dependencies" { send_user "ERROR: Failed dependencies\n" ; exit 1 }
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
"Exit status 0" { send_user "DONE" }
timeout { send_user "TIMEOUT: Continue" }
}
send_user "\n"
if { $INSTALLTYPE == "uninstall" } { exit 0 }
#
# send the package
#
send_user "Copy New MariaDB Columnstore Package to Module "
send "ssh -v $USERNAME@$SERVER 'rm -f /root/mariadb-columnstore-*.$PKGTYPE'\n"
if { $PASSWORD != "ssh" } {
set timeout 30
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
}
set timeout 30
expect {
"Exit status 0" { send_user "DONE" }
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
timeout { send_user "TIMEOUT: Continue" }
}
send_user "\n"
send "scp -v $HOME/mariadb-columnstore*$VERSION*$PKGTYPE $USERNAME@$SERVER:.\n"
if { $PASSWORD != "ssh"} {
set timeout 30
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
}
set timeout 180
expect {
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
"Exit status 0" { send_user "DONE" }
"Exit status 1" { send_user "ERROR: scp failed" ; exit 1 }
timeout { send_user "TIMEOUT: Continue" }
}
send_user "\n"
#
# install package
#
send_user "Install MariaDB Columnstore Packages on Module "
send "ssh -v $USERNAME@$SERVER '$PKGINSTALL '\n"
if { $PASSWORD != "ssh" } {
set timeout 30
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
}
set timeout 180
expect {
"error: Failed dependencies" { send_user "ERROR: Failed dependencies\n" ;
send_user "\n*** Installation ERROR\n" ;
exit 1 }
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
"needs" { send_user "ERROR: disk space issue\n" ; exit 1 }
"conflicts" { send_user "ERROR: File Conflict issue\n" ; exit 1 }
"Exit status 0" { send_user "DONE" }
"Exit status 1" { send_user "ERROR: install failed" ; exit 1 }
timeout { send_user "TIMEOUT: Continue" }
}
send_user "\n"
# needed for some reason, if not here the 'columnstore start' will run before the package is installed
sleep 30
send_user "Start ColumnStore service "
send " \n"
send date\n
send "ssh -v $USERNAME@$SERVER '$INSTALLDIR/bin/columnstore restart'\n"
set timeout 10
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
}
set timeout 60
# check return
expect {
"Exit status 0" { send_user "DONE" }
"No such file" { send_user "ERROR: $INSTALLDIR/bin/columnstore Not Found\n" ; exit 1 }
"MariaDB Columnstore syslog logging not working" { send_user "ERROR: MariaDB Columnstore System logging not setup\n" ; exit 1 }
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
"Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1}
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
"Starting MariaDB" { send_user "DONE" }
timeout { send_user "TIMEOUT: Continue" }
}
send_user "\n"
if { $AMAZONINSTALL == "1" } {
#
# copy over customer OS files
#
send_user "Copy MariaDB Columnstore OS files to Module "
send " \n"
send date\n
send "scp -v -r $INSTALLDIR/local/etc $USERNAME@$SERVER:$INSTALLDIR/local\n"
set timeout 10
expect {
"word: " { send "$PASSWORD\n" }
"passphrase" { send "$PASSWORD\n" }
"Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1}
}
set timeout 60
expect {
"Exit status 0" { send_user "DONE" }
"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 "TIMEOUT: Continue" }
}
}
send_user "\n"
send_user "\nInstallation Successfully Completed on '$MODULE'\n"
exit 0

View File

@@ -555,10 +555,10 @@ int main(int argc, char *argv[])
temppwprompt = "none"; temppwprompt = "none";
cout << endl << "----- Performing Uninstall on Module '" + remoteModuleName + "' -----" << endl << endl; cout << endl << "----- Performing Uninstall on Module '" + remoteModuleName + "' -----" << endl << endl;
cmd = installDir + "/bin/user_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " + password + " " + calpont_rpm1 + " " + calpont_rpm2 + " " + calpont_rpm3 + " " + mysql_rpm + " " + mysqld_rpm + " " + installType + " " + packageType + " " + nodeps + " " + temppwprompt + " " + installer_debug; cmd = installDir + "/bin/package_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " + password + " " + calpont_rpm1 + " " + calpont_rpm2 + " " + calpont_rpm3 + " " + mysql_rpm + " " + mysqld_rpm + " " + installType + " " + packageType + " " + nodeps + " " + temppwprompt + " " + installer_debug;
int rtnCode = system(cmd.c_str()); int rtnCode = system(cmd.c_str());
if (WEXITSTATUS(rtnCode) != 0) { if (WEXITSTATUS(rtnCode) != 0) {
cout << endl << "ERROR: returned from user_installer.sh" << endl; cout << endl << "ERROR: returned from package_installer.sh" << endl;
exit(1); exit(1);
} }
} }
@@ -581,10 +581,10 @@ int main(int argc, char *argv[])
if ( packageType != "binary" ) { if ( packageType != "binary" ) {
//run remote installer script //run remote installer script
cout << endl << "----- Performing Uninstall on Module '" + remoteModuleName + "' -----" << endl << endl; cout << endl << "----- Performing Uninstall on Module '" + remoteModuleName + "' -----" << endl << endl;
cmd = installDir + "/bin/performance_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " + password + " " + calpont_rpm1 + " " + calpont_rpm2 + " " + calpont_rpm3 + " " + mysql_rpm + " " + mysqld_rpm + " " + installType + " " + packageType + " " + nodeps + " " + installer_debug; cmd = installDir + "/bin/package_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " + password + " " + calpont_rpm1 + " " + calpont_rpm2 + " " + calpont_rpm3 + " " + mysql_rpm + " " + mysqld_rpm + " " + installType + " " + packageType + " " + nodeps + " " + installer_debug;
int rtnCode = system(cmd.c_str()); int rtnCode = system(cmd.c_str());
if (WEXITSTATUS(rtnCode) != 0) { if (WEXITSTATUS(rtnCode) != 0) {
cout << endl << "ERROR returned from performance_installer.sh" << endl; cout << endl << "ERROR returned from package_installer.sh" << endl;
exit(1); exit(1);
} }
} }
@@ -649,10 +649,10 @@ int main(int argc, char *argv[])
temppwprompt = "none"; temppwprompt = "none";
cout << endl << "----- Performing Install on Module '" + remoteModuleName + "' -----" << endl << endl; cout << endl << "----- Performing Install on Module '" + remoteModuleName + "' -----" << endl << endl;
cmd = installDir + "/bin/user_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " + password + " " + calpont_rpm1 + " " + calpont_rpm2 + " " + calpont_rpm3 + " " + mysql_rpm + " " + mysqld_rpm + " " + installType + " " + packageType + " " + nodeps + " " + temppwprompt + " " + installer_debug; cmd = installDir + "/bin/package_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " + password + " " + calpont_rpm1 + " " + calpont_rpm2 + " " + calpont_rpm3 + " " + mysql_rpm + " " + mysqld_rpm + " " + installType + " " + packageType + " " + nodeps + " " + temppwprompt + " " + installer_debug;
int rtnCode = system(cmd.c_str()); int rtnCode = system(cmd.c_str());
if (WEXITSTATUS(rtnCode) != 0) { if (WEXITSTATUS(rtnCode) != 0) {
cout << endl << "ERROR returned from user_installer.sh" << endl; cout << endl << "ERROR returned from package_installer.sh" << endl;
exit(1); exit(1);
} }
} }
@@ -675,10 +675,10 @@ int main(int argc, char *argv[])
//run remote installer script //run remote installer script
if ( packageType != "binary" ) { if ( packageType != "binary" ) {
cout << endl << "----- Performing Install on Module '" + remoteModuleName + "' -----" << endl << endl; cout << endl << "----- Performing Install on Module '" + remoteModuleName + "' -----" << endl << endl;
cmd = installDir + "/bin/performance_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " + password + " " + calpont_rpm1 + " " + calpont_rpm2 + " " + calpont_rpm3 + " " + mysql_rpm + " " + mysqld_rpm + " " + installType + " " + packageType + " " + nodeps + " " + installer_debug; cmd = installDir + "/bin/package_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " + password + " " + calpont_rpm1 + " " + calpont_rpm2 + " " + calpont_rpm3 + " " + mysql_rpm + " " + mysqld_rpm + " " + installType + " " + packageType + " " + nodeps + " " + installer_debug;
int rtnCode = system(cmd.c_str()); int rtnCode = system(cmd.c_str());
if (WEXITSTATUS(rtnCode) != 0) { if (WEXITSTATUS(rtnCode) != 0) {
cout << endl << "ERROR returned from performance_installer.sh" << endl; cout << endl << "ERROR returned from package_installer.sh" << endl;
exit(1); exit(1);
} }
} }

View File

@@ -2938,7 +2938,7 @@ int main(int argc, char *argv[])
temppwprompt = "none"; temppwprompt = "none";
//run remote installer script //run remote installer script
cmd = installDir + "/bin/user_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " + password + " " + version + " initial " + AmazonInstall + " " + EEPackageType + " " + nodeps + " " + remote_installer_debug + " " + debug_logfile; cmd = installDir + "/bin/package_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " + password + " " + version + " initial " + AmazonInstall + " " + EEPackageType + " " + nodeps + " " + remote_installer_debug + " " + debug_logfile;
if ( thread_remote_installer ) { if ( thread_remote_installer ) {
thr_data[thread_id].command = cmd; thr_data[thread_id].command = cmd;
@@ -2956,7 +2956,7 @@ int main(int argc, char *argv[])
{ {
int rtnCode = system(cmd.c_str()); int rtnCode = system(cmd.c_str());
if (WEXITSTATUS(rtnCode) != 0) { if (WEXITSTATUS(rtnCode) != 0) {
cout << endl << "Error returned from user_installer.sh" << endl; cout << endl << "Error returned from package_installer.sh" << endl;
exit(1); exit(1);
} }
@@ -3065,7 +3065,7 @@ int main(int argc, char *argv[])
{ {
int rtnCode = system(cmd.c_str()); int rtnCode = system(cmd.c_str());
if (WEXITSTATUS(rtnCode) != 0) { if (WEXITSTATUS(rtnCode) != 0) {
cout << endl << "Error returned from user_installer.sh" << endl; cout << endl << "Error returned from package_installer.sh" << endl;
exit(1); exit(1);
} }
} }
@@ -3083,7 +3083,7 @@ int main(int argc, char *argv[])
if ( EEPackageType != "binary" ) { if ( EEPackageType != "binary" ) {
//run remote installer script //run remote installer script
cmd = installDir + "/bin/performance_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " + password + " " + version + " initial " + AmazonInstall + " " + EEPackageType + " " + nodeps + " " + remote_installer_debug + " " + debug_logfile; cmd = installDir + "/bin/package_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " + password + " " + version + " initial " + AmazonInstall + " " + EEPackageType + " " + nodeps + " " + remote_installer_debug + " " + debug_logfile;
if ( thread_remote_installer ) { if ( thread_remote_installer ) {
thr_data[thread_id].command = cmd; thr_data[thread_id].command = cmd;
@@ -3102,7 +3102,7 @@ int main(int argc, char *argv[])
{ {
int rtnCode = system(cmd.c_str()); int rtnCode = system(cmd.c_str());
if (WEXITSTATUS(rtnCode) != 0) { if (WEXITSTATUS(rtnCode) != 0) {
cout << endl << "Error returned from performance_installer.sh" << endl; cout << endl << "Error returned from package_installer.sh" << endl;
exit(1); exit(1);
} }
} }
@@ -3134,7 +3134,7 @@ int main(int argc, char *argv[])
{ {
int rtnCode = system(cmd.c_str()); int rtnCode = system(cmd.c_str());
if (WEXITSTATUS(rtnCode) != 0) { if (WEXITSTATUS(rtnCode) != 0) {
cout << endl << "Error returned from user_installer.sh" << endl; cout << endl << "Error returned from package_installer.sh" << endl;
exit(1); exit(1);
} }
} }

View File

@@ -563,32 +563,29 @@ static void startMgrProcessThread()
log.writeLog(__LINE__, "addModule - ERROR: get DistributedInstall", LOG_TYPE_ERROR); log.writeLog(__LINE__, "addModule - ERROR: get DistributedInstall", LOG_TYPE_ERROR);
} }
//if non-distrubuted install, send out a start service just to make sure Columnstore is runing on remote nodes //Send out a start service just to make sure Columnstore is runing on remote nodes
//note this only works for systems with ssh-keys //note this only works for systems with ssh-keys
if ( DistributedInstall == "n" ) for( unsigned int i = 0 ; i < systemmoduletypeconfig.moduletypeconfig.size(); i++)
{ {
for( unsigned int i = 0 ; i < systemmoduletypeconfig.moduletypeconfig.size(); i++) int moduleCount = systemmoduletypeconfig.moduletypeconfig[i].ModuleCount;
{ if( moduleCount == 0)
int moduleCount = systemmoduletypeconfig.moduletypeconfig[i].ModuleCount; continue;
if( moduleCount == 0)
DeviceNetworkList::iterator pt = systemmoduletypeconfig.moduletypeconfig[i].ModuleNetworkList.begin();
for ( ; pt != systemmoduletypeconfig.moduletypeconfig[i].ModuleNetworkList.end(); pt++)
{
//skip OAM Parent module
if ( (*pt).DeviceName == config.moduleName() )
continue; continue;
DeviceNetworkList::iterator pt = systemmoduletypeconfig.moduletypeconfig[i].ModuleNetworkList.begin(); HostConfigList::iterator pt1 = (*pt).hostConfigList.begin();
for ( ; pt != systemmoduletypeconfig.moduletypeconfig[i].ModuleNetworkList.end(); pt++) for( ; pt1 != (*pt).hostConfigList.end() ; pt1++)
{ {
//skip OAM Parent module //run remote command script
if ( (*pt).DeviceName == config.moduleName() ) string cmd = startup::StartUp::installDir() + "/bin/remote_command.sh " + (*pt1).IPAddr + " ssh '" + startup::StartUp::installDir() + "/bin/columnstore restart' 0";
continue; system(cmd.c_str());
HostConfigList::iterator pt1 = (*pt).hostConfigList.begin();
for( ; pt1 != (*pt).hostConfigList.end() ; pt1++)
{
//run remote command script
string cmd = startup::StartUp::installDir() + "/bin/remote_command.sh " + (*pt1).IPAddr + " ssh '" + startup::StartUp::installDir() + "/bin/columnstore restart' 0";
system(cmd.c_str());
}
} }
} }
} }
//distribute system and process config files //distribute system and process config files
@@ -599,7 +596,7 @@ static void startMgrProcessThread()
{ {
int status = API_SUCCESS; int status = API_SUCCESS;
int k = 0; int k = 0;
for( ; k < 30 ; k++ ) for( ; k < 60 ; k++ )
{ {
if ( startsystemthreadStop ) { if ( startsystemthreadStop ) {
processManager.setSystemState(oam::MAN_OFFLINE); processManager.setSystemState(oam::MAN_OFFLINE);
@@ -643,7 +640,7 @@ static void startMgrProcessThread()
sleep(1); sleep(1);
} }
if ( k == 30 || status == API_FAILURE) { if ( k == 60 || status == API_FAILURE) {
// system didn't successfull restart // system didn't successfull restart
processManager.setSystemState(oam::FAILED); processManager.setSystemState(oam::FAILED);
// exit thread // exit thread

View File

@@ -5088,7 +5088,7 @@ int ProcessManager::addModule(oam::DeviceNetworkList devicenetworklist, std::str
string logFile = "/tmp/" + remoteModuleName + "_user_installer.log"; string logFile = "/tmp/" + remoteModuleName + "_user_installer.log";
log.writeLog(__LINE__, "addModule - user_installer run for " + remoteModuleName, LOG_TYPE_DEBUG); log.writeLog(__LINE__, "addModule - user_installer run for " + remoteModuleName, LOG_TYPE_DEBUG);
string cmd = installDir + "/bin/user_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " + password + " " + version + " initial " + AmazonInstall + " " + packageType + " --nodeps 1 > " + logFile; string cmd = installDir + "/bin/package_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " + password + " " + version + " initial " + AmazonInstall + " " + packageType + " --nodeps 1 > " + logFile;
log.writeLog(__LINE__, "addModule cmd: " + cmd, LOG_TYPE_DEBUG); log.writeLog(__LINE__, "addModule cmd: " + cmd, LOG_TYPE_DEBUG);
@@ -5181,7 +5181,7 @@ int ProcessManager::addModule(oam::DeviceNetworkList devicenetworklist, std::str
if ( packageType != "binary" ) { if ( packageType != "binary" ) {
string logFile = "/tmp/" + remoteModuleName + "_performance_installer.log"; string logFile = "/tmp/" + remoteModuleName + "_performance_installer.log";
log.writeLog(__LINE__, "addModule - performance_installer run for " + remoteModuleName, LOG_TYPE_DEBUG); log.writeLog(__LINE__, "addModule - performance_installer run for " + remoteModuleName, LOG_TYPE_DEBUG);
string cmd = installDir + "/bin/performance_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " + password + " " + version + " initial " + AmazonInstall + " " + packageType + + " --nodeps 1 > " + logFile; string cmd = installDir + "/bin/package_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " + password + " " + version + " initial " + AmazonInstall + " " + packageType + + " --nodeps 1 > " + logFile;
log.writeLog(__LINE__, "addModule cmd: " + cmd, LOG_TYPE_DEBUG); log.writeLog(__LINE__, "addModule cmd: " + cmd, LOG_TYPE_DEBUG);
bool passed = false; bool passed = false;