You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-05 16:15:50 +03:00
Merge branch 'master' of https://github.com/mariadb-corporation/mariadb-columnstore-engine
This commit is contained in:
@@ -29,7 +29,6 @@ df=$installdir/mysql/my.cnf
|
|||||||
|
|
||||||
$installdir/mysql/bin/mysql --defaults-file=$df --force --user=root $pwprompt mysql 2>/tmp/mysql_install.log <<EOD
|
$installdir/mysql/bin/mysql --defaults-file=$df --force --user=root $pwprompt mysql 2>/tmp/mysql_install.log <<EOD
|
||||||
INSTALL PLUGIN columnstore SONAME 'libcalmysql.so';
|
INSTALL PLUGIN columnstore SONAME 'libcalmysql.so';
|
||||||
$installdir/mysql/bin/mysql --defaults-file=$df --force --user=root $pwprompt mysql 2>>/tmp/mysql_install.log <<EOD
|
|
||||||
INSTALL PLUGIN infinidb SONAME 'libcalmysql.so';
|
INSTALL PLUGIN infinidb SONAME 'libcalmysql.so';
|
||||||
-- these are deprecated names
|
-- these are deprecated names
|
||||||
DELETE FROM mysql.func WHERE name='caldisablepartition';
|
DELETE FROM mysql.func WHERE name='caldisablepartition';
|
||||||
|
@@ -347,6 +347,9 @@ getGroup() {
|
|||||||
describeInstance
|
describeInstance
|
||||||
fi
|
fi
|
||||||
group=`grep -B1 -A6 -m 1 $instance $describeInstanceFile | grep -m 1 GROUP | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $2}'`
|
group=`grep -B1 -A6 -m 1 $instance $describeInstanceFile | grep -m 1 GROUP | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $2}'`
|
||||||
|
if [ "$group" == "" ]; then
|
||||||
|
group=`grep -B1 -A4 -m 1 $instance $describeInstanceFile | grep -m 1 INSTANCE | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $21}'`
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo $group
|
echo $group
|
||||||
|
@@ -231,7 +231,7 @@
|
|||||||
<PrimaryUMModuleName>unassigned</PrimaryUMModuleName>
|
<PrimaryUMModuleName>unassigned</PrimaryUMModuleName>
|
||||||
<ModuleHeartbeatPeriod>1</ModuleHeartbeatPeriod>
|
<ModuleHeartbeatPeriod>1</ModuleHeartbeatPeriod>
|
||||||
<ModuleHeartbeatCount>3</ModuleHeartbeatCount>
|
<ModuleHeartbeatCount>3</ModuleHeartbeatCount>
|
||||||
<ModuleProcMonWaitCount>30</ModuleProcMonWaitCount> // 2.5 minutes
|
<ModuleProcMonWaitCount>6</ModuleProcMonWaitCount> // 2.5 minutes
|
||||||
<!-- Disabled
|
<!-- Disabled
|
||||||
<ProcessHeartbeatPeriod>-1</ProcessHeartbeatPeriod>
|
<ProcessHeartbeatPeriod>-1</ProcessHeartbeatPeriod>
|
||||||
-->
|
-->
|
||||||
@@ -251,7 +251,7 @@
|
|||||||
<NMSIPAddress>0.0.0.0</NMSIPAddress>
|
<NMSIPAddress>0.0.0.0</NMSIPAddress>
|
||||||
<TempSaveSize>128M</TempSaveSize> <!-- default SWSDL max element save size -->
|
<TempSaveSize>128M</TempSaveSize> <!-- default SWSDL max element save size -->
|
||||||
<WaitPeriod>10</WaitPeriod> <!-- in seconds -->
|
<WaitPeriod>10</WaitPeriod> <!-- in seconds -->
|
||||||
<TempFileDir>/tmp/infinidb_tmp_files</TempFileDir>
|
<TempFileDir>/tmp/columnstore_tmp_files</TempFileDir>
|
||||||
<CalpontHome>$INSTALLDIR</CalpontHome>
|
<CalpontHome>$INSTALLDIR</CalpontHome>
|
||||||
<ProcessRestartCount>10</ProcessRestartCount>
|
<ProcessRestartCount>10</ProcessRestartCount>
|
||||||
<ProcessRestartPeriod>120</ProcessRestartPeriod>
|
<ProcessRestartPeriod>120</ProcessRestartPeriod>
|
||||||
|
@@ -236,7 +236,7 @@
|
|||||||
<NMSIPAddress>0.0.0.0</NMSIPAddress>
|
<NMSIPAddress>0.0.0.0</NMSIPAddress>
|
||||||
<TempSaveSize>128M</TempSaveSize> <!-- default SWSDL max element save size -->
|
<TempSaveSize>128M</TempSaveSize> <!-- default SWSDL max element save size -->
|
||||||
<WaitPeriod>10</WaitPeriod> <!-- in seconds -->
|
<WaitPeriod>10</WaitPeriod> <!-- in seconds -->
|
||||||
<TempFileDir>/tmp/infinidb_tmp_files</TempFileDir>
|
<TempFileDir>/tmp/columnstore_tmp_files</TempFileDir>
|
||||||
<CalpontHome>$INSTALLDIR</CalpontHome>
|
<CalpontHome>$INSTALLDIR</CalpontHome>
|
||||||
<ModuleHeartbeatPeriod>10</ModuleHeartbeatPeriod>
|
<ModuleHeartbeatPeriod>10</ModuleHeartbeatPeriod>
|
||||||
<ModuleHeartbeatCount>3</ModuleHeartbeatCount>
|
<ModuleHeartbeatCount>3</ModuleHeartbeatCount>
|
||||||
|
@@ -4657,7 +4657,7 @@ namespace oam
|
|||||||
{
|
{
|
||||||
buf = line;
|
buf = line;
|
||||||
|
|
||||||
string::size_type pos = buf.find("Offending RSA key",0);
|
string::size_type pos = buf.find("Offending",0);
|
||||||
if (pos != string::npos) {
|
if (pos != string::npos) {
|
||||||
// line ID
|
// line ID
|
||||||
pos = buf.find(":",0);
|
pos = buf.find(":",0);
|
||||||
|
@@ -2327,7 +2327,7 @@ int processCommand(string* arguments)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//just kick off local server
|
//just kick off local server
|
||||||
cout << " System being started, please wait...";
|
cout << endl << " System being started, please wait...";
|
||||||
cout.flush();
|
cout.flush();
|
||||||
cmd = startup::StartUp::installDir() + "/bin/columnstore restart > /tmp/start.log 2>&1";
|
cmd = startup::StartUp::installDir() + "/bin/columnstore restart > /tmp/start.log 2>&1";
|
||||||
int rtnCode = system(cmd.c_str());
|
int rtnCode = system(cmd.c_str());
|
||||||
@@ -2349,7 +2349,7 @@ int processCommand(string* arguments)
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
cout << " System being started, please wait...";
|
cout << endl << " System being started, please wait...";
|
||||||
cout.flush();
|
cout.flush();
|
||||||
oam.startSystem(ackTemp);
|
oam.startSystem(ackTemp);
|
||||||
if ( waitForActive() )
|
if ( waitForActive() )
|
||||||
@@ -6835,9 +6835,13 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
|
|||||||
|
|
||||||
getFlags(arguments, gracefulTemp, ackTemp, suspendAnswer, bNeedsConfirm);
|
getFlags(arguments, gracefulTemp, ackTemp, suspendAnswer, bNeedsConfirm);
|
||||||
|
|
||||||
// confirm request
|
if (arguments[3] != "y")
|
||||||
if (confirmPrompt("This command restarts the processing of an application on a Module within the MariaDB Columnstore System"))
|
{
|
||||||
break;
|
// confirm request
|
||||||
|
if (confirmPrompt("This command restarts the processing of an application on a Module within the MariaDB Columnstore System"))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@@ -1651,7 +1651,7 @@ int main(int argc, char *argv[])
|
|||||||
newModuleHostName = moduleHostName;
|
newModuleHostName = moduleHostName;
|
||||||
if (amazonInstall) {
|
if (amazonInstall) {
|
||||||
if ( moduleHostName == oam::UnassignedName &&
|
if ( moduleHostName == oam::UnassignedName &&
|
||||||
newModuleName == "pm1" )
|
newModuleName == "pm1" && nicID == 1)
|
||||||
{
|
{
|
||||||
//get local instance name (pm1)
|
//get local instance name (pm1)
|
||||||
string localInstance = oam.getEC2LocalInstance();
|
string localInstance = oam.getEC2LocalInstance();
|
||||||
@@ -1721,7 +1721,17 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if ( moduleHostName == oam::UnassignedName &&
|
||||||
|
newModuleName == "pm1" && nicID == 1)
|
||||||
|
{
|
||||||
|
char hostname[128];
|
||||||
|
gethostname(hostname, sizeof hostname);
|
||||||
|
moduleHostName = hostname;
|
||||||
|
}
|
||||||
|
|
||||||
prompt = "Enter Nic Interface #" + oam.itoa(nicID) + " Host Name (" + moduleHostName + ") > ";
|
prompt = "Enter Nic Interface #" + oam.itoa(nicID) + " Host Name (" + moduleHostName + ") > ";
|
||||||
|
}
|
||||||
|
|
||||||
if ( prompt != "" )
|
if ( prompt != "" )
|
||||||
{
|
{
|
||||||
|
@@ -479,9 +479,9 @@ void ServerMonitor::getCPUdata()
|
|||||||
{
|
{
|
||||||
pcl.clear();
|
pcl.clear();
|
||||||
|
|
||||||
system("top -b -n1 | head -12 | awk '{print $9,$12}' | tail -5 > /tmp/infinidb_tmp_files/processCpu");
|
system("top -b -n1 | head -12 | awk '{print $9,$12}' | tail -5 > /tmp/columnstore_tmp_files/processCpu");
|
||||||
|
|
||||||
ifstream oldFile1 ("/tmp/infinidb_tmp_files/processCpu");
|
ifstream oldFile1 ("/tmp/columnstore_tmp_files/processCpu");
|
||||||
|
|
||||||
// read top 5 users
|
// read top 5 users
|
||||||
int i = 0;
|
int i = 0;
|
||||||
@@ -503,9 +503,9 @@ void ServerMonitor::getCPUdata()
|
|||||||
//
|
//
|
||||||
// get and check Total CPU usage
|
// get and check Total CPU usage
|
||||||
//
|
//
|
||||||
system("top -b -n 6 -d 1 | awk '{print $5}' | grep %id > /tmp/infinidb_tmp_files/systemCpu");
|
system("top -b -n 6 -d 1 | awk '{print $5}' | grep %id > /tmp/columnstore_tmp_files/systemCpu");
|
||||||
|
|
||||||
ifstream oldFile ("/tmp/infinidb_tmp_files/systemCpu");
|
ifstream oldFile ("/tmp/columnstore_tmp_files/systemCpu");
|
||||||
|
|
||||||
float systemIdle = 0;
|
float systemIdle = 0;
|
||||||
// skip first line in file, and average the next 5 entries which contains idle times
|
// skip first line in file, and average the next 5 entries which contains idle times
|
||||||
|
@@ -427,9 +427,9 @@ void ServerMonitor::outputProcMemory(bool log)
|
|||||||
// get top 5 Memory users by process
|
// get top 5 Memory users by process
|
||||||
//
|
//
|
||||||
|
|
||||||
system("ps -e -orss=1,args= | sort -b -k1,1n |tail -n 5 | awk '{print $1,$2}' > /tmp/infinidb_tmp_files/processMem");
|
system("ps -e -orss=1,args= | sort -b -k1,1n |tail -n 5 | awk '{print $1,$2}' > /tmp/columnstore_tmp_files/processMem");
|
||||||
|
|
||||||
ifstream oldFile ("/tmp/infinidb_tmp_files/processMem");
|
ifstream oldFile ("/tmp/columnstore_tmp_files/processMem");
|
||||||
|
|
||||||
string process;
|
string process;
|
||||||
long long memory;
|
long long memory;
|
||||||
|
@@ -1383,12 +1383,12 @@ void pingDeviceThread()
|
|||||||
//restart module processes
|
//restart module processes
|
||||||
int retry = 0;
|
int retry = 0;
|
||||||
|
|
||||||
int ModuleProcMonWaitCount = 30;
|
int ModuleProcMonWaitCount = 6;
|
||||||
try{
|
try{
|
||||||
oam.getSystemConfig("ModuleProcMonWaitCount", ModuleProcMonWaitCount);
|
oam.getSystemConfig("ModuleProcMonWaitCount", ModuleProcMonWaitCount);
|
||||||
}
|
}
|
||||||
catch(...) {
|
catch(...) {
|
||||||
ModuleProcMonWaitCount = 30;
|
ModuleProcMonWaitCount = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( ; retry < ModuleProcMonWaitCount ; retry ++ )
|
for ( ; retry < ModuleProcMonWaitCount ; retry ++ )
|
||||||
@@ -1609,9 +1609,12 @@ void pingDeviceThread()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case oam::DOWN:
|
case oam::DOWN:
|
||||||
// if disabled or initial state, skip
|
// if initial state, skip
|
||||||
if (opState == oam::AUTO_DISABLED ||
|
if (opState == oam::INITIAL)
|
||||||
opState == oam::INITIAL)
|
break;
|
||||||
|
|
||||||
|
// if disabled and not amazon, skip
|
||||||
|
if (opState == oam::AUTO_DISABLED && !amazon)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
log.writeLog(__LINE__, "module failed to respond to pings: " + moduleName, LOG_TYPE_WARNING);
|
log.writeLog(__LINE__, "module failed to respond to pings: " + moduleName, LOG_TYPE_WARNING);
|
||||||
@@ -1702,59 +1705,6 @@ void pingDeviceThread()
|
|||||||
|
|
||||||
// return values = 'ip address' for running or rebooting, stopped or terminated
|
// return values = 'ip address' for running or rebooting, stopped or terminated
|
||||||
string currentIPAddr = oam.getEC2InstanceIpAddress(hostName);
|
string currentIPAddr = oam.getEC2InstanceIpAddress(hostName);
|
||||||
if (currentIPAddr == "stopped")
|
|
||||||
{ // start instance
|
|
||||||
log.writeLog(__LINE__, "Instance in stopped state, try starting it: " + hostName, LOG_TYPE_DEBUG);
|
|
||||||
|
|
||||||
int retryCount = 6; // 1 minutes
|
|
||||||
if( moduleName.find("pm") == 0 )
|
|
||||||
{
|
|
||||||
if ( PMInstanceType == "m2.4xlarge" )
|
|
||||||
retryCount = 15; // 2.5 minutes
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if( moduleName.find("um") == 0 )
|
|
||||||
if ( UMInstanceType == "m2.4xlarge" )
|
|
||||||
retryCount = 15; // 2.5 minutes
|
|
||||||
}
|
|
||||||
|
|
||||||
int retry = 0;
|
|
||||||
for ( ; retry < retryCount ; retry++ )
|
|
||||||
{
|
|
||||||
if ( oam.startEC2Instance(hostName) )
|
|
||||||
{
|
|
||||||
log.writeLog(__LINE__, "Instance started, sleep for 30 seconds to allow it to fully come up: " + hostName, LOG_TYPE_DEBUG);
|
|
||||||
|
|
||||||
//delay then get new IP Address
|
|
||||||
sleep(30);
|
|
||||||
string currentIPAddr = oam.getEC2InstanceIpAddress(hostName);
|
|
||||||
if (currentIPAddr == "stopped" || currentIPAddr == "terminated") {
|
|
||||||
log.writeLog(__LINE__, "Instance failed to start (no ip-address), retry: " + hostName, LOG_TYPE_DEBUG);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// update the Calpont.xml with the new IP Address
|
|
||||||
string cmd = "sed -i s/" + ipAddr + "/" + currentIPAddr + "/g " + startup::StartUp::installDir() + "/etc/Calpont.xml";
|
|
||||||
system(cmd.c_str());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
log.writeLog(__LINE__, "Instance failed to start, retry: " + hostName, LOG_TYPE_DEBUG);
|
|
||||||
|
|
||||||
sleep(10);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( retry >= retryCount )
|
|
||||||
{
|
|
||||||
log.writeLog(__LINE__, "Instance failed to start, restart a new instance: " + hostName, LOG_TYPE_DEBUG);
|
|
||||||
currentIPAddr = "terminated";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( currentIPAddr == "terminated")
|
if ( currentIPAddr == "terminated")
|
||||||
{
|
{
|
||||||
//check if down module was Standby OAM, if so find another one
|
//check if down module was Standby OAM, if so find another one
|
||||||
|
@@ -4602,8 +4602,8 @@ int ProcessManager::addModule(oam::DeviceNetworkList devicenetworklist, std::str
|
|||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
if (!oam.checkLogStatus("/tmp/login_test.log", "README")) {
|
if (!oam.checkLogStatus("/tmp/login_test.log", "README")) {
|
||||||
//check for RSA KEY ISSUE and fix
|
//check for RSA KEY ISSUE and fix
|
||||||
if (oam.checkLogStatus("/tmp/login_test.log", "Offending RSA key")) {
|
if (oam.checkLogStatus("/tmp/login_test.log", "Offending")) {
|
||||||
log.writeLog(__LINE__, "addModule - login failed, RSA key issue, try fixing: " + moduleName, LOG_TYPE_DEBUG);
|
log.writeLog(__LINE__, "addModule - login failed, Offending key issue, try fixing: " + moduleName, LOG_TYPE_DEBUG);
|
||||||
string file = "/tmp/login_test.log";
|
string file = "/tmp/login_test.log";
|
||||||
oam.fixRSAkey(file);
|
oam.fixRSAkey(file);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user