You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-08 14:22:09 +03:00
MCOL-436
This commit is contained in:
@@ -518,7 +518,8 @@ namespace oam
|
||||
ENABLEMYSQLREP,
|
||||
DISABLEMYSQLREP,
|
||||
GLUSTERASSIGN,
|
||||
GLUSTERUNASSIGN
|
||||
GLUSTERUNASSIGN,
|
||||
PROCESSALARM
|
||||
};
|
||||
|
||||
/** @brief Process Management - Mgr to Mon request options
|
||||
|
@@ -283,12 +283,12 @@ void processAlarm(const Alarm& calAlarm)
|
||||
}
|
||||
|
||||
/*****************************************************************************************
|
||||
* @brief configAlarm
|
||||
* @brief processAlarmReport
|
||||
*
|
||||
* purpose: Get Config Data for Incoming alarm
|
||||
* purpose: Process Alarm Report
|
||||
*
|
||||
*****************************************************************************************/
|
||||
void configAlarm (Alarm& calAlarm)
|
||||
void ALARMManager::processAlarmReport (Alarm& calAlarm)
|
||||
{
|
||||
int alarmID = calAlarm.getAlarmID();
|
||||
Oam oam;
|
||||
@@ -299,7 +299,7 @@ void configAlarm (Alarm& calAlarm)
|
||||
MessageLog ml(lid);
|
||||
Message msg;
|
||||
Message::Args args;
|
||||
args.add("configAlarm Called");
|
||||
args.add("processAlarmReport Called");
|
||||
msg.format(args);
|
||||
ml.logDebugMessage(msg);
|
||||
}
|
||||
@@ -438,18 +438,32 @@ void ALARMManager::sendAlarmReport (const char* componentID, int alarmID, int st
|
||||
else
|
||||
processName = repProcessName;
|
||||
|
||||
Alarm calAlarm;
|
||||
//send request to ProcMgr to be processed
|
||||
ByteStream msg1;
|
||||
|
||||
calAlarm.setAlarmID (alarmID);
|
||||
calAlarm.setComponentID (componentID);
|
||||
calAlarm.setState (state);
|
||||
calAlarm.setSname (ModuleName);
|
||||
calAlarm.setPname (processName);
|
||||
calAlarm.setPid (pid);
|
||||
calAlarm.setTid (tid);
|
||||
msg1 << (ByteStream::byte) REQUEST;
|
||||
msg1 << oam::PROCESSALARM;
|
||||
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;
|
||||
|
||||
// Get alarm configuration
|
||||
try {
|
||||
try
|
||||
{
|
||||
//send the msg to Process Manager
|
||||
MessageQueueClient procmgr("ProcMgr");
|
||||
procmgr.write(msg1);
|
||||
|
||||
procmgr.shutdown();
|
||||
}
|
||||
catch (...)
|
||||
{}
|
||||
|
||||
//There's other reasons, but this is the most likely...
|
||||
/* try {
|
||||
configAlarm (calAlarm);
|
||||
} catch (runtime_error& e)
|
||||
{
|
||||
@@ -462,6 +476,7 @@ void ALARMManager::sendAlarmReport (const char* componentID, int alarmID, int st
|
||||
msg.format(args);
|
||||
ml.logErrorMessage(msg);
|
||||
}
|
||||
*/
|
||||
|
||||
return;
|
||||
#endif //SKIP_ALARM
|
||||
|
@@ -76,6 +76,8 @@ public:
|
||||
std::string repModuleName = "",
|
||||
std::string repProcessName = "");
|
||||
|
||||
EXPORT void processAlarmReport ( Alarm& calAlarm );
|
||||
|
||||
|
||||
/** @brief return active alarm list
|
||||
*
|
||||
|
@@ -2629,6 +2629,44 @@ void processMSG(messageqcpp::IOSocket* cfIos)
|
||||
break;
|
||||
}
|
||||
|
||||
case PROCESSALARM:
|
||||
{
|
||||
string dbroot;
|
||||
msg >> dbroot;
|
||||
|
||||
ByteStream::byte alarmID;
|
||||
std::string componentID;
|
||||
ByteStream::byte state;
|
||||
std::string ModuleName;
|
||||
std::string processName;
|
||||
ByteStream::byte pid;
|
||||
ByteStream::byte tid;
|
||||
|
||||
msg >> alarmID;
|
||||
msg >> componentID;
|
||||
msg >> state;
|
||||
msg >> ModuleName;
|
||||
msg >> processName;
|
||||
msg >> pid;
|
||||
msg >> tid;
|
||||
|
||||
Alarm calAlarm;
|
||||
|
||||
calAlarm.setAlarmID (alarmID);
|
||||
calAlarm.setComponentID (componentID);
|
||||
calAlarm.setState (state);
|
||||
calAlarm.setSname (ModuleName);
|
||||
calAlarm.setPname (processName);
|
||||
calAlarm.setPid (pid);
|
||||
calAlarm.setTid (tid);
|
||||
|
||||
ALARMManager aManager;
|
||||
aManager.processAlarmReport(calAlarm);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
default:
|
||||
log.writeLog(__LINE__, "MSG RECEIVED: Invalid type" );
|
||||
break;
|
||||
|
Reference in New Issue
Block a user