You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
MCOL-3842: logging cleanup
This commit is contained in:
@ -5996,12 +5996,12 @@ bool Oam::autoMovePmDbroot(std::string residePM)
|
|||||||
|
|
||||||
if ( ret != 0 )
|
if ( ret != 0 )
|
||||||
{
|
{
|
||||||
writeLog("FAILURE: Error assigning gluster dbroot# " + itoa(dbrootID), LOG_TYPE_ERROR );
|
writeLog("FAILURE: Error assigning gluster dbroot# " + itoa(dbrootID) +" ret: " + itoa(ret), LOG_TYPE_ERROR );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
writeLog("FAILURE: Error assigning gluster dbroot# " + itoa(dbrootID), LOG_TYPE_ERROR );
|
writeLog("EXCEPTION FAILURE: Error assigning gluster dbroot# " + itoa(dbrootID), LOG_TYPE_ERROR );
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if a copy is available when residePM returns
|
// check if a copy is available when residePM returns
|
||||||
@ -7448,15 +7448,15 @@ void Oam::removeDbroot(DBRootConfigList& dbrootlist)
|
|||||||
catch (exception& e)
|
catch (exception& e)
|
||||||
{
|
{
|
||||||
cout << endl << "**** glusterctl API exception: " << e.what() << endl;
|
cout << endl << "**** glusterctl API exception: " << e.what() << endl;
|
||||||
cerr << "FAILURE: Error assigning gluster dbroot# " + itoa(dbrootID) << endl;
|
cerr << "FAILURE: Error deleting gluster dbroot# " + itoa(dbrootID) << endl;
|
||||||
writeLog("FAILURE: Error assigning gluster dbroot# " + itoa(dbrootID), LOG_TYPE_ERROR );
|
writeLog("FAILURE: Error deleting gluster dbroot# " + itoa(dbrootID), LOG_TYPE_ERROR );
|
||||||
exceptionControl("removeDbroot", API_FAILURE);
|
exceptionControl("removeDbroot", API_FAILURE);
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
cout << endl << "**** glusterctl API exception: UNKNOWN" << endl;
|
cout << endl << "**** glusterctl API exception: UNKNOWN" << endl;
|
||||||
cerr << "FAILURE: Error assigning gluster dbroot# " + itoa(dbrootID) << endl;
|
cerr << "FAILURE: Error deleting gluster dbroot# " + itoa(dbrootID) << endl;
|
||||||
writeLog("FAILURE: Error assigning gluster dbroot# " + itoa(dbrootID), LOG_TYPE_ERROR );
|
writeLog("FAILURE: Error deleting gluster dbroot# " + itoa(dbrootID), LOG_TYPE_ERROR );
|
||||||
exceptionControl("removeDbroot", API_FAILURE);
|
exceptionControl("removeDbroot", API_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -9151,7 +9151,7 @@ int Oam::glusterctl(GLUSTER_COMMANDS command, std::string argument1, std::string
|
|||||||
string dbr = sysConfig->getConfig("SystemModuleConfig", ModuleDBRootID);
|
string dbr = sysConfig->getConfig("SystemModuleConfig", ModuleDBRootID);
|
||||||
string command = "" + DataRedundancyConfigs[pm].pmIpAddr +
|
string command = "" + DataRedundancyConfigs[pm].pmIpAddr +
|
||||||
":/dbroot" + dbr + " /var/lib/columnstore/data" + dbr +
|
":/dbroot" + dbr + " /var/lib/columnstore/data" + dbr +
|
||||||
" glusterfs defaults,direct-io-mode=enable 00";
|
" glusterfs defaults,direct-io-mode=enable 0 0";
|
||||||
string toPM = "pm" + itoa(pm + 1);
|
string toPM = "pm" + itoa(pm + 1);
|
||||||
distributeFstabUpdates(command, toPM);
|
distributeFstabUpdates(command, toPM);
|
||||||
}
|
}
|
||||||
|
@ -3806,8 +3806,6 @@ int ProcessManager::disableModule(string target, bool manualFlag)
|
|||||||
//set Columnstore.xml enable state
|
//set Columnstore.xml enable state
|
||||||
setEnableState( target, SnewState);
|
setEnableState( target, SnewState);
|
||||||
|
|
||||||
log.writeLog(__LINE__, "disableModule - setEnableState", LOG_TYPE_DEBUG);
|
|
||||||
|
|
||||||
//sleep a bit to give time for the state change to apply
|
//sleep a bit to give time for the state change to apply
|
||||||
sleep(1);
|
sleep(1);
|
||||||
|
|
||||||
@ -3816,8 +3814,6 @@ int ProcessManager::disableModule(string target, bool manualFlag)
|
|||||||
{
|
{
|
||||||
if ( updatePMSconfig() != API_SUCCESS )
|
if ( updatePMSconfig() != API_SUCCESS )
|
||||||
return API_FAILURE;
|
return API_FAILURE;
|
||||||
|
|
||||||
log.writeLog(__LINE__, "disableModule - Updated PM server Count", LOG_TYPE_DEBUG);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Update DBRM section of Columnstore.xml
|
//Update DBRM section of Columnstore.xml
|
||||||
@ -6514,12 +6510,12 @@ int ProcessManager::sendMsgProcMon( std::string module, ByteStream msg, int requ
|
|||||||
catch (SocketClosed& ex)
|
catch (SocketClosed& ex)
|
||||||
{
|
{
|
||||||
string error = ex.what();
|
string error = ex.what();
|
||||||
// log.writeLog(__LINE__, "EXCEPTION ERROR on mqRequest.read, module " + module + " : " + error, LOG_TYPE_ERROR);
|
log.writeLog(__LINE__, "EXCEPTION ERROR on mqRequest.read, module " + module + " : " + error, LOG_TYPE_ERROR);
|
||||||
return returnStatus;
|
return returnStatus;
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
// log.writeLog(__LINE__, "EXCEPTION ERROR on mqRequest.read: Caught unknown exception! module " + module, LOG_TYPE_ERROR);
|
log.writeLog(__LINE__, "EXCEPTION ERROR on mqRequest.read: Caught unknown exception! module " + module, LOG_TYPE_ERROR);
|
||||||
return returnStatus;
|
return returnStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6567,11 +6563,11 @@ int ProcessManager::sendMsgProcMon( std::string module, ByteStream msg, int requ
|
|||||||
catch (exception& ex)
|
catch (exception& ex)
|
||||||
{
|
{
|
||||||
string error = ex.what();
|
string error = ex.what();
|
||||||
// log.writeLog(__LINE__, "EXCEPTION ERROR on MessageQueueClient: " + error, LOG_TYPE_ERROR);
|
log.writeLog(__LINE__, "EXCEPTION ERROR on MessageQueueClient: " + error, LOG_TYPE_ERROR);
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
// log.writeLog(__LINE__, "EXCEPTION ERROR on MessageQueueClient: Caught unknown exception!", LOG_TYPE_ERROR);
|
log.writeLog(__LINE__, "EXCEPTION ERROR on MessageQueueClient: Caught unknown exception!", LOG_TYPE_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
return returnStatus;
|
return returnStatus;
|
||||||
@ -8005,8 +8001,6 @@ int ProcessManager::updatePMSconfig( bool check )
|
|||||||
vector<string> IpAddrs;
|
vector<string> IpAddrs;
|
||||||
vector<int> nicIDs;
|
vector<int> nicIDs;
|
||||||
|
|
||||||
log.writeLog(__LINE__, "updatePMSconfig Started", LOG_TYPE_DEBUG);
|
|
||||||
|
|
||||||
pthread_mutex_lock(&THREAD_LOCK);
|
pthread_mutex_lock(&THREAD_LOCK);
|
||||||
|
|
||||||
ModuleTypeConfig moduletypeconfig;
|
ModuleTypeConfig moduletypeconfig;
|
||||||
@ -8195,8 +8189,6 @@ int ProcessManager::updateWorkerNodeconfig()
|
|||||||
vector <string> module;
|
vector <string> module;
|
||||||
vector <string> ipadr;
|
vector <string> ipadr;
|
||||||
|
|
||||||
log.writeLog(__LINE__, "updateWorkerNodeconfig Started", LOG_TYPE_DEBUG);
|
|
||||||
|
|
||||||
pthread_mutex_lock(&THREAD_LOCK);
|
pthread_mutex_lock(&THREAD_LOCK);
|
||||||
|
|
||||||
//setup current module as work-node #1 by entering it in first
|
//setup current module as work-node #1 by entering it in first
|
||||||
@ -8309,8 +8301,6 @@ int ProcessManager::updateWorkerNodeconfig()
|
|||||||
sysConfig3->write();
|
sysConfig3->write();
|
||||||
pthread_mutex_unlock(&THREAD_LOCK);
|
pthread_mutex_unlock(&THREAD_LOCK);
|
||||||
|
|
||||||
log.writeLog(__LINE__, "updateWorkerNodeconfig completed", LOG_TYPE_DEBUG);
|
|
||||||
|
|
||||||
return API_SUCCESS;
|
return API_SUCCESS;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -8817,7 +8807,6 @@ int ProcessManager::getDBRMData(messageqcpp::IOSocket fIos, std::string moduleNa
|
|||||||
// StorageManager: Need to make these existence checks use an idbfilesystem op if we
|
// StorageManager: Need to make these existence checks use an idbfilesystem op if we
|
||||||
// decide to put the BRM-managed files in cloud storage
|
// decide to put the BRM-managed files in cloud storage
|
||||||
string currentDbrmFile;
|
string currentDbrmFile;
|
||||||
log.writeLog(__LINE__, "I declare that I am ProcMgr, and I am running getDBRMData!", LOG_TYPE_DEBUG);
|
|
||||||
IDBFileSystem &fs = IDBPolicy::getFs(currentFileName.c_str());
|
IDBFileSystem &fs = IDBPolicy::getFs(currentFileName.c_str());
|
||||||
boost::scoped_ptr<IDBDataFile> oldFile(IDBDataFile::open(IDBPolicy::getType(currentFileName.c_str(),
|
boost::scoped_ptr<IDBDataFile> oldFile(IDBDataFile::open(IDBPolicy::getType(currentFileName.c_str(),
|
||||||
IDBPolicy::WRITEENG),
|
IDBPolicy::WRITEENG),
|
||||||
@ -10098,12 +10087,6 @@ int ProcessManager::OAMParentModuleChange()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// processManager.restartProcessType("mysql", localModule);
|
|
||||||
// processManager.restartProcessType("ExeMgr", localModule);
|
|
||||||
// processManager.restartProcessType("WriteEngineServer", localModule);
|
|
||||||
|
|
||||||
// processManager.reinitProcessType("DBRMWorkerNode");
|
|
||||||
|
|
||||||
//send message to start new Standby Process-Manager, if needed
|
//send message to start new Standby Process-Manager, if needed
|
||||||
newStandbyModule = getStandbyModule();
|
newStandbyModule = getStandbyModule();
|
||||||
|
|
||||||
@ -10184,15 +10167,6 @@ int ProcessManager::OAMParentModuleChange()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//restart DDLProc/DMLProc to perform any rollbacks, if needed
|
|
||||||
//dont rollback in amazon, wait until down pm recovers
|
|
||||||
// if ( ( config.ServerInstallType() != oam::INSTALL_COMBINE_DM_UM_PM )
|
|
||||||
// && !amazon ) {
|
|
||||||
// processManager.restartProcessType("DDLProc", config.moduleName());
|
|
||||||
// sleep(1);
|
|
||||||
// processManager.restartProcessType("DMLProc", config.moduleName());
|
|
||||||
// }
|
|
||||||
|
|
||||||
if ( config.ServerInstallType() == oam::INSTALL_COMBINE_DM_UM_PM )
|
if ( config.ServerInstallType() == oam::INSTALL_COMBINE_DM_UM_PM )
|
||||||
{
|
{
|
||||||
//change master MySQL Replication setup
|
//change master MySQL Replication setup
|
||||||
@ -10301,8 +10275,6 @@ std::string ProcessManager::getStandbyModule()
|
|||||||
string backupStandbyModule = "NONE";
|
string backupStandbyModule = "NONE";
|
||||||
string newStandbyModule = "NONE";
|
string newStandbyModule = "NONE";
|
||||||
|
|
||||||
log.writeLog(__LINE__, "getStandbyModule called", LOG_TYPE_DEBUG);
|
|
||||||
|
|
||||||
//check if gluster, if so then find PMs that have copies of DBROOT #1
|
//check if gluster, if so then find PMs that have copies of DBROOT #1
|
||||||
string pmList = "";
|
string pmList = "";
|
||||||
|
|
||||||
@ -10431,8 +10403,6 @@ bool ProcessManager::setStandbyModule(std::string newStandbyModule, bool send)
|
|||||||
{
|
{
|
||||||
Oam oam;
|
Oam oam;
|
||||||
|
|
||||||
log.writeLog(__LINE__, "setStandbyModule called", LOG_TYPE_DEBUG);
|
|
||||||
|
|
||||||
if ( newStandbyModule.empty() )
|
if ( newStandbyModule.empty() )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@ -10502,8 +10472,6 @@ bool ProcessManager::clearStandbyModule()
|
|||||||
{
|
{
|
||||||
Oam oam;
|
Oam oam;
|
||||||
|
|
||||||
log.writeLog(__LINE__, "clearStandbyModule called", LOG_TYPE_DEBUG);
|
|
||||||
|
|
||||||
pthread_mutex_lock(&THREAD_LOCK);
|
pthread_mutex_lock(&THREAD_LOCK);
|
||||||
|
|
||||||
Configuration config;
|
Configuration config;
|
||||||
@ -10793,8 +10761,6 @@ int ProcessManager::setMySQLReplication(oam::DeviceNetworkList devicenetworklist
|
|||||||
{
|
{
|
||||||
Oam oam;
|
Oam oam;
|
||||||
|
|
||||||
log.writeLog(__LINE__, "setMySQLReplication called", LOG_TYPE_DEBUG);
|
|
||||||
|
|
||||||
string MySQLRep;
|
string MySQLRep;
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -4117,8 +4117,6 @@ int ProcessMonitor::createDataDirs(std::string cloud)
|
|||||||
MonitorLog log;
|
MonitorLog log;
|
||||||
Oam oam;
|
Oam oam;
|
||||||
|
|
||||||
log.writeLog(__LINE__, "createDataDirs called", LOG_TYPE_DEBUG);
|
|
||||||
|
|
||||||
if ( config.moduleType() == "um" &&
|
if ( config.moduleType() == "um" &&
|
||||||
( cloud == "amazon-ec2" || cloud == "amazon-vpc") )
|
( cloud == "amazon-ec2" || cloud == "amazon-vpc") )
|
||||||
{
|
{
|
||||||
@ -4278,8 +4276,6 @@ int ProcessMonitor::getDBRMdata(string *path)
|
|||||||
Oam oam;
|
Oam oam;
|
||||||
ByteStream msg;
|
ByteStream msg;
|
||||||
|
|
||||||
log.writeLog(__LINE__, "getDBRMdata called", LOG_TYPE_DEBUG);
|
|
||||||
|
|
||||||
int returnStatus = API_FAILURE;
|
int returnStatus = API_FAILURE;
|
||||||
|
|
||||||
msg << (ByteStream::byte) GETDBRMDATA;
|
msg << (ByteStream::byte) GETDBRMDATA;
|
||||||
@ -4964,8 +4960,6 @@ int ProcessMonitor::runMasterRep(std::string& masterLogFile, std::string& master
|
|||||||
{
|
{
|
||||||
Oam oam;
|
Oam oam;
|
||||||
|
|
||||||
log.writeLog(__LINE__, "runMasterRep function called", LOG_TYPE_DEBUG);
|
|
||||||
|
|
||||||
SystemModuleTypeConfig systemModuleTypeConfig;
|
SystemModuleTypeConfig systemModuleTypeConfig;
|
||||||
|
|
||||||
try
|
try
|
||||||
@ -5140,8 +5134,6 @@ int ProcessMonitor::runSlaveRep(std::string& masterLogFile, std::string& masterL
|
|||||||
{
|
{
|
||||||
Oam oam;
|
Oam oam;
|
||||||
|
|
||||||
log.writeLog(__LINE__, "runSlaveRep function called", LOG_TYPE_DEBUG);
|
|
||||||
|
|
||||||
// get master replicaion module IP Address
|
// get master replicaion module IP Address
|
||||||
string PrimaryUMModuleName;
|
string PrimaryUMModuleName;
|
||||||
oam.getSystemConfig("PrimaryUMModuleName", PrimaryUMModuleName);
|
oam.getSystemConfig("PrimaryUMModuleName", PrimaryUMModuleName);
|
||||||
@ -5224,8 +5216,6 @@ int ProcessMonitor::runDisableRep()
|
|||||||
{
|
{
|
||||||
Oam oam;
|
Oam oam;
|
||||||
|
|
||||||
log.writeLog(__LINE__, "runDisableRep function called", LOG_TYPE_DEBUG);
|
|
||||||
|
|
||||||
// mysql port number
|
// mysql port number
|
||||||
string MySQLPort;
|
string MySQLPort;
|
||||||
|
|
||||||
@ -5279,8 +5269,6 @@ int ProcessMonitor::runMasterDist(std::string& password, std::string& slaveModul
|
|||||||
{
|
{
|
||||||
Oam oam;
|
Oam oam;
|
||||||
|
|
||||||
log.writeLog(__LINE__, "runMasterDist function called", LOG_TYPE_DEBUG);
|
|
||||||
|
|
||||||
SystemModuleTypeConfig systemModuleTypeConfig;
|
SystemModuleTypeConfig systemModuleTypeConfig;
|
||||||
|
|
||||||
try
|
try
|
||||||
@ -5405,8 +5393,6 @@ bool ProcessMonitor::amazonIPCheck()
|
|||||||
MonitorLog log;
|
MonitorLog log;
|
||||||
Oam oam;
|
Oam oam;
|
||||||
|
|
||||||
log.writeLog(__LINE__, "amazonIPCheck function called", LOG_TYPE_DEBUG);
|
|
||||||
|
|
||||||
// delete description file so it will create a new one
|
// delete description file so it will create a new one
|
||||||
string tmpLog = tmpLogDir + "/describeInstance.log";
|
string tmpLog = tmpLogDir + "/describeInstance.log";
|
||||||
unlink(tmpLog.c_str());
|
unlink(tmpLog.c_str());
|
||||||
@ -5700,8 +5686,6 @@ void ProcessMonitor::unmountExtraDBroots()
|
|||||||
ModuleConfig moduleconfig;
|
ModuleConfig moduleconfig;
|
||||||
Oam oam;
|
Oam oam;
|
||||||
|
|
||||||
log.writeLog(__LINE__, "unmountExtraDBroots called ", LOG_TYPE_DEBUG);
|
|
||||||
|
|
||||||
string DBRootStorageType = "internal";
|
string DBRootStorageType = "internal";
|
||||||
|
|
||||||
try
|
try
|
||||||
@ -5797,8 +5781,6 @@ int ProcessMonitor::checkDataMount()
|
|||||||
|
|
||||||
//check/update the pmMount files
|
//check/update the pmMount files
|
||||||
|
|
||||||
log.writeLog(__LINE__, "checkDataMount called ", LOG_TYPE_DEBUG);
|
|
||||||
|
|
||||||
string DBRootStorageType = "internal";
|
string DBRootStorageType = "internal";
|
||||||
vector <string> dbrootList;
|
vector <string> dbrootList;
|
||||||
|
|
||||||
@ -6031,8 +6013,6 @@ void ProcessMonitor::calTotalUmMemory()
|
|||||||
|
|
||||||
//check/update the pmMount files
|
//check/update the pmMount files
|
||||||
|
|
||||||
log.writeLog(__LINE__, "calTotalUmMemory called ", LOG_TYPE_DEBUG);
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
sysinfo(&myinfo);
|
sysinfo(&myinfo);
|
||||||
|
Reference in New Issue
Block a user