You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-11-25 20:23:16 +03:00
MCOL-520
This commit is contained in:
@@ -56,6 +56,7 @@ extern bool HDFS;
|
||||
extern string localHostName;
|
||||
extern string PMwithUM;
|
||||
extern string AmazonPMFailover;
|
||||
extern string tmpLogDir;
|
||||
|
||||
typedef map<string, int> moduleList;
|
||||
extern moduleList moduleInfoList;
|
||||
@@ -2727,7 +2728,7 @@ void processMSG(messageqcpp::IOSocket* cfIos)
|
||||
// Save the BRM. This command presages a system backup. Best to have a current BRM on disk
|
||||
string logdir("/var/log/mariadb/columnstore");
|
||||
|
||||
if (access(logdir.c_str(), W_OK) != 0) logdir = "/tmp";
|
||||
if (access(logdir.c_str(), W_OK) != 0) logdir = tmpLogDir;
|
||||
|
||||
string cmd = startup::StartUp::installDir() + "/bin/save_brm > " + logdir + "/save_brm.log1 2>&1";
|
||||
int rtnCode = system(cmd.c_str());
|
||||
@@ -5134,17 +5135,17 @@ int ProcessManager::addModule(oam::DeviceNetworkList devicenetworklist, std::str
|
||||
continue;
|
||||
}
|
||||
|
||||
string cmd = installDir + "/bin/remote_command.sh " + IPAddr + " " + password + " 'ls' 1 > /tmp/login_test.log";
|
||||
string loginTmp = tmpLogDir + "/login_test.log";
|
||||
string cmd = installDir + "/bin/remote_command.sh " + IPAddr + " " + password + " 'ls' 1 > " + loginTmp;
|
||||
system(cmd.c_str());
|
||||
|
||||
if (!oam.checkLogStatus("/tmp/login_test.log", "README"))
|
||||
if (!oam.checkLogStatus(loginTmp, "README"))
|
||||
{
|
||||
//check for RSA KEY ISSUE and fix
|
||||
if (oam.checkLogStatus("/tmp/login_test.log", "Offending"))
|
||||
if (oam.checkLogStatus(loginTmp, "Offending"))
|
||||
{
|
||||
log.writeLog(__LINE__, "addModule - login failed, Offending key issue, try fixing: " + moduleName, LOG_TYPE_DEBUG);
|
||||
string file = "/tmp/login_test.log";
|
||||
oam.fixRSAkey(file);
|
||||
oam.fixRSAkey(loginTmp);
|
||||
}
|
||||
|
||||
log.writeLog(__LINE__, "addModule - login failed, retry login test: " + moduleName, LOG_TYPE_DEBUG);
|
||||
@@ -5551,7 +5552,7 @@ int ProcessManager::addModule(oam::DeviceNetworkList devicenetworklist, std::str
|
||||
//set root password
|
||||
if (amazon)
|
||||
{
|
||||
cmd = startup::StartUp::installDir() + "/bin/remote_command.sh " + remoteModuleIP + " " + password + " '/root/.scripts/updatePassword.sh " + password + "' > /tmp/password_change.log";
|
||||
cmd = startup::StartUp::installDir() + "/bin/remote_command.sh " + remoteModuleIP + " " + password + " '/root/.scripts/updatePassword.sh " + password + "' > " + tmpLogDir + "/password_change.log";
|
||||
log.writeLog(__LINE__, "addModule - cmd: " + cmd, LOG_TYPE_DEBUG);
|
||||
int rtnCode = system(cmd.c_str());
|
||||
|
||||
@@ -5572,7 +5573,7 @@ int ProcessManager::addModule(oam::DeviceNetworkList devicenetworklist, std::str
|
||||
//run remote installer script
|
||||
if ( packageType != "binary" )
|
||||
{
|
||||
string logFile = "/tmp/" + remoteModuleName + "_user_installer.log";
|
||||
string logFile = tmpLogDir + "/" + remoteModuleName + "_user_installer.log";
|
||||
log.writeLog(__LINE__, "addModule - user_installer run for " + remoteModuleName, LOG_TYPE_DEBUG);
|
||||
|
||||
string cmd = installDir + "/bin/package_installer.sh " + remoteModuleName + " " + remoteModuleIP + " " + password + " " + version + " initial " + AmazonInstall + " " + packageType + " --nodeps 1 > " + logFile;
|
||||
@@ -5643,7 +5644,7 @@ int ProcessManager::addModule(oam::DeviceNetworkList devicenetworklist, std::str
|
||||
else
|
||||
{
|
||||
// do a binary package install
|
||||
string logFile = "/tmp/" + remoteModuleName + "_binary_installer.log";
|
||||
string logFile = tmpLogDir + "/" + remoteModuleName + "_binary_installer.log";
|
||||
log.writeLog(__LINE__, "addModule - binary_installer run for " + remoteModuleName, LOG_TYPE_DEBUG);
|
||||
|
||||
string binservertype = oam.itoa(config.ServerInstallType());
|
||||
@@ -5723,7 +5724,7 @@ int ProcessManager::addModule(oam::DeviceNetworkList devicenetworklist, std::str
|
||||
{
|
||||
if ( packageType != "binary" )
|
||||
{
|
||||
string logFile = "/tmp/" + remoteModuleName + "_package_installer.log";
|
||||
string logFile = tmpLogDir + "/" + remoteModuleName + "_package_installer.log";
|
||||
log.writeLog(__LINE__, "addModule - package_installer run for " + remoteModuleName, LOG_TYPE_DEBUG);
|
||||
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);
|
||||
@@ -5792,7 +5793,7 @@ int ProcessManager::addModule(oam::DeviceNetworkList devicenetworklist, std::str
|
||||
else
|
||||
{
|
||||
// do a binary package install
|
||||
string logFile = "/tmp/" + remoteModuleName + "_binary_installer.log";
|
||||
string logFile = tmpLogDir + "/" + remoteModuleName + "_binary_installer.log";
|
||||
log.writeLog(__LINE__, "addModule - binary_installer run for " + remoteModuleName, LOG_TYPE_DEBUG);
|
||||
|
||||
string binservertype = oam.itoa(config.ServerInstallType());
|
||||
@@ -7038,7 +7039,7 @@ void ProcessManager::saveBRM(bool skipSession, bool clearshm)
|
||||
Oam oam;
|
||||
string logdir("/var/log/mariadb/columnstore");
|
||||
|
||||
if (access(logdir.c_str(), W_OK) != 0) logdir = "/tmp";
|
||||
if (access(logdir.c_str(), W_OK) != 0) logdir = tmpLogDir;
|
||||
|
||||
log.writeLog(__LINE__, "Running reset_locks", LOG_TYPE_DEBUG);
|
||||
|
||||
@@ -11096,7 +11097,8 @@ int ProcessManager::mountDBRoot(std::string dbrootID)
|
||||
//send msg to ProcMon if not local module
|
||||
if ( config.moduleName() == moduleName )
|
||||
{
|
||||
string cmd = "export LC_ALL=C;mount " + startup::StartUp::installDir() + "/data" + dbrootID + " > /tmp/mount.txt";
|
||||
string tmpMount = tmpLogDir + "/mount.txt";
|
||||
string cmd = "export LC_ALL=C;mount " + startup::StartUp::installDir() + "/data" + dbrootID + " > " + tmpMount;
|
||||
system(cmd.c_str());
|
||||
|
||||
if ( !rootUser)
|
||||
@@ -11105,14 +11107,14 @@ int ProcessManager::mountDBRoot(std::string dbrootID)
|
||||
system(cmd.c_str());
|
||||
}
|
||||
|
||||
ifstream in("/tmp/mount.txt");
|
||||
ifstream in(tmpMount);
|
||||
|
||||
in.seekg(0, std::ios::end);
|
||||
int size = in.tellg();
|
||||
|
||||
if ( size != 0 )
|
||||
{
|
||||
if (!oam.checkLogStatus("/tmp/mount.txt", "already"))
|
||||
if (!oam.checkLogStatus(tmpMount, "already"))
|
||||
{
|
||||
log.writeLog(__LINE__, "mount failed, dbroot: " + dbrootID);
|
||||
return API_FAILURE;
|
||||
|
||||
Reference in New Issue
Block a user