1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

Merge pull request #872 from mariadb-corporation/kill-distributed

MCOL-3515 Remove distributed install
This commit is contained in:
benthompson15
2019-09-25 12:07:44 -05:00
committed by GitHub
8 changed files with 18 additions and 990 deletions

View File

@ -1026,59 +1026,6 @@ void ProcessMonitor::processMessage(messageqcpp::ByteStream msg, messageqcpp::IO
log.writeLog(__LINE__, "STOPALL: ACK back to ProcMgr, return status = " + oam.itoa((int) requestStatus));
//Remove MariaDB ColumnStore PGK on REMOVE option if distubuted install
string DistributedInstall = "n";
try
{
oam.getSystemConfig("DistributedInstall", DistributedInstall);
}
catch (...)
{
log.writeLog(__LINE__, "addModule - ERROR: get DistributedInstall", LOG_TYPE_ERROR);
}
if ( actIndicator == oam::REMOVE && ( DistributedInstall == "y" ))
{
log.writeLog(__LINE__, "STOPALL: uninstall MariaDB ColumnStore PGKs", LOG_TYPE_DEBUG);
if ( config.moduleType() == "um" )
{
system("rpm -e --nodeps $(rpm -qa | grep '^mariadb-columnstore')");
system("dpkg -P $(dpkg --get-selections | grep '^mariadb-columnstore')");
}
else // pm
{
//Flush the cache
cacheutils::flushPrimProcCache();
cacheutils::dropPrimProcFdCache();
flushInodeCache();
try
{
string DBRootStorageType = "internal";
oam.getSystemConfig("DBRootStorageType", DBRootStorageType);
if ( DBRootStorageType == "external" )
{
string cmd = SUDO + "umount " + startup::StartUp::installDir() + "/data* -l > /dev/null 2>&1";
system(cmd.c_str());
sleep(1);
}
}
catch (...) {}
system("rpm -e --nodeps $(rpm -qa | grep '^mariadb-columnstore')");
system("dpkg -P $(dpkg --get-selections | grep '^mariadb-columnstore')");
}
// should get here is packages get removed correctly
string cmd = startup::StartUp::installDir() + "/bin/columnstore stop > /dev/null 2>&1";
system(cmd.c_str());
exit (0);
}
break;
}