1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-05 16:15:50 +03:00
This commit is contained in:
david hill
2017-06-19 15:32:48 -05:00
parent 95008d1c13
commit 0599b7c3e9
4 changed files with 590 additions and 653 deletions

View File

@@ -226,7 +226,7 @@
<SystemConfig> <SystemConfig>
<SystemLang>C</SystemLang> <SystemLang>C</SystemLang>
<SystemName>columnstore-1</SystemName> <SystemName>columnstore-1</SystemName>
<ParentOAMModuleName>pm1</ParentOAMModuleName> <ParentOAMModuleName>unassigned</ParentOAMModuleName>
<StandbyOAMModuleName>unassigned</StandbyOAMModuleName> <StandbyOAMModuleName>unassigned</StandbyOAMModuleName>
<PrimaryUMModuleName>unassigned</PrimaryUMModuleName> <PrimaryUMModuleName>unassigned</PrimaryUMModuleName>
<ModuleHeartbeatPeriod>1</ModuleHeartbeatPeriod> <ModuleHeartbeatPeriod>1</ModuleHeartbeatPeriod>

View File

@@ -2737,7 +2737,7 @@ int main(int argc, char *argv[])
// determine package type // determine package type
string EEPackageType; string EEPackageType;
if (!rootUser || nonDistribute) if (!rootUser)
EEPackageType = "binary"; EEPackageType = "binary";
else else
{ {
@@ -2798,6 +2798,9 @@ int main(int argc, char *argv[])
if ( install == "y" ) { if ( install == "y" ) {
//skip interface with remote servers and perform install
if ( !nonDistribute )
{
SystemSoftware systemsoftware; SystemSoftware systemsoftware;
try try
@@ -2815,8 +2818,7 @@ int main(int argc, char *argv[])
string version = systemsoftware.Version + "-" + systemsoftware.Release; string version = systemsoftware.Version + "-" + systemsoftware.Release;
string installType = "initial"; string installType = "initial";
if ( !nonDistribute )
{
if ( EEPackageType == "rpm" ) if ( EEPackageType == "rpm" )
{ {
cout << "Performing an MariaDB ColumnStore System install using RPM packages" << endl; cout << "Performing an MariaDB ColumnStore System install using RPM packages" << endl;
@@ -2848,13 +2850,6 @@ 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() )
{ {
@@ -2935,9 +2930,6 @@ int main(int argc, char *argv[])
string logfile; string logfile;
if ( remote_installer_debug == "1" ) { if ( remote_installer_debug == "1" ) {
logfile = "/tmp/"; logfile = "/tmp/";
if ( nonDistribute )
logfile += remoteModuleName + "_nondistributed_install.log";
else
logfile += remoteModuleName + "_" + EEPackageType + "_install.log"; logfile += remoteModuleName + "_" + EEPackageType + "_install.log";
debug_logfile = " > " + logfile; debug_logfile = " > " + logfile;
} }
@@ -2946,35 +2938,6 @@ int main(int argc, char *argv[])
(remoteModuleType == "pm" && IserverTypeInstall == oam::INSTALL_COMBINE_DM_UM_PM) || (remoteModuleType == "pm" && IserverTypeInstall == oam::INSTALL_COMBINE_DM_UM_PM) ||
(remoteModuleType == "pm" && pmwithum) ) (remoteModuleType == "pm" && pmwithum) )
{ {
if ( nonDistribute )
{
cout << endl << "----- Performing Non-Distrubuted Install on '" + remoteModuleName + " / " + remoteHostName + "' -----" << endl << endl;
//check of post-install file exist, which shows package is installed
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 << "Error: MariaDB ColumnStore not installed on " + remoteModuleName + " / " + remoteHostName << endl;
cout << "Install and re-run postConfigure. Exiting..." << endl << endl;
exit(1);
}
//check version that is installed
cmd = installDir + "/bin/remote_scp_get.sh " + remoteModuleIP + " " + password + " " + installDir + "/releasenum > /dev/null 2>&1";
rtnCode = system(cmd.c_str());
if (WEXITSTATUS(rtnCode) != 0) {
cout << "Error: MariaDB ColumnStore not installed on " + remoteModuleName + " / " + remoteHostName << endl;
cout << "Install and re-run postConfigure. Exiting..." << endl << endl;
exit(1);
}
cmd = "diff " + installDir + "/releasenum releasenum > /dev/null 2>&1";
rtnCode = system(cmd.c_str());
if (WEXITSTATUS(rtnCode) != 0) {
cout << "Error: Local version of MariaDB ColumnStore doesn't match installed version on " + remoteModuleName + " / " + remoteHostName << endl;
cout << "Install matching version and re-run postConfigure. Exiting..." << endl << endl;
exit(1);
}
}
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" )
@@ -3125,35 +3088,6 @@ int main(int argc, char *argv[])
if ( (remoteModuleType == "pm" && IserverTypeInstall != oam::INSTALL_COMBINE_DM_UM_PM) || if ( (remoteModuleType == "pm" && IserverTypeInstall != oam::INSTALL_COMBINE_DM_UM_PM) ||
(remoteModuleType == "pm" && !pmwithum ) ) (remoteModuleType == "pm" && !pmwithum ) )
{ {
if ( nonDistribute )
{
cout << endl << "----- Performing Non-Distrubuted Install 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 + "/bin/post-install' > /tmp/install_check.log";
int rtnCode = system(cmd.c_str());
if (WEXITSTATUS(rtnCode) != 0) {
cout << endl << "Error: MariaDB ColumnStore not installed on " + remoteModuleName + " / " + remoteHostName << endl;
cout << "Install and re-run postConfigure. Exiting..." << endl << endl;
exit(1);
}
//check version that is installed
cmd = installDir + "/bin/remote_scp_get.sh " + remoteModuleIP + " " + password + " " + installDir + "/releasenum > /dev/null 2>&1";
rtnCode = system(cmd.c_str());
if (WEXITSTATUS(rtnCode) != 0) {
cout << "Error: MariaDB ColumnStore not installed on " + remoteModuleName + " / " + remoteHostName << endl;
cout << "Install and re-run postConfigure. Exiting..." << endl << endl;
exit(1);
}
cmd = "diff " + installDir + "/releasenum releasenum > /dev/null 2>&1";
rtnCode = system(cmd.c_str());
if (WEXITSTATUS(rtnCode) != 0) {
cout << "Error: Local version of MariaDB ColumnStore doesn't match installed version on " + remoteModuleName + " / " + remoteHostName << endl;
cout << "Install matching version and re-run postConfigure. Exiting..." << endl << endl;
exit(1);
}
}
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" )
@@ -3236,6 +3170,7 @@ int main(int argc, char *argv[])
} }
} }
} }
}
//configure data redundancy //configure data redundancy
string glusterconfig = installDir + "/bin/glusterconf"; string glusterconfig = installDir + "/bin/glusterconf";
@@ -3301,6 +3236,7 @@ int main(int argc, char *argv[])
else else
cout << "The MariaDB ColumnStore system logging is setup and working on local server" << endl; cout << "The MariaDB ColumnStore system logging is setup and working on local server" << endl;
if ( nonDistribute )
cout << endl << "MariaDB ColumnStore System Configuration and Installation is Completed" << endl; cout << endl << "MariaDB ColumnStore System Configuration and Installation is Completed" << endl;
// //
@@ -3336,7 +3272,7 @@ int main(int argc, char *argv[])
if ( start == "y" ) { if ( start == "y" ) {
if (hdfs) if (hdfs && !nonDistribute )
{ {
cout << endl << "----- Starting MariaDB ColumnStore Service on all Modules -----" << endl << endl; cout << endl << "----- Starting MariaDB ColumnStore Service on all Modules -----" << endl << endl;
string cmd = "pdsh -a '" + installDir + "/bin/columnstore restart' > /tmp/postConfigure.pdsh 2>&1"; string cmd = "pdsh -a '" + installDir + "/bin/columnstore restart' > /tmp/postConfigure.pdsh 2>&1";
@@ -3347,6 +3283,8 @@ int main(int argc, char *argv[])
} }
} }
else else
{
if ( !nonDistribute )
{ {
if ( password.empty() ) { if ( password.empty() ) {
while(true) while(true)
@@ -3415,6 +3353,7 @@ int main(int argc, char *argv[])
else else
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;

View File

@@ -4983,6 +4983,8 @@ int ProcessManager::addModule(oam::DeviceNetworkList devicenetworklist, std::str
} }
} }
if ( DistributedInstall == "y" ) {
//PMwithUM config //PMwithUM config
string PMwithUM = "n"; string PMwithUM = "n";
try { try {
@@ -5347,6 +5349,7 @@ int ProcessManager::addModule(oam::DeviceNetworkList devicenetworklist, std::str
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);
sleep(30); sleep(30);
} }
}
//distribute config file //distribute config file
distributeConfigFile("system"); distributeConfigFile("system");

View File

@@ -169,13 +169,7 @@ int main(int argc, char **argv)
int moduleStatus = oam::ACTIVE; int moduleStatus = oam::ACTIVE;
//check if currently configured as Parent OAM Module on startup //check if currently configured as Parent OAM Module on startup
string DBRootStorageType;
if ( gOAMParentModuleFlag ) { if ( gOAMParentModuleFlag ) {
try {
oam.getSystemConfig( "DBRootStorageType", DBRootStorageType);
}
catch(...) {}
if ( ( config.OAMStandbyName() != oam::UnassignedName ) && if ( ( config.OAMStandbyName() != oam::UnassignedName ) &&
DBRootStorageType != "internal" ) { DBRootStorageType != "internal" ) {
//try for 20 minutes checking if the standby node is up //try for 20 minutes checking if the standby node is up
@@ -405,6 +399,7 @@ int main(int argc, char **argv)
} }
//hdfs / hadoop config //hdfs / hadoop config
string DBRootStorageType;
try { try {
oam.getSystemConfig( "DBRootStorageType", DBRootStorageType); oam.getSystemConfig( "DBRootStorageType", DBRootStorageType);
} }