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
Merge branch 'develop-1.1' into 1.1-mergeup-20180224
This commit is contained in:
@ -28,10 +28,10 @@
|
||||
#include <vector>
|
||||
#include <iterator>
|
||||
|
||||
#include "messagequeue.h"
|
||||
#include "alarmglobal.h"
|
||||
#include "liboamcpp.h"
|
||||
#include "installdir.h"
|
||||
#include "messagequeue.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace oam;
|
||||
@ -409,7 +409,7 @@ void configAlarm (Alarm& calAlarm)
|
||||
/*****************************************************************************************
|
||||
* @brief sendAlarmReport API
|
||||
*
|
||||
* purpose: Process Alarm Report
|
||||
* purpose: Send Alarm Report
|
||||
*
|
||||
*****************************************************************************************/
|
||||
void ALARMManager::sendAlarmReport (const char* componentID, int alarmID, int state,
|
||||
@ -484,16 +484,73 @@ void ALARMManager::sendAlarmReport (const char* componentID, int alarmID, int st
|
||||
else
|
||||
processName = repProcessName;
|
||||
|
||||
Alarm calAlarm;
|
||||
int returnStatus = API_SUCCESS; //default
|
||||
ByteStream msg1;
|
||||
|
||||
calAlarm.setAlarmID (alarmID);
|
||||
calAlarm.setComponentID (componentID);
|
||||
calAlarm.setState (state);
|
||||
calAlarm.setSname (ModuleName);
|
||||
calAlarm.setPname (processName);
|
||||
calAlarm.setPid (pid);
|
||||
calAlarm.setTid (tid);
|
||||
// setup message
|
||||
msg1 << (ByteStream::byte) alarmID;
|
||||
msg1 << (std::string) componentID;
|
||||
msg1 << (ByteStream::byte) state;
|
||||
msg1 << (std::string) ModuleName;
|
||||
msg1 << (std::string) processName;
|
||||
msg1 << (ByteStream::byte) pid;
|
||||
msg1 << (ByteStream::byte) tid;
|
||||
|
||||
try
|
||||
{
|
||||
//send the msg to Process Manager
|
||||
MessageQueueClient procmgr("ProcMgr_Alarm");
|
||||
procmgr.write(msg1);
|
||||
|
||||
// shutdown connection
|
||||
procmgr.shutdown();
|
||||
}
|
||||
catch (std::runtime_error& e)
|
||||
{
|
||||
LoggingID lid(11);
|
||||
MessageLog ml(lid);
|
||||
Message msg;
|
||||
Message::Args args;
|
||||
args.add("sendAlarmReport error:");
|
||||
args.add(e.what());
|
||||
msg.format(args);
|
||||
ml.logErrorMessage(msg);
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
LoggingID lid(11);
|
||||
MessageLog ml(lid);
|
||||
Message msg;
|
||||
Message::Args args;
|
||||
args.add("sendAlarmReport error:");
|
||||
args.add(e.what());
|
||||
msg.format(args);
|
||||
ml.logErrorMessage(msg);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
LoggingID lid(11);
|
||||
MessageLog ml(lid);
|
||||
Message msg;
|
||||
Message::Args args;
|
||||
args.add("sendAlarmReport error:");
|
||||
args.add("general failure");
|
||||
msg.format(args);
|
||||
ml.logErrorMessage(msg);
|
||||
}
|
||||
|
||||
return;
|
||||
#endif //SKIP_ALARM
|
||||
}
|
||||
|
||||
/*****************************************************************************************
|
||||
* @brief processAlarmReport API
|
||||
*
|
||||
* purpose: Process Alarm Report
|
||||
*
|
||||
*****************************************************************************************/
|
||||
void ALARMManager::processAlarmReport (Alarm& calAlarm)
|
||||
{
|
||||
// Get alarm configuration
|
||||
try
|
||||
{
|
||||
@ -512,7 +569,7 @@ void ALARMManager::sendAlarmReport (const char* componentID, int alarmID, int st
|
||||
}
|
||||
|
||||
return;
|
||||
#endif //SKIP_ALARM
|
||||
|
||||
}
|
||||
|
||||
/*****************************************************************************************
|
||||
|
@ -78,6 +78,8 @@ public:
|
||||
std::string repProcessName = "");
|
||||
|
||||
|
||||
EXPORT void processAlarmReport (Alarm& calAlarm);
|
||||
|
||||
/** @brief return active alarm list
|
||||
*
|
||||
* @param AlarmList the alarm map reference to store alarms
|
||||
|
@ -58,7 +58,7 @@ const int ArgNum = 10;
|
||||
const int DescNumMax = 10;
|
||||
const int cmdNum = 68;
|
||||
|
||||
const std::string DEFAULT_LOG_FILE = "/var/log/mariadb/columnstore/uiCommands.log";
|
||||
const std::string DEFAULT_LOG_FILE = "/var/log/mariadb/columnstore/mcsadmin.log";
|
||||
std::ofstream logFile;
|
||||
|
||||
/**
|
||||
|
@ -2316,7 +2316,8 @@ int main(int argc, char* argv[])
|
||||
sysConfig->setConfig(parentProcessMonitor, "IPAddr", parentOAMModuleIPAddr);
|
||||
sysConfig->setConfig(parentProcessMonitor, "Port", "8800");
|
||||
sysConfig->setConfig("ProcMgr", "IPAddr", parentOAMModuleIPAddr);
|
||||
//sysConfig->setConfig("ProcHeartbeatControl", "IPAddr", parentOAMModuleIPAddr);
|
||||
sysConfig->setConfig("ProcHeartbeatControl", "IPAddr", parentOAMModuleIPAddr);
|
||||
sysConfig->setConfig("ProcMgr_Alarm", "IPAddr", parentOAMModuleIPAddr);
|
||||
sysConfig->setConfig("ProcStatusControl", "IPAddr", parentOAMModuleIPAddr);
|
||||
string parentServerMonitor = parentOAMModuleName + "_ServerMonitor";
|
||||
sysConfig->setConfig(parentServerMonitor, "IPAddr", parentOAMModuleIPAddr);
|
||||
@ -3227,7 +3228,7 @@ int main(int argc, char* argv[])
|
||||
if ( EEPackageType == "rpm")
|
||||
columnstorePackage = HOME + "/" + "mariadb-columnstore-" + version + "*.rpm";
|
||||
else if ( EEPackageType == "deb")
|
||||
columnstorePackage = HOME + "/" + "mariadb-columnstore-" + version + "*.deb";
|
||||
columnstorePackage = HOME + "/" + "mariadb-columnstore-*" + systemsoftware.Version + "*.deb";
|
||||
else
|
||||
columnstorePackage = HOME + "/" + "mariadb-columnstore-" + version + "*.bin.tar.gz";
|
||||
|
||||
|
Reference in New Issue
Block a user