You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-12-24 14:20:59 +03:00
MCOL-522 changes
This commit is contained in:
@@ -52,6 +52,17 @@
|
||||
#include <cstring>
|
||||
#include <glob.h>
|
||||
|
||||
#include <arpa/inet.h>
|
||||
#include <sys/socket.h>
|
||||
#include <ifaddrs.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <string.h> /* for strncpy */
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <netinet/in.h>
|
||||
#include <net/if.h>
|
||||
|
||||
#include <readline/readline.h>
|
||||
#include <readline/history.h>
|
||||
#include "boost/filesystem/operations.hpp"
|
||||
@@ -98,7 +109,7 @@ bool updateProcessConfig(int serverTypeInstall);
|
||||
bool uncommentCalpontXml( string entry);
|
||||
bool makeRClocal(string moduleType, string moduleName, int IserverTypeInstall);
|
||||
bool createDbrootDirs(string DBRootStorageType);
|
||||
bool pkgCheck();
|
||||
bool pkgCheck(std::string columnstorePackage);
|
||||
bool storageSetup(bool amazonInstall);
|
||||
void setSystemName();
|
||||
bool singleServerDBrootSetup();
|
||||
@@ -115,7 +126,7 @@ typedef struct ModuleIP_struct
|
||||
|
||||
std::string launchInstance(ModuleIP moduleip);
|
||||
|
||||
string calpontPackage1;
|
||||
string columnstorePackage;
|
||||
//string calpontPackage2;
|
||||
//string calpontPackage3;
|
||||
//string mysqlPackage;
|
||||
@@ -169,6 +180,7 @@ bool mysqlRep = false;
|
||||
string MySQLRep = "y";
|
||||
string PMwithUM = "n";
|
||||
bool amazonInstall = false;
|
||||
bool nonDistribute = false;
|
||||
|
||||
string DataFileEnvFile;
|
||||
|
||||
@@ -270,7 +282,7 @@ int main(int argc, char *argv[])
|
||||
cout << " Enter one of the options within [], if available, or" << endl;
|
||||
cout << " Enter a new value" << endl << endl;
|
||||
cout << endl;
|
||||
cout << "Usage: postConfigure [-h][-c][-u][-p][-s][-port][-i]" << endl;
|
||||
cout << "Usage: postConfigure [-h][-c][-u][-p][-s][-port][-i][-n]" << endl;
|
||||
cout << " -h Help" << endl;
|
||||
cout << " -c Config File to use to extract configuration data, default is Columnstore.xml.rpmsave" << endl;
|
||||
cout << " -u Upgrade, Install using the Config File from -c, default to Columnstore.xml.rpmsave" << endl;
|
||||
@@ -278,7 +290,8 @@ int main(int argc, char *argv[])
|
||||
cout << " -p Unix Password, used with no-prompting option" << endl;
|
||||
cout << " -s Single Threaded Remote Install" << endl;
|
||||
cout << " -port MariaDB ColumnStore Port Address" << endl;
|
||||
cout << " -i Non-root Install directory, Only use for non-root installs" << endl;
|
||||
cout << " -i Non-root Install directory, Only use for non-root installs" << endl;
|
||||
cout << " -n Non-distributed install, meaning it will not install the remote nodes" << endl;
|
||||
exit (0);
|
||||
}
|
||||
else if( string("-s") == argv[i] )
|
||||
@@ -315,7 +328,7 @@ int main(int argc, char *argv[])
|
||||
noPrompting = true;
|
||||
// for backward compatibility
|
||||
else if( string("-n") == argv[i] )
|
||||
noPrompting = true;
|
||||
nonDistribute = true;
|
||||
else if( string("-port") == argv[i] ) {
|
||||
i++;
|
||||
if (i >= argc ) {
|
||||
@@ -397,7 +410,7 @@ int main(int argc, char *argv[])
|
||||
//check if MariaDB ColumnStore is up and running
|
||||
if (oam.checkSystemRunning()) {
|
||||
cout << "MariaDB ColumnStore is running, can't run postConfigure while MariaDB ColumnStore is running. Exiting.." << endl;
|
||||
exit (0);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
//if InitialInstallFlag is set, then an install has been done
|
||||
@@ -423,6 +436,60 @@ int main(int argc, char *argv[])
|
||||
exit(1);
|
||||
}
|
||||
|
||||
//check for local ip address as pm1
|
||||
ModuleConfig moduleconfig;
|
||||
|
||||
try
|
||||
{
|
||||
oam.getSystemConfig("pm1", moduleconfig);
|
||||
if (moduleconfig.hostConfigList.size() > 0 )
|
||||
{
|
||||
HostConfigList::iterator pt1 = moduleconfig.hostConfigList.begin();
|
||||
string PM1ipAdd = (*pt1).IPAddr;
|
||||
//cout << PM1ipAdd << endl;
|
||||
|
||||
if ( PM1ipAdd != "127.0.0.1" && PM1ipAdd != "0.0.0.0")
|
||||
{
|
||||
struct ifaddrs *ifap, *ifa;
|
||||
struct sockaddr_in *sa;
|
||||
char *addr;
|
||||
bool found = false;
|
||||
|
||||
getifaddrs (&ifap);
|
||||
for (ifa = ifap; ifa; ifa = ifa->ifa_next) {
|
||||
if (ifa->ifa_addr->sa_family==AF_INET) {
|
||||
sa = (struct sockaddr_in *) ifa->ifa_addr;
|
||||
addr = inet_ntoa(sa->sin_addr);
|
||||
//printf("Interface: %s\tAddress: %s\n", ifa->ifa_name, addr);
|
||||
|
||||
if ( PM1ipAdd == addr )
|
||||
{
|
||||
//match
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (found)
|
||||
break;
|
||||
}
|
||||
|
||||
freeifaddrs(ifap);
|
||||
|
||||
if (!found)
|
||||
{
|
||||
cout << endl;
|
||||
cout << "ERROR: postConfigure install can only be done on the PM1" << endl;
|
||||
cout << "designated node. The configured PM1 IP address doesn't match the local" << endl;
|
||||
cout << "IP Address. exiting..." << endl;
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(...)
|
||||
{}
|
||||
|
||||
|
||||
// run my.cnf upgrade script
|
||||
if ( reuseConfig == "y" )
|
||||
{
|
||||
@@ -666,64 +733,6 @@ int main(int argc, char *argv[])
|
||||
exit(1);
|
||||
}
|
||||
|
||||
cout << "NOTE: The MariaDB ColumnStore Schema Sync feature will replicate all of the" << endl;
|
||||
cout << " schemas and InnoDB tables across the User Module nodes. This feature can be enabled" << endl;
|
||||
cout << " or disabled, for example, if you wish to configure your own replication post installation." << endl << endl;
|
||||
|
||||
try {
|
||||
MySQLRep = sysConfig->getConfig(InstallSection, "MySQLRep");
|
||||
}
|
||||
catch(...)
|
||||
{}
|
||||
|
||||
if ( MySQLRep == "y" )
|
||||
mysqlRep = true;
|
||||
|
||||
string answer = "y";
|
||||
|
||||
while(true) {
|
||||
if ( mysqlRep )
|
||||
prompt = "MariaDB ColumnStore Schema Sync feature is Enabled, do you want to leave enabled? [y,n] (y) > ";
|
||||
else
|
||||
prompt = "MariaDB ColumnStore Schema Sync feature, do you want to enable? [y,n] (y) > ";
|
||||
|
||||
pcommand = callReadline(prompt.c_str());
|
||||
if (pcommand) {
|
||||
if (strlen(pcommand) > 0) answer = pcommand;
|
||||
callFree(pcommand);
|
||||
}
|
||||
|
||||
if ( answer == "y" || answer == "n" ) {
|
||||
cout << endl;
|
||||
break;
|
||||
}
|
||||
else
|
||||
cout << "Invalid Entry, please enter 'y' for yes or 'n' for no" << endl;
|
||||
if ( noPrompting )
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ( answer == "y" ) {
|
||||
mysqlRep = true;
|
||||
MySQLRep = "y";
|
||||
}
|
||||
else
|
||||
{
|
||||
mysqlRep = false;
|
||||
MySQLRep = "n";
|
||||
}
|
||||
|
||||
try {
|
||||
sysConfig->setConfig(InstallSection, "MySQLRep", MySQLRep);
|
||||
}
|
||||
catch(...)
|
||||
{}
|
||||
|
||||
if ( !writeConfig(sysConfig) ) {
|
||||
cout << "ERROR: Failed trying to update MariaDB ColumnStore System Configuration file" << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
switch ( IserverTypeInstall ) {
|
||||
case (oam::INSTALL_COMBINE_DM_UM_PM): // combined #1 - dm/um/pm on a single server
|
||||
{
|
||||
@@ -813,6 +822,75 @@ int main(int argc, char *argv[])
|
||||
break;
|
||||
}
|
||||
|
||||
// check for Schema Schema is Local Query wasnt selected
|
||||
if (!pmwithum)
|
||||
{
|
||||
cout << "NOTE: The MariaDB ColumnStore Schema Sync feature will replicate all of the" << endl;
|
||||
cout << " schemas and InnoDB tables across the User Module nodes. This feature can be enabled" << endl;
|
||||
cout << " or disabled, for example, if you wish to configure your own replication post installation." << endl << endl;
|
||||
|
||||
try {
|
||||
MySQLRep = sysConfig->getConfig(InstallSection, "MySQLRep");
|
||||
}
|
||||
catch(...)
|
||||
{}
|
||||
|
||||
if ( MySQLRep == "y" )
|
||||
mysqlRep = true;
|
||||
|
||||
string answer = "y";
|
||||
|
||||
while(true) {
|
||||
if ( mysqlRep )
|
||||
prompt = "MariaDB ColumnStore Schema Sync feature is Enabled, do you want to leave enabled? [y,n] (y) > ";
|
||||
else
|
||||
prompt = "MariaDB ColumnStore Schema Sync feature, do you want to enable? [y,n] (y) > ";
|
||||
|
||||
pcommand = callReadline(prompt.c_str());
|
||||
if (pcommand) {
|
||||
if (strlen(pcommand) > 0) answer = pcommand;
|
||||
callFree(pcommand);
|
||||
}
|
||||
|
||||
if ( answer == "y" || answer == "n" ) {
|
||||
cout << endl;
|
||||
break;
|
||||
}
|
||||
else
|
||||
cout << "Invalid Entry, please enter 'y' for yes or 'n' for no" << endl;
|
||||
|
||||
if ( noPrompting )
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ( answer == "y" ) {
|
||||
mysqlRep = true;
|
||||
MySQLRep = "y";
|
||||
}
|
||||
else
|
||||
{
|
||||
mysqlRep = false;
|
||||
MySQLRep = "n";
|
||||
}
|
||||
|
||||
try {
|
||||
sysConfig->setConfig(InstallSection, "MySQLRep", MySQLRep);
|
||||
}
|
||||
catch(...)
|
||||
{}
|
||||
}
|
||||
else
|
||||
{ //Schema Sync is default as on when Local Query is Selected
|
||||
mysqlRep = true;
|
||||
MySQLRep = "y";
|
||||
|
||||
try {
|
||||
sysConfig->setConfig(InstallSection, "MySQLRep", MySQLRep);
|
||||
}
|
||||
catch(...)
|
||||
{}
|
||||
}
|
||||
|
||||
if ( !writeConfig(sysConfig) ) {
|
||||
cout << "ERROR: Failed trying to update MariaDB ColumnStore System Configuration file" << endl;
|
||||
exit(1);
|
||||
@@ -2600,7 +2678,42 @@ int main(int argc, char *argv[])
|
||||
/* create a thread_data_t argument array */
|
||||
thread_data_t thr_data[childmodulelist.size()];
|
||||
|
||||
// determine package type
|
||||
string EEPackageType;
|
||||
|
||||
if (!rootUser)
|
||||
EEPackageType = "binary";
|
||||
else
|
||||
{
|
||||
int rtnCode = system("rpm -qi mariadb-columnstore-platform > /tmp/columnstore.txt 2>&1");
|
||||
if (WEXITSTATUS(rtnCode) == 0)
|
||||
EEPackageType = "rpm";
|
||||
else {
|
||||
rtnCode = system("dpkg -s mariadb-columnstore-platform > /tmp/columnstore.txt 2>&1");
|
||||
if (WEXITSTATUS(rtnCode) == 0)
|
||||
EEPackageType = "deb";
|
||||
else
|
||||
EEPackageType = "binary";
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
sysConfig->setConfig(InstallSection, "EEPackageType", EEPackageType);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
cout << "ERROR: Problem setting EEPackageType from the MariaDB ColumnStore System Configuration file" << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ( !writeConfig(sysConfig) ) {
|
||||
cout << "ERROR: Failed trying to update MariaDB ColumnStore System Configuration file" << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
string install = "y";
|
||||
|
||||
if ( IserverTypeInstall != oam::INSTALL_COMBINE_DM_UM_PM ||
|
||||
pmNumber > 1 ) {
|
||||
//
|
||||
@@ -2643,128 +2756,43 @@ int main(int argc, char *argv[])
|
||||
|
||||
cout << endl;
|
||||
|
||||
//Write out Updated System Configuration File
|
||||
string EEPackageType;
|
||||
if ( rootUser )
|
||||
{
|
||||
try {
|
||||
EEPackageType = sysConfig->getConfig(InstallSection, "EEPackageType");
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
cout << "ERROR: Problem getting EEPackageType from the MariaDB ColumnStore System Configuration file" << endl;
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
else //nonroot, default to binary
|
||||
EEPackageType = "binary";
|
||||
|
||||
while(true) {
|
||||
prompt = "Enter the Package Type being installed to other servers [rpm,deb,binary] (" + EEPackageType + ") > ";
|
||||
pcommand = callReadline(prompt);
|
||||
if (pcommand) {
|
||||
if (strlen(pcommand) > 0) EEPackageType = pcommand;
|
||||
callFree(pcommand);
|
||||
}
|
||||
|
||||
if ( EEPackageType == "rpm" || EEPackageType == "deb" || EEPackageType == "binary" ) {
|
||||
break;
|
||||
}
|
||||
cout << "Invalid Package Type, please re-enter" << endl;
|
||||
EEPackageType = "rpm";
|
||||
if ( noPrompting )
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ( EEPackageType == "rpm" )
|
||||
{
|
||||
cout << "Performing an MariaDB ColumnStore System install using RPM packages" << endl;
|
||||
cout << "located in the " + HOME + " directory." << endl << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( EEPackageType == "binary" )
|
||||
{
|
||||
cout << "Performing an MariaDB ColumnStore System install using a Binary package" << endl;
|
||||
cout << "located in the " + HOME + " directory." << endl << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << "Performing an MariaDB ColumnStore System install using using DEB packages" << endl;
|
||||
cout << "located in the " + HOME + " directory." << endl;
|
||||
}
|
||||
}
|
||||
|
||||
//Write out Updated System Configuration File
|
||||
try {
|
||||
sysConfig->setConfig(InstallSection, "EEPackageType", EEPackageType);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
cout << "ERROR: Problem setting EEPackageType from the MariaDB ColumnStore System Configuration file" << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ( !writeConfig(sysConfig) ) {
|
||||
cout << "ERROR: Failed trying to update MariaDB ColumnStore System Configuration file" << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
//check if pkgs are located in $HOME directory
|
||||
string version = systemsoftware.Version + "-" + systemsoftware.Release;
|
||||
if ( EEPackageType != "binary") {
|
||||
string separator = "-";
|
||||
calpontPackage1 = "mariadb-columnstore-*" + separator + version;
|
||||
//calpontPackage2 = "mariadb-columnstore-libs" + separator + version;
|
||||
//calpontPackage3 = "mariadb-columnstore-enterprise" + separator + version;
|
||||
//mysqlPackage = "mariadb-columnstore-storage-engine" + separator + version;
|
||||
//mysqldPackage = "mariadb-columnstore-mysql" + separator + version;
|
||||
|
||||
if( !pkgCheck() ) {
|
||||
exit(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
//mariadb
|
||||
calpontPackage1 = "mariadb-columnstore-*" + separator + version;
|
||||
|
||||
calpontPackage1 = HOME + "/" + calpontPackage1 + "*." + EEPackageType;
|
||||
//calpontPackage2 = HOME + "/" + calpontPackage2 + "*." + EEPackageType;
|
||||
//calpontPackage3 = HOME + "/" + calpontPackage3 + "*." + EEPackageType;
|
||||
//mysqlPackage = HOME + "/" + mysqlPackage + "*." + EEPackageType;
|
||||
//mysqldPackage = HOME + "/" + mysqldPackage + "*." + EEPackageType;
|
||||
}
|
||||
}
|
||||
else
|
||||
if ( !nonDistribute )
|
||||
{
|
||||
// binary
|
||||
//string fileName = installDir + "/bin/healthcheck";
|
||||
//ifstream file (fileName.c_str());
|
||||
//if (!file) // CE
|
||||
calpontPackage1 = "mariadb-columnstore-" + version;
|
||||
//else // EE
|
||||
//calpontPackage1 = "mariadb-columnstore-ent-" + version;
|
||||
//calpontPackage2 = "dummy";
|
||||
//calpontPackage3 = "dummy";
|
||||
//mysqlPackage = calpontPackage1;
|
||||
//mysqldPackage = calpontPackage1;
|
||||
if ( EEPackageType == "rpm" )
|
||||
{
|
||||
cout << "Performing an MariaDB ColumnStore System install using RPM packages" << endl;
|
||||
cout << "located in the " + HOME + " directory." << endl << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( EEPackageType == "binary" )
|
||||
{
|
||||
cout << "Performing an MariaDB ColumnStore System install using a Binary package" << endl;
|
||||
cout << "located in the " + HOME + " directory." << endl << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << "Performing an MariaDB ColumnStore System install using using DEB packages" << endl;
|
||||
cout << "located in the " + HOME + " directory." << endl;
|
||||
}
|
||||
}
|
||||
|
||||
//check if pkgs are located in $HOME directory
|
||||
if ( EEPackageType == "rpm")
|
||||
columnstorePackage = HOME + "/" + "mariadb-columnstore-" + version + "*.rpm.tar.gz";
|
||||
else
|
||||
if ( EEPackageType == "deb")
|
||||
columnstorePackage = HOME + "/" + "mariadb-columnstore-" + version + "*.deb.tar.gz";
|
||||
else
|
||||
columnstorePackage = HOME + "/" + "mariadb-columnstore-" + version + "*.bin.tar.gz";
|
||||
|
||||
if( !pkgCheck() )
|
||||
exit(1);
|
||||
calpontPackage1 = HOME + "/" + calpontPackage1 + "*.bin.tar.gz";
|
||||
//calpontPackage2 = "dummy";
|
||||
//calpontPackage3 = "dummy";
|
||||
|
||||
if( !pkgCheck(columnstorePackage) )
|
||||
exit(1);
|
||||
}
|
||||
|
||||
//If ent pkg is not there, mark it as such
|
||||
//{
|
||||
// glob_t gt;
|
||||
// memset(>, 0, sizeof(gt));
|
||||
// if (glob(calpontPackage3.c_str(), 0, 0, >) != 0)
|
||||
// calpontPackage3 = "dummy.rpm";
|
||||
// globfree(>);
|
||||
//}
|
||||
|
||||
|
||||
if ( password.empty() )
|
||||
{
|
||||
cout << endl;
|
||||
@@ -2852,6 +2880,23 @@ int main(int argc, char *argv[])
|
||||
(remoteModuleType == "pm" && IserverTypeInstall == oam::INSTALL_COMBINE_DM_UM_PM) ||
|
||||
(remoteModuleType == "pm" && pmwithum) )
|
||||
{
|
||||
if ( nonDistribute )
|
||||
{
|
||||
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";
|
||||
int rtnCode = system(cmd.c_str());
|
||||
if (WEXITSTATUS(rtnCode) != 0) {
|
||||
cout << endl << "Error MariaDB-ColumnStore packages 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" )
|
||||
@@ -2974,7 +3019,7 @@ int main(int argc, char *argv[])
|
||||
// checkRemoteMysqlPort(remoteModuleIP, remoteModuleName, USER, password, mysqlPort, sysConfig);
|
||||
|
||||
cmd = installDir + "/bin/binary_installer.sh " + remoteModuleName + " " +
|
||||
remoteModuleIP + " " + password + " " + calpontPackage1 + " " + remoteModuleType +
|
||||
remoteModuleIP + " " + password + " " + columnstorePackage + " " + remoteModuleType +
|
||||
" initial " + binservertype + " " + mysqlPort + " " + remote_installer_debug +
|
||||
" " + installDir + " " + debug_logfile;
|
||||
|
||||
@@ -3000,12 +3045,30 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( (remoteModuleType == "pm" && IserverTypeInstall != oam::INSTALL_COMBINE_DM_UM_PM) ||
|
||||
(remoteModuleType == "pm" && !pmwithum ) )
|
||||
{
|
||||
if ( nonDistribute )
|
||||
{
|
||||
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";
|
||||
int rtnCode = system(cmd.c_str());
|
||||
if (WEXITSTATUS(rtnCode) != 0) {
|
||||
cout << endl << "Error MariaDB-ColumnStore packages 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" )
|
||||
@@ -3044,7 +3107,7 @@ int main(int argc, char *argv[])
|
||||
if ( pmwithum )
|
||||
binservertype = "pmwithum";
|
||||
cmd = installDir + "/bin/binary_installer.sh " + remoteModuleName + " " + remoteModuleIP +
|
||||
" " + password + " " + calpontPackage1 + " " + remoteModuleType + " initial " +
|
||||
" " + password + " " + columnstorePackage + " " + remoteModuleType + " initial " +
|
||||
binservertype + " " + mysqlPort + " " + remote_installer_debug + " " + installDir + " " +
|
||||
debug_logfile;
|
||||
|
||||
@@ -3070,11 +3133,12 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( thread_remote_installer ) {
|
||||
if ( thread_remote_installer && !nonDistribute ) {
|
||||
|
||||
//wait until remove install Thread Count is at zero or hit timeout
|
||||
cout << endl << "MariaDB ColumnStore Package being installed, please wait ...";
|
||||
@@ -3661,6 +3725,14 @@ bool setOSFiles(string parentOAMModuleName, int serverTypeInstall)
|
||||
system(cmd.c_str());
|
||||
}
|
||||
|
||||
//check and do the amazon credentials file
|
||||
string fileName = HOME + "/.aws/credentials";
|
||||
ifstream oldFile (fileName.c_str());
|
||||
if (!oldFile)
|
||||
return allfound;
|
||||
|
||||
string cmd = "cp " + fileName + " " + installDir + "/local/etc/. > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
return allfound;
|
||||
}
|
||||
|
||||
@@ -3957,14 +4029,14 @@ bool createDbrootDirs(string DBRootStorageType)
|
||||
/*
|
||||
* pkgCheck
|
||||
*/
|
||||
bool pkgCheck()
|
||||
bool pkgCheck(string columnstorePackage)
|
||||
{
|
||||
while(true)
|
||||
{
|
||||
string cmd = "ls " + HOME + " | grep " + calpontPackage1 + " > /tmp/calpontpkgs";
|
||||
string cmd = "ls " + columnstorePackage + " > /tmp/calpontpkgs";
|
||||
system(cmd.c_str());
|
||||
|
||||
string pkg = calpontPackage1;
|
||||
string pkg = columnstorePackage;
|
||||
string fileName = "/tmp/calpontpkgs";
|
||||
ifstream oldFile (fileName.c_str());
|
||||
if (oldFile) {
|
||||
@@ -4828,6 +4900,7 @@ bool storageSetup(bool amazonInstall)
|
||||
|
||||
void setSystemName()
|
||||
{
|
||||
Oam oam;
|
||||
//setup System Name
|
||||
try {
|
||||
systemName = sysConfig->getConfig(SystemSection, "SystemName");
|
||||
@@ -4850,6 +4923,7 @@ void setSystemName()
|
||||
|
||||
try {
|
||||
sysConfig->setConfig(SystemSection, "SystemName", systemName);
|
||||
oam.changeMyCnf( "server_audit_syslog_info", systemName );
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
|
||||
@@ -277,7 +277,7 @@ int main(int argc, char **argv)
|
||||
log.writeLog(__LINE__, "ERROR: makeConfig failed", LOG_TYPE_ERROR);
|
||||
}
|
||||
|
||||
// get updated Columnstore.xml, retry in case ProcMgr isn't up yet
|
||||
// get updated Columnstore.xml and ProcessConfig.xml, retry in case ProcMgr isn't up yet
|
||||
if (!HDFS)
|
||||
{
|
||||
int count = 0;
|
||||
@@ -286,6 +286,9 @@ int main(int argc, char **argv)
|
||||
try {
|
||||
oam.distributeConfigFile(config.moduleName());
|
||||
log.writeLog(__LINE__, "Successfull return from distributeConfigFile", LOG_TYPE_DEBUG);
|
||||
|
||||
oam.distributeConfigFile(config.moduleName(), "ProcessConfig.xml");
|
||||
log.writeLog(__LINE__, "Successfull return from distributeProcessFile", LOG_TYPE_DEBUG);
|
||||
break;
|
||||
}
|
||||
catch(...) {
|
||||
@@ -337,6 +340,10 @@ int main(int argc, char **argv)
|
||||
try {
|
||||
oam.distributeConfigFile(config.moduleName());
|
||||
log.writeLog(__LINE__, "Successfull return from distributeConfigFile", LOG_TYPE_DEBUG);
|
||||
|
||||
oam.distributeConfigFile(config.moduleName(), "ProcessConfig.xml");
|
||||
log.writeLog(__LINE__, "Successfull return from distributeProcessFile", LOG_TYPE_DEBUG);
|
||||
|
||||
break;
|
||||
}
|
||||
catch(...) {
|
||||
|
||||
Reference in New Issue
Block a user