You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
Fix non-root gluster commands and undo change in processmonitor that was not meant to be checked in.
This commit is contained in:
@ -162,8 +162,8 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//re-read local system info with updated Columnstore.xml
|
//re-read local system info with updated Columnstore.xml
|
||||||
sleep(1);
|
// sleep(1);
|
||||||
MonitorConfig config;
|
// MonitorConfig config;
|
||||||
|
|
||||||
//PMwithUM config
|
//PMwithUM config
|
||||||
try {
|
try {
|
||||||
@ -357,9 +357,6 @@ int main(int argc, char **argv)
|
|||||||
sleep(1);
|
sleep(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//re-read local system info with new Columnstore.xml
|
|
||||||
sleep(1);
|
|
||||||
MonitorConfig config;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// not OAM parent module, delay starting until a successful get status is performed
|
// not OAM parent module, delay starting until a successful get status is performed
|
||||||
@ -412,9 +409,6 @@ int main(int argc, char **argv)
|
|||||||
sleep(1);
|
sleep(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//re-read local system info with new Columnstore.xml
|
|
||||||
sleep(1);
|
|
||||||
MonitorConfig config;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// not OAM parent module, delay starting until a successful get status is performed
|
// not OAM parent module, delay starting until a successful get status is performed
|
||||||
@ -481,11 +475,11 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
if ( retry == 20 )
|
if ( retry == 20 )
|
||||||
{
|
{
|
||||||
log.writeLog(__LINE__, "Check DB mounts failed, infinidb shutting down", LOG_TYPE_CRITICAL);
|
log.writeLog(__LINE__, "Check DB mounts failed, shutting down", LOG_TYPE_CRITICAL);
|
||||||
//Set the alarm
|
//Set the alarm
|
||||||
aMonitor.sendAlarm(config.moduleName().c_str(), STARTUP_DIAGNOTICS_FAILURE, SET);
|
aMonitor.sendAlarm(config.moduleName().c_str(), STARTUP_DIAGNOTICS_FAILURE, SET);
|
||||||
sleep (1);
|
sleep (1);
|
||||||
string cmd = startup::StartUp::installDir() + "/bin/infinidb stop > /dev/null 2>&1";
|
string cmd = startup::StartUp::installDir() + "/bin/columnstore stop > /dev/null 2>&1";
|
||||||
system(cmd.c_str());
|
system(cmd.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -635,8 +629,6 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MonitorConfig config;
|
|
||||||
|
|
||||||
while(true)
|
while(true)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
@ -5871,11 +5871,6 @@ int ProcessMonitor::checkDataMount()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dbrootList.size() == 0 && DataRedundancyConfig != "y") {
|
|
||||||
log.writeLog(__LINE__, "No dbroots are configured in Columnstore.xml file", LOG_TYPE_WARNING);
|
|
||||||
return API_INVALID_PARAMETER;
|
|
||||||
}
|
|
||||||
|
|
||||||
try{
|
try{
|
||||||
oam.getSystemConfig("DBRootStorageType", DBRootStorageType);
|
oam.getSystemConfig("DBRootStorageType", DBRootStorageType);
|
||||||
}
|
}
|
||||||
@ -5904,6 +5899,11 @@ int ProcessMonitor::checkDataMount()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( dbrootList.size() == 0 ) {
|
||||||
|
log.writeLog(__LINE__, "No dbroots are configured in Columnstore.xml file", LOG_TYPE_WARNING);
|
||||||
|
return API_INVALID_PARAMETER;
|
||||||
|
}
|
||||||
|
|
||||||
if ( DBRootStorageType == "hdfs" ||
|
if ( DBRootStorageType == "hdfs" ||
|
||||||
(DBRootStorageType == "internal" && DataRedundancyConfig == "n") ) {
|
(DBRootStorageType == "internal" && DataRedundancyConfig == "n") ) {
|
||||||
//create OAM-Test-Flag
|
//create OAM-Test-Flag
|
||||||
@ -6122,7 +6122,7 @@ int ProcessMonitor::glusterAssign(std::string dbrootID)
|
|||||||
{
|
{
|
||||||
Oam oam;
|
Oam oam;
|
||||||
Config* sysConfig = Config::makeConfig();
|
Config* sysConfig = Config::makeConfig();
|
||||||
|
string command;
|
||||||
std::string errmsg = "";
|
std::string errmsg = "";
|
||||||
|
|
||||||
log.writeLog(__LINE__, "glusterAssign called : " + dbrootID, LOG_TYPE_DEBUG);
|
log.writeLog(__LINE__, "glusterAssign called : " + dbrootID, LOG_TYPE_DEBUG);
|
||||||
@ -6135,9 +6135,17 @@ int ProcessMonitor::glusterAssign(std::string dbrootID)
|
|||||||
{
|
{
|
||||||
moduleIPAddr = sysConfig->getConfig("SystemModuleConfig",dataDupIPaddr);
|
moduleIPAddr = sysConfig->getConfig("SystemModuleConfig",dataDupIPaddr);
|
||||||
}
|
}
|
||||||
string command = "mount -tglusterfs -odirect-io-mode=enable " + moduleIPAddr + ":/dbroot" +
|
|
||||||
dbrootID + " " + startup::StartUp::installDir() + "/data" + dbrootID + " > /tmp/glusterAssign.txt 2>&1";
|
|
||||||
|
|
||||||
|
if ( rootUser)
|
||||||
|
{
|
||||||
|
command = "mount -tglusterfs -odirect-io-mode=enable " + moduleIPAddr + ":/dbroot" +
|
||||||
|
dbrootID + " " + startup::StartUp::installDir() + "/data" + dbrootID + " > /tmp/glusterAssign.txt 2>&1";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
command = "sudo mount -tglusterfs -odirect-io-mode=enable " + moduleIPAddr + ":/dbroot" +
|
||||||
|
dbrootID + " " + startup::StartUp::installDir() + "/data" + dbrootID + " > /tmp/glusterAssign.txt 2>&1";
|
||||||
|
}
|
||||||
int ret = system(command.c_str());
|
int ret = system(command.c_str());
|
||||||
|
|
||||||
if ( WEXITSTATUS(ret) != 0 )
|
if ( WEXITSTATUS(ret) != 0 )
|
||||||
@ -6169,13 +6177,19 @@ int ProcessMonitor::glusterAssign(std::string dbrootID)
|
|||||||
int ProcessMonitor::glusterUnassign(std::string dbrootID)
|
int ProcessMonitor::glusterUnassign(std::string dbrootID)
|
||||||
{
|
{
|
||||||
Oam oam;
|
Oam oam;
|
||||||
|
string command;
|
||||||
std::string errmsg = "";
|
std::string errmsg = "";
|
||||||
|
|
||||||
log.writeLog(__LINE__, "glusterUnassign called: " + dbrootID, LOG_TYPE_DEBUG);
|
log.writeLog(__LINE__, "glusterUnassign called: " + dbrootID, LOG_TYPE_DEBUG);
|
||||||
|
|
||||||
string command = "umount -f " + startup::StartUp::installDir() + "/data" + dbrootID + " > /tmp/glusterUnassign.txt 2>&1";
|
if ( rootUser)
|
||||||
|
{
|
||||||
|
command = "umount -f " + startup::StartUp::installDir() + "/data" + dbrootID + " > /tmp/glusterUnassign.txt 2>&1";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
command = "sudo umount -f " + startup::StartUp::installDir() + "/data" + dbrootID + " > /tmp/glusterUnassign.txt 2>&1";
|
||||||
|
}
|
||||||
int ret = system(command.c_str());
|
int ret = system(command.c_str());
|
||||||
if ( WEXITSTATUS(ret) != 0 )
|
if ( WEXITSTATUS(ret) != 0 )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user