You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-770 - change the distubute install
This commit is contained in:
@ -168,6 +168,36 @@ expect {
|
|||||||
"postConfigure" { send_user "DONE" }
|
"postConfigure" { send_user "DONE" }
|
||||||
}
|
}
|
||||||
send_user "\n"
|
send_user "\n"
|
||||||
|
|
||||||
|
# start service
|
||||||
|
if { $INSTALLTYPE == "initial" } {
|
||||||
|
send_user "\n"
|
||||||
|
send_user "Start columnstore service script "
|
||||||
|
send " \n"
|
||||||
|
send date\n
|
||||||
|
send "ssh $USERNAME@$SERVER '$INSTALLDIR/bin/columnstore start'\n"
|
||||||
|
set timeout 10
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
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}
|
||||||
|
"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" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
send_user "\nInstallation Successfully Completed on '$MODULE'\n"
|
||||||
|
exit 0
|
||||||
|
|
||||||
sleep 10
|
sleep 10
|
||||||
#
|
#
|
||||||
if { $INSTALLTYPE == "initial" || $INSTALLTYPE == "nonDistribute" } {
|
if { $INSTALLTYPE == "initial" || $INSTALLTYPE == "nonDistribute" } {
|
||||||
|
@ -202,6 +202,37 @@ if { $INSTALLTYPE == "initial"} {
|
|||||||
send_user "\n"
|
send_user "\n"
|
||||||
#sleep to make sure it's finished
|
#sleep to make sure it's finished
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
|
# start service
|
||||||
|
if { $INSTALLTYPE == "initial" } {
|
||||||
|
send_user "\n"
|
||||||
|
send_user "Start columnstore service script "
|
||||||
|
send " \n"
|
||||||
|
send date\n
|
||||||
|
send "ssh $USERNAME@$SERVER '$INSTALLDIR/bin/columnstore start'\n"
|
||||||
|
set timeout 10
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
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}
|
||||||
|
"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" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
send_user "\nInstallation Successfully Completed on '$MODULE'\n"
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
|
||||||
set timeout 30
|
set timeout 30
|
||||||
#expect -re {[$#] }
|
#expect -re {[$#] }
|
||||||
if { $INSTALLTYPE == "initial"} {
|
if { $INSTALLTYPE == "initial"} {
|
||||||
|
@ -206,6 +206,36 @@ if { $INSTALLTYPE == "initial"} {
|
|||||||
}
|
}
|
||||||
#sleep to make sure it's finished
|
#sleep to make sure it's finished
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
|
# start service
|
||||||
|
if { $INSTALLTYPE == "initial" } {
|
||||||
|
send_user "\n"
|
||||||
|
send_user "Start columnstore service script "
|
||||||
|
send " \n"
|
||||||
|
send date\n
|
||||||
|
send "ssh $USERNAME@$SERVER '$INSTALLDIR/bin/columnstore start'\n"
|
||||||
|
set timeout 10
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
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}
|
||||||
|
"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" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
send_user "\nInstallation Successfully Completed on '$MODULE'\n"
|
||||||
|
exit 0
|
||||||
|
|
||||||
#
|
#
|
||||||
if { $INSTALLTYPE == "initial"} {
|
if { $INSTALLTYPE == "initial"} {
|
||||||
#
|
#
|
||||||
|
@ -2076,7 +2076,7 @@ int main(int argc, char *argv[])
|
|||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
|
|
||||||
if ( newModuleName != parentOAMModuleName) {
|
if ( newModuleName != parentOAMModuleName) {
|
||||||
//make module file in local/etc/"modulename"
|
//make module file in local/module
|
||||||
if( !makeModuleFile(newModuleName, parentOAMModuleName) )
|
if( !makeModuleFile(newModuleName, parentOAMModuleName) )
|
||||||
cout << "makeModuleFile error" << endl;
|
cout << "makeModuleFile error" << endl;
|
||||||
}
|
}
|
||||||
@ -3301,7 +3301,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( !nonDistribute )
|
/* if ( !nonDistribute )
|
||||||
{
|
{
|
||||||
if ( password.empty() ) {
|
if ( password.empty() ) {
|
||||||
while(true)
|
while(true)
|
||||||
@ -3371,7 +3371,7 @@ int main(int argc, char *argv[])
|
|||||||
cout << "MariaDB ColumnStore successfully started" << endl;
|
cout << "MariaDB ColumnStore successfully started" << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
//start MariaDB ColumnStore on local server
|
//start MariaDB ColumnStore on local server
|
||||||
cout << endl << "----- Starting MariaDB ColumnStore on local server -----" << endl << endl;
|
cout << endl << "----- Starting MariaDB ColumnStore on local server -----" << endl << endl;
|
||||||
cmd = installDir + "/bin/columnstore restart > /dev/null 2>&1";
|
cmd = installDir + "/bin/columnstore restart > /dev/null 2>&1";
|
||||||
@ -3767,7 +3767,7 @@ bool setOSFiles(string parentOAMModuleName, int serverTypeInstall)
|
|||||||
//check and do the amazon credentials file
|
//check and do the amazon credentials file
|
||||||
string fileName = HOME + "/.aws/credentials";
|
string fileName = HOME + "/.aws/credentials";
|
||||||
ifstream oldFile (fileName.c_str());
|
ifstream oldFile (fileName.c_str());
|
||||||
if (!oldFile)
|
if (!oldFile)
|
||||||
return allfound;
|
return allfound;
|
||||||
|
|
||||||
string cmd = "cp " + fileName + " " + installDir + "/local/etc/. > /dev/null 2>&1";
|
string cmd = "cp " + fileName + " " + installDir + "/local/etc/. > /dev/null 2>&1";
|
||||||
@ -3951,7 +3951,7 @@ bool makeRClocal(string moduleType, string moduleName, int IserverTypeInstall)
|
|||||||
mount1 = "/mnt\\/tmp/";
|
mount1 = "/mnt\\/tmp/";
|
||||||
else
|
else
|
||||||
if ( moduleType == "pm" )
|
if ( moduleType == "pm" )
|
||||||
mount1 = "/Calpont\\/data/";
|
mount1 = "/columnstore\\/data/";
|
||||||
else
|
else
|
||||||
return true;
|
return true;
|
||||||
break;
|
break;
|
||||||
@ -3960,28 +3960,7 @@ bool makeRClocal(string moduleType, string moduleName, int IserverTypeInstall)
|
|||||||
{
|
{
|
||||||
if ( moduleType == "pm" ) {
|
if ( moduleType == "pm" ) {
|
||||||
mount1 = "/mnt\\/tmp/";
|
mount1 = "/mnt\\/tmp/";
|
||||||
mount2 = "/Calpont\\/data/";
|
mount2 = "/columnstore\\/data/";
|
||||||
}
|
|
||||||
else
|
|
||||||
return true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case (oam::INSTALL_COMBINE_DM_UM): // combined #2 dm/um on a same server
|
|
||||||
{
|
|
||||||
if ( moduleType == "um" )
|
|
||||||
mount1 = "/mnt\\/tmp/";
|
|
||||||
else
|
|
||||||
if ( moduleType == "pm" )
|
|
||||||
mount1 = "/Calpont\\/data/";
|
|
||||||
else
|
|
||||||
return true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case (oam::INSTALL_COMBINE_PM_UM): // combined #3 um/pm on a same server
|
|
||||||
{
|
|
||||||
if ( moduleType == "pm" ) {
|
|
||||||
mount1 = "/mnt\\/tmp/";
|
|
||||||
mount2 = "/Calpont\\/data/";
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return true;
|
return true;
|
||||||
@ -5002,8 +4981,8 @@ bool makeModuleFile(string moduleName, string parentOAMModuleName)
|
|||||||
if ( moduleName == parentOAMModuleName)
|
if ( moduleName == parentOAMModuleName)
|
||||||
fileName = installDir + "/local/module";
|
fileName = installDir + "/local/module";
|
||||||
else
|
else
|
||||||
fileName = installDir + "/local/etc/" + moduleName + "/module";
|
return true;
|
||||||
|
|
||||||
unlink (fileName.c_str());
|
unlink (fileName.c_str());
|
||||||
ofstream newFile (fileName.c_str());
|
ofstream newFile (fileName.c_str());
|
||||||
|
|
||||||
|
@ -565,7 +565,7 @@ static void startMgrProcessThread()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//send out moduleName to remote nodes on non-distrubuted install
|
//send out moduleName to remote nodes on non-distrubuted install
|
||||||
if ( DistributedInstall == "n" )
|
// if ( DistributedInstall == "n" )
|
||||||
{
|
{
|
||||||
int status = API_SUCCESS;
|
int status = API_SUCCESS;
|
||||||
int k = 0;
|
int k = 0;
|
||||||
|
@ -5285,6 +5285,9 @@ int ProcessManager::addModule(oam::DeviceNetworkList devicenetworklist, std::str
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//distribute config file
|
||||||
|
distributeConfigFile("system");
|
||||||
|
|
||||||
//Start new modules by starting up local Process-Monitor
|
//Start new modules by starting up local Process-Monitor
|
||||||
listPT = devicenetworklist.begin();
|
listPT = devicenetworklist.begin();
|
||||||
for( ; listPT != devicenetworklist.end() ; listPT++)
|
for( ; listPT != devicenetworklist.end() ; listPT++)
|
||||||
@ -5300,9 +5303,9 @@ int ProcessManager::addModule(oam::DeviceNetworkList devicenetworklist, std::str
|
|||||||
string remoteHostName = (*pt1).HostName;
|
string remoteHostName = (*pt1).HostName;
|
||||||
|
|
||||||
//send start service commands
|
//send start service commands
|
||||||
string cmd = installDir + "/bin/remote_command.sh " + remoteModuleIP + " " + password + " '" + installDir + "/bin/columnstore restart;" + installDir + "/mysql/mysqld-Calpont restart' 0";
|
// string cmd = installDir + "/bin/remote_command.sh " + remoteModuleIP + " " + password + " '" + installDir + "/bin/columnstore restart;" + installDir + "/mysql/mysqld-Calpont restart' 0";
|
||||||
system(cmd.c_str());
|
// system(cmd.c_str());
|
||||||
log.writeLog(__LINE__, "addModule - restart columnstore service " + remoteModuleName, LOG_TYPE_DEBUG);
|
// log.writeLog(__LINE__, "addModule - restart columnstore service " + remoteModuleName, LOG_TYPE_DEBUG);
|
||||||
|
|
||||||
// add to monitor list
|
// add to monitor list
|
||||||
moduleInfoList.insert(moduleList::value_type(remoteModuleName, 0));
|
moduleInfoList.insert(moduleList::value_type(remoteModuleName, 0));
|
||||||
@ -5347,6 +5350,15 @@ int ProcessManager::addModule(oam::DeviceNetworkList devicenetworklist, std::str
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
listPT = devicenetworklist.begin();
|
||||||
|
for( ; listPT != devicenetworklist.end() ; listPT++)
|
||||||
|
{
|
||||||
|
string moduleName = (*listPT).DeviceName;
|
||||||
|
|
||||||
|
processManager.configureModule(moduleName);
|
||||||
|
sleep(10);
|
||||||
|
}
|
||||||
|
|
||||||
//if amazon, delay to give time for ProcMon to start
|
//if amazon, delay to give time for ProcMon to start
|
||||||
if (amazon) {
|
if (amazon) {
|
||||||
log.writeLog(__LINE__, "addModule - sleep 30 - give ProcMon time to start on new Instance", LOG_TYPE_DEBUG);
|
log.writeLog(__LINE__, "addModule - sleep 30 - give ProcMon time to start on new Instance", LOG_TYPE_DEBUG);
|
||||||
|
@ -166,20 +166,20 @@ int main(int argc, char **argv)
|
|||||||
MonitorConfig config;
|
MonitorConfig config;
|
||||||
|
|
||||||
//get Distributed Install
|
//get Distributed Install
|
||||||
string DistributedInstall = "y";
|
// string DistributedInstall = "y";
|
||||||
|
|
||||||
try
|
// try
|
||||||
{
|
// {
|
||||||
oam.getSystemConfig("DistributedInstall", DistributedInstall);
|
// oam.getSystemConfig("DistributedInstall", DistributedInstall);
|
||||||
}
|
// }
|
||||||
catch (...)
|
// catch (...)
|
||||||
{
|
// {
|
||||||
log.writeLog(__LINE__, "addModule - ERROR: get DistributedInstall", LOG_TYPE_ERROR);
|
// log.writeLog(__LINE__, "addModule - ERROR: get DistributedInstall", LOG_TYPE_ERROR);
|
||||||
}
|
// }
|
||||||
|
|
||||||
//check for a non-distrubuted install setup
|
//check for a non-distrubuted install setup
|
||||||
if ( DistributedInstall == "n" )
|
// if ( DistributedInstall == "n" )
|
||||||
{
|
// {
|
||||||
//PMwithUM config
|
//PMwithUM config
|
||||||
try {
|
try {
|
||||||
oam.getSystemConfig( "PMwithUM", PMwithUM);
|
oam.getSystemConfig( "PMwithUM", PMwithUM);
|
||||||
@ -204,7 +204,7 @@ int main(int argc, char **argv)
|
|||||||
log.writeLog(__LINE__, "restarting for a non-distrubuted install", LOG_TYPE_DEBUG);
|
log.writeLog(__LINE__, "restarting for a non-distrubuted install", LOG_TYPE_DEBUG);
|
||||||
|
|
||||||
exit (0);
|
exit (0);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
//define entry if missing
|
//define entry if missing
|
||||||
|
Reference in New Issue
Block a user